export declare namespace SyntaxTree { type Value = number | number[]; interface FunctionArgument { type: string; name: string; default?: Value; } type ExpressionType = "value" | "variable" | "field" | "function" | "operator"; interface Expression { type: ExpressionType; } interface ExpressionFunctionArguments { args: Expression[]; kwargs: { [key: string]: Expression; }; } interface ExpressionFunction extends Expression { type: "function"; name: string; args: ExpressionFunctionArguments; } interface ExpressionVariable extends Expression { type: "variable"; name: string; } interface ExpressionValue extends Expression { type: "value"; value: Value; valueType: string; } interface ExpressionField extends Expression { type: "field"; value: Expression; fieldName: string; } type StatementType = "expression" | "assign" | "declare" | "return" | "emit" | "discard" | "for" | "if" | "statements"; interface Statement { type: StatementType; } interface StatementExpression extends Statement { type: "expression"; expression: Expression; } interface StatementEmit extends Statement { type: "emit"; vertices: Array<{ [name: string]: Expression; }>; } interface StatementReturn extends Statement { type: "return"; value: Expression; } interface StatementDeclare extends Statement { type: "declare"; variableType: string; variableName: string; initial?: Expression; } interface StatementAssign extends Statement { type: "assign"; variableName: string; expression: Expression; } interface StatementStatements extends Statement { type: "statements"; statements: Statement[]; } interface StatementForLoop extends Statement { type: "for"; variableName: string; start: number; end: number; statement: Statement; } interface StatementIfStatement extends Statement { type: "if"; conditions: [{ condition: Expression; statement: Statement; }]; else: Statement; } type FileBlockType = "function" | "global" | "import"; interface FileBlock { type: FileBlockType; } interface FileBlockFunction extends FileBlock { type: "function"; isMark: boolean; isShader: boolean; name: string; returnType: string; arguments: FunctionArgument[]; statements: Statement[]; } interface FileBlockGlobal extends FileBlock { type: "global"; name: string; valueType: string; default?: Value; } interface FileBlockImport extends FileBlock { type: "import"; moduleName: string; functionNames: string[]; } interface File { blocks: FileBlock[]; } } export declare function parseFile(content: string): SyntaxTree.File; export declare function parseExpression(content: string): SyntaxTree.Expression;