mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 01:19:39 +01:00
33 lines
478 B
TypeScript
33 lines
478 B
TypeScript
export type FnArg = {
|
|
name: string;
|
|
value: Val;
|
|
};
|
|
export type Token = {
|
|
"type": "raw";
|
|
text: string;
|
|
} | {
|
|
"type": "tag";
|
|
val: Val;
|
|
} | {
|
|
"type": "eof";
|
|
};
|
|
export type Tokens = {
|
|
tokens: Array<Token>;
|
|
};
|
|
export type Val = {
|
|
"type": "str";
|
|
text: string;
|
|
} | {
|
|
"type": "var";
|
|
name: string;
|
|
} | {
|
|
"type": "bool";
|
|
value: boolean;
|
|
} | {
|
|
"type": "fn";
|
|
name: string;
|
|
args: Array<FnArg>;
|
|
} | {
|
|
"type": "null";
|
|
};
|