UNPKG

bkc

Version:

:dog: If there are no dogs in Heaven, then when I die I want to go where they went.

48 lines (47 loc) 1.18 kB
export declare type TType = 'command' | 'assign' | 'if' | 'for' | 'end' | 'skip' | 'error'; export declare type TArg = 'num' | 'arg' | 'str' | 'exp' | 'var' | 'err' | 'comstart' | 'comend' | 'emp'; export declare type TExpr = '+' | '-' | '*' | '/' | '=' | '<' | '>' | '<=' | '>=' | '==' | '!='; export declare enum TYPE { COMMAND = "command", ASSIGN = "assign", IF = "if", FOR = "for", END = "end", SKIP = "skip", ERROR = "error" } export declare enum ARGUMENT { NUMBER = "num", ARGUMENT = "arg", STRING = "str", EXPRESSION = "exp", VARIABLE = "var", ERROR = "err", COMSTART = "comstart", COMEND = "comend", EMP = "emp" } export declare enum EXPRESSION { PLUS = "+", MINUS = "-", TIMES = "*", DIVIDE = "/", EQUAL = "=", SMALLERTHAN = "<", GREATERTHAN = ">", SMALLEROREQUAL = "<=", GREATEROREQUAL = ">=", EQUALEQUAL = "==", NOTEQUAL = "!=" } export interface IArgs { type: TArg; va: any; } export interface IAs { type: TType; val: string; args: IArgs[]; } declare type TAst = IAs[]; export default TAst;