-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
wgsl_reflect.node.js.map
1 lines (1 loc) · 294 KB
/
wgsl_reflect.node.js.map
1
{"version":3,"file":"wgsl_reflect.node.js","sources":["src/wgsl_ast.ts","src/wgsl_scanner.ts","src/wgsl_parser.ts","src/wgsl_reflect.ts"],"sourcesContent":["export class ParseContext {\r\n constants: Map<string, Const> = new Map();\r\n aliases: Map<string, Alias> = new Map();\r\n structs: Map<string, Struct> = new Map();\r\n}\r\n\r\n/**\r\n * @class Node\r\n * @category AST\r\n * Base class for AST nodes parsed from a WGSL shader.\r\n */\r\nexport class Node {\r\n constructor() {}\r\n\r\n get isAstNode(): boolean {\r\n return true;\r\n }\r\n\r\n get astNodeType(): string {\r\n return \"\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n throw new Error(\"Cannot evaluate node\");\r\n }\r\n\r\n evaluateString(context: ParseContext): string {\r\n return this.evaluate(context).toString();\r\n }\r\n\r\n search(callback: (node: Node) => void) {}\r\n\r\n searchBlock(block: Array<Node> | null, callback: (node: Node) => void) {\r\n if (block) {\r\n callback(_BlockStart.instance);\r\n for (const node of block) {\r\n if (node instanceof Array) {\r\n this.searchBlock(node as Array<Node>, callback);\r\n } else {\r\n node.search(callback);\r\n }\r\n }\r\n callback(_BlockEnd.instance);\r\n }\r\n }\r\n}\r\n\r\n// For internal use only\r\nexport class _BlockStart extends Node {\r\n static instance = new _BlockStart();\r\n}\r\n\r\n // For internal use only\r\nexport class _BlockEnd extends Node { \r\n static instance = new _BlockEnd();\r\n}\r\n\r\n/**\r\n * @class Statement\r\n * @extends Node\r\n * @category AST\r\n */\r\nexport class Statement extends Node {\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\n/**\r\n * @class Function\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Function extends Statement {\r\n name: string;\r\n args: Array<Argument>;\r\n returnType: Type | null;\r\n body: Array<Statement>;\r\n attributes: Array<Attribute> | null;\r\n startLine: number;\r\n endLine: number;\r\n calls: Set<Function> = new Set();\r\n\r\n constructor(\r\n name: string,\r\n args: Array<Argument>,\r\n returnType: Type | null,\r\n body: Array<Statement>,\r\n startLine: number,\r\n endLine: number\r\n ) {\r\n super();\r\n this.name = name;\r\n this.args = args;\r\n this.returnType = returnType;\r\n this.body = body;\r\n this.startLine = startLine;\r\n this.endLine = endLine;\r\n }\r\n\r\n get astNodeType(): string {\r\n return \"function\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.searchBlock(this.body, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class StaticAssert\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class StaticAssert extends Statement {\r\n expression: Expression;\r\n\r\n constructor(expression: Expression) {\r\n super();\r\n this.expression = expression;\r\n }\r\n\r\n get astNodeType() {\r\n return \"staticAssert\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.expression.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class While\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class While extends Statement {\r\n condition: Expression;\r\n body: Array<Statement>;\r\n\r\n constructor(condition: Expression, body: Array<Statement>) {\r\n super();\r\n this.condition = condition;\r\n this.body = body;\r\n }\r\n\r\n get astNodeType() {\r\n return \"while\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.condition.search(callback);\r\n this.searchBlock(this.body, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Continuing\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Continuing extends Statement {\r\n body: Array<Statement>;\r\n\r\n constructor(body: Array<Statement>) {\r\n super();\r\n this.body = body;\r\n }\r\n\r\n get astNodeType() {\r\n return \"continuing\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.searchBlock(this.body, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class For\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class For extends Statement {\r\n init: Statement | null;\r\n condition: Expression | null;\r\n increment: Statement | null;\r\n body: Array<Statement>;\r\n\r\n constructor(\r\n init: Statement | null,\r\n condition: Expression | null,\r\n increment: Statement | null,\r\n body: Array<Statement>\r\n ) {\r\n super();\r\n this.init = init;\r\n this.condition = condition;\r\n this.increment = increment;\r\n this.body = body;\r\n }\r\n\r\n get astNodeType() {\r\n return \"for\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.init?.search(callback);\r\n this.condition?.search(callback);\r\n this.increment?.search(callback);\r\n this.searchBlock(this.body, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Var\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Var extends Statement {\r\n name: string;\r\n type: Type | null;\r\n storage: string | null;\r\n access: string | null;\r\n value: Expression | null;\r\n attributes: Array<Attribute> | null;\r\n\r\n constructor(\r\n name: string,\r\n type: Type | null,\r\n storage: string | null,\r\n access: string | null,\r\n value: Expression | null\r\n ) {\r\n super();\r\n this.name = name;\r\n this.type = type;\r\n this.storage = storage;\r\n this.access = access;\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"var\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n callback(this);\r\n this.value?.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Override\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Override extends Statement {\r\n name: string;\r\n type: Type | null;\r\n value: Expression | null;\r\n attributes: Array<Attribute> | null;\r\n\r\n constructor(name: string, type: Type | null, value: Expression | null) {\r\n super();\r\n this.name = name;\r\n this.type = type;\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"override\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.value?.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Let\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Let extends Statement {\r\n name: string;\r\n type: Type | null;\r\n storage: string | null;\r\n access: string | null;\r\n value: Expression | null;\r\n attributes: Array<Attribute> | null;\r\n\r\n constructor(\r\n name: string,\r\n type: Type | null,\r\n storage: string | null,\r\n access: string | null,\r\n value: Expression | null\r\n ) {\r\n super();\r\n this.name = name;\r\n this.type = type;\r\n this.storage = storage;\r\n this.access = access;\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"let\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n callback(this);\r\n this.value?.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Const\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Const extends Statement {\r\n name: string;\r\n type: Type | null;\r\n storage: string | null;\r\n access: string | null;\r\n value: Expression;\r\n attributes: Array<Attribute> | null;\r\n\r\n constructor(\r\n name: string,\r\n type: Type | null,\r\n storage: string | null,\r\n access: string | null,\r\n value: Expression\r\n ) {\r\n super();\r\n this.name = name;\r\n this.type = type;\r\n this.storage = storage;\r\n this.access = access;\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"const\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n return this.value.evaluate(context);\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n callback(this);\r\n this.value?.search(callback);\r\n }\r\n}\r\n\r\nexport enum IncrementOperator {\r\n increment = \"++\",\r\n decrement = \"--\",\r\n}\r\n\r\nexport namespace IncrementOperator {\r\n export function parse(val: string): IncrementOperator {\r\n const key = val as keyof typeof IncrementOperator;\r\n if (key == \"parse\") throw new Error(\"Invalid value for IncrementOperator\");\r\n return IncrementOperator[key];\r\n }\r\n}\r\n\r\n/**\r\n * @class Increment\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Increment extends Statement {\r\n operator: IncrementOperator;\r\n variable: Expression;\r\n\r\n constructor(operator: IncrementOperator, variable: Expression) {\r\n super();\r\n this.operator = operator;\r\n this.variable = variable;\r\n }\r\n\r\n get astNodeType() {\r\n return \"increment\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.variable.search(callback);\r\n }\r\n}\r\n\r\nexport enum AssignOperator {\r\n assign = \"=\",\r\n addAssign = \"+=\",\r\n subtractAssin = \"-=\",\r\n multiplyAssign = \"*=\",\r\n divideAssign = \"/=\",\r\n moduloAssign = \"%=\",\r\n andAssign = \"&=\",\r\n orAssign = \"|=\",\r\n xorAssign = \"^=\",\r\n shiftLeftAssign = \"<<=\",\r\n shiftRightAssign = \">>=\",\r\n}\r\n\r\nexport namespace AssignOperator {\r\n export function parse(val: string): AssignOperator {\r\n const key = val as keyof typeof AssignOperator;\r\n if (key == \"parse\") {\r\n throw new Error(\"Invalid value for AssignOperator\");\r\n }\r\n //return AssignOperator[key];\r\n return key as AssignOperator;\r\n }\r\n}\r\n\r\n/**\r\n * @class Assign\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Assign extends Statement {\r\n operator: AssignOperator;\r\n variable: Expression;\r\n value: Expression;\r\n\r\n constructor(\r\n operator: AssignOperator,\r\n variable: Expression,\r\n value: Expression\r\n ) {\r\n super();\r\n this.operator = operator;\r\n this.variable = variable;\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"assign\";\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.variable.search(callback);\r\n this.value.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Call\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Call extends Statement {\r\n name: string;\r\n args: Array<Expression>;\r\n\r\n constructor(name: string, args: Array<Expression>) {\r\n super();\r\n this.name = name;\r\n this.args = args;\r\n }\r\n\r\n get astNodeType() {\r\n return \"call\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n for (const node of this.args) {\r\n node.search(callback);\r\n }\r\n callback(this);\r\n }\r\n}\r\n\r\n/**\r\n * @class Loop\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Loop extends Statement {\r\n body: Array<Statement>;\r\n continuing: Array<Statement> | null;\r\n\r\n constructor(body: Array<Statement>, continuing: Array<Statement> | null) {\r\n super();\r\n this.body = body;\r\n this.continuing = continuing;\r\n }\r\n\r\n get astNodeType() {\r\n return \"loop\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Switch\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Switch extends Statement {\r\n condition: Expression;\r\n body: Array<Statement>;\r\n\r\n constructor(condition: Expression, body: Array<Statement>) {\r\n super();\r\n this.condition = condition;\r\n this.body = body;\r\n }\r\n\r\n get astNodeType() {\r\n return \"body\";\r\n }\r\n}\r\n\r\n/**\r\n * @class If\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class If extends Statement {\r\n condition: Expression;\r\n body: Array<Statement>;\r\n elseif: Array<ElseIf> | null;\r\n else: Array<Statement> | null;\r\n\r\n constructor(\r\n condition: Expression,\r\n body: Array<Statement>,\r\n elseif: Array<ElseIf> | null,\r\n _else: Array<Statement> | null\r\n ) {\r\n super();\r\n this.condition = condition;\r\n this.body = body;\r\n this.elseif = elseif;\r\n this.else = _else;\r\n }\r\n\r\n get astNodeType() {\r\n return \"if\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.condition.search(callback);\r\n this.searchBlock(this.body, callback);\r\n this.searchBlock(this.elseif, callback);\r\n this.searchBlock(this.else, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Return\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Return extends Statement {\r\n value: Expression;\r\n\r\n constructor(value: Expression) {\r\n super();\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"return\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.value?.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Enable\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Enable extends Statement {\r\n name: string;\r\n\r\n constructor(name: string) {\r\n super();\r\n this.name = name;\r\n }\r\n\r\n get astNodeType() {\r\n return \"enable\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Requires\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Requires extends Statement {\r\n extensions: string[];\r\n\r\n constructor(extensions: string[]) {\r\n super();\r\n this.extensions = extensions;\r\n }\r\n\r\n get astNodeType() {\r\n return \"requires\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Diagnostic\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Diagnostic extends Statement {\r\n severity: string;\r\n rule: string;\r\n\r\n constructor(severity: string, rule: string) {\r\n super();\r\n this.severity = severity;\r\n this.rule = rule;\r\n }\r\n\r\n get astNodeType() {\r\n return \"diagnostic\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Alias\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Alias extends Statement {\r\n name: string;\r\n type: Type;\r\n\r\n constructor(name: string, type: Type) {\r\n super();\r\n this.name = name;\r\n this.type = type;\r\n }\r\n\r\n get astNodeType() {\r\n return \"alias\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Discard\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Discard extends Statement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n get astNodeType() {\r\n return \"discard\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Break\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Break extends Statement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n get astNodeType() {\r\n return \"break\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Continue\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Continue extends Statement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n get astNodeType() {\r\n return \"continue\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Type\r\n * @extends Statement\r\n * @category AST\r\n */\r\nexport class Type extends Statement {\r\n name: string;\r\n attributes: Array<Attribute> | null;\r\n\r\n constructor(name: string) {\r\n super();\r\n this.name = name;\r\n }\r\n\r\n get astNodeType() {\r\n return \"type\";\r\n }\r\n\r\n get isStruct(): boolean {\r\n return false;\r\n }\r\n\r\n get isArray(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * @class StructType\r\n * @extends Type\r\n * @category AST\r\n */\r\nexport class Struct extends Type {\r\n members: Array<Member>;\r\n startLine: number;\r\n endLine: number;\r\n\r\n constructor(name: string, members: Array<Member>, startLine: number, endLine: number) {\r\n super(name);\r\n this.members = members;\r\n this.startLine = startLine;\r\n this.endLine = endLine;\r\n }\r\n\r\n get astNodeType() {\r\n return \"struct\";\r\n }\r\n\r\n get isStruct(): boolean {\r\n return true;\r\n }\r\n\r\n /// Return the index of the member with the given name, or -1 if not found.\r\n getMemberIndex(name: string): number {\r\n for (let i = 0; i < this.members.length; i++) {\r\n if (this.members[i].name == name) return i;\r\n }\r\n return -1;\r\n }\r\n}\r\n\r\n/**\r\n * @class TemplateType\r\n * @extends Type\r\n * @category AST\r\n */\r\nexport class TemplateType extends Type {\r\n format: Type | null;\r\n access: string | null;\r\n\r\n constructor(name: string, format: Type | null, access: string | null) {\r\n super(name);\r\n this.format = format;\r\n this.access = access;\r\n }\r\n\r\n get astNodeType() {\r\n return \"template\";\r\n }\r\n}\r\n\r\n/**\r\n * @class PointerType\r\n * @extends Type\r\n * @category AST\r\n */\r\nexport class PointerType extends Type {\r\n storage: string;\r\n type: Type | null;\r\n access: string | null;\r\n\r\n constructor(\r\n name: string,\r\n storage: string,\r\n type: Type | null,\r\n access: string | null\r\n ) {\r\n super(name);\r\n this.storage = storage;\r\n this.type = type;\r\n this.access = access;\r\n }\r\n\r\n get astNodeType() {\r\n return \"pointer\";\r\n }\r\n}\r\n\r\n/**\r\n * @class ArrayType\r\n * @extends Type\r\n * @category AST\r\n */\r\nexport class ArrayType extends Type {\r\n attributes: Array<Attribute> | null;\r\n format: Type | null;\r\n count: number;\r\n\r\n constructor(\r\n name: string,\r\n attributes: Array<Attribute> | null,\r\n format: Type | null,\r\n count: number\r\n ) {\r\n super(name);\r\n this.attributes = attributes;\r\n this.format = format;\r\n this.count = count;\r\n }\r\n\r\n get astNodeType() {\r\n return \"array\";\r\n }\r\n\r\n get isArray(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * @class SamplerType\r\n * @extends Type\r\n * @category AST\r\n */\r\nexport class SamplerType extends Type {\r\n format: Type | string | null;\r\n access: string | null;\r\n\r\n constructor(\r\n name: string,\r\n format: Type | string | null,\r\n access: string | null\r\n ) {\r\n super(name);\r\n this.format = format;\r\n this.access = access;\r\n }\r\n\r\n get astNodeType() {\r\n return \"sampler\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Expression\r\n * @extends Node\r\n * @category AST\r\n */\r\nexport class Expression extends Node {\r\n postfix: Expression | null;\r\n\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\n/**\r\n * @class StringExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class StringExpr extends Expression {\r\n value: string;\r\n\r\n constructor(value: string) {\r\n super();\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"stringExpr\";\r\n }\r\n\r\n toString(): string {\r\n return this.value;\r\n }\r\n\r\n evaluateString(): string {\r\n return this.value;\r\n }\r\n}\r\n\r\n/**\r\n * @class CreateExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class CreateExpr extends Expression {\r\n type: Type | null;\r\n args: Array<Expression> | null;\r\n\r\n constructor(type: Type | null, args: Array<Expression> | null) {\r\n super();\r\n this.type = type;\r\n this.args = args;\r\n }\r\n\r\n get astNodeType() {\r\n return \"createExpr\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n callback(this);\r\n if (this.args) {\r\n for (const node of this.args) {\r\n node.search(callback);\r\n }\r\n }\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n return this.args[0].evaluate(context);\r\n }\r\n}\r\n\r\n/**\r\n * @class CallExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class CallExpr extends Expression {\r\n name: string;\r\n args: Array<Expression> | null;\r\n\r\n constructor(name: string, args: Array<Expression> | null) {\r\n super();\r\n this.name = name;\r\n this.args = args;\r\n }\r\n\r\n get astNodeType() {\r\n return \"callExpr\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n switch (this.name) {\r\n case \"abs\":\r\n return Math.abs(this.args[0].evaluate(context));\r\n case \"acos\":\r\n return Math.acos(this.args[0].evaluate(context));\r\n case \"acosh\":\r\n return Math.acosh(this.args[0].evaluate(context));\r\n case \"asin\":\r\n return Math.asin(this.args[0].evaluate(context));\r\n case \"asinh\":\r\n return Math.asinh(this.args[0].evaluate(context));\r\n case \"atan\":\r\n return Math.atan(this.args[0].evaluate(context));\r\n case \"atan2\":\r\n return Math.atan2(\r\n this.args[0].evaluate(context),\r\n this.args[1].evaluate(context)\r\n );\r\n case \"atanh\":\r\n return Math.atanh(this.args[0].evaluate(context));\r\n case \"ceil\":\r\n return Math.ceil(this.args[0].evaluate(context));\r\n case \"clamp\":\r\n return Math.min(\r\n Math.max(\r\n this.args[0].evaluate(context),\r\n this.args[1].evaluate(context)\r\n ),\r\n this.args[2].evaluate(context)\r\n );\r\n case \"cos\":\r\n return Math.cos(this.args[0].evaluate(context));\r\n //case \"cross\":\r\n //TODO: (x[i] * y[j] - x[j] * y[i])\r\n case \"degrees\":\r\n return (this.args[0].evaluate(context) * 180) / Math.PI;\r\n //case \"determinant\":\r\n //TODO implement\r\n case \"distance\":\r\n return Math.sqrt(\r\n Math.pow(\r\n this.args[0].evaluate(context) - this.args[1].evaluate(context),\r\n 2\r\n )\r\n );\r\n case \"dot\":\r\n //TODO: (x[i] * y[i])\r\n case \"exp\":\r\n return Math.exp(this.args[0].evaluate(context));\r\n case \"exp2\":\r\n return Math.pow(2, this.args[0].evaluate(context));\r\n //case \"extractBits\":\r\n //TODO: implement\r\n //case \"firstLeadingBit\":\r\n //TODO: implement\r\n case \"floor\":\r\n return Math.floor(this.args[0].evaluate(context));\r\n case \"fma\":\r\n return (\r\n this.args[0].evaluate(context) * this.args[1].evaluate(context) +\r\n this.args[2].evaluate(context)\r\n );\r\n case \"fract\":\r\n return (\r\n this.args[0].evaluate(context) -\r\n Math.floor(this.args[0].evaluate(context))\r\n );\r\n //case \"frexp\":\r\n //TODO: implement\r\n case \"inverseSqrt\":\r\n return 1 / Math.sqrt(this.args[0].evaluate(context));\r\n //case \"length\":\r\n //TODO: implement\r\n case \"log\":\r\n return Math.log(this.args[0].evaluate(context));\r\n case \"log2\":\r\n return Math.log2(this.args[0].evaluate(context));\r\n case \"max\":\r\n return Math.max(\r\n this.args[0].evaluate(context),\r\n this.args[1].evaluate(context)\r\n );\r\n case \"min\":\r\n return Math.min(\r\n this.args[0].evaluate(context),\r\n this.args[1].evaluate(context)\r\n );\r\n case \"mix\":\r\n return (\r\n this.args[0].evaluate(context) *\r\n (1 - this.args[2].evaluate(context)) +\r\n this.args[1].evaluate(context) * this.args[2].evaluate(context)\r\n );\r\n case \"modf\":\r\n return (\r\n this.args[0].evaluate(context) -\r\n Math.floor(this.args[0].evaluate(context))\r\n );\r\n case \"pow\":\r\n return Math.pow(\r\n this.args[0].evaluate(context),\r\n this.args[1].evaluate(context)\r\n );\r\n case \"radians\":\r\n return (this.args[0].evaluate(context) * Math.PI) / 180;\r\n case \"round\":\r\n return Math.round(this.args[0].evaluate(context));\r\n case \"sign\":\r\n return Math.sign(this.args[0].evaluate(context));\r\n case \"sin\":\r\n return Math.sin(this.args[0].evaluate(context));\r\n case \"sinh\":\r\n return Math.sinh(this.args[0].evaluate(context));\r\n case \"saturate\":\r\n return Math.min(Math.max(this.args[0].evaluate(context), 0), 1);\r\n case \"smoothstep\":\r\n return (\r\n this.args[0].evaluate(context) *\r\n this.args[0].evaluate(context) *\r\n (3 - 2 * this.args[0].evaluate(context))\r\n );\r\n case \"sqrt\":\r\n return Math.sqrt(this.args[0].evaluate(context));\r\n case \"step\":\r\n return this.args[0].evaluate(context) < this.args[1].evaluate(context)\r\n ? 0\r\n : 1;\r\n case \"tan\":\r\n return Math.tan(this.args[0].evaluate(context));\r\n case \"tanh\":\r\n return Math.tanh(this.args[0].evaluate(context));\r\n case \"trunc\":\r\n return Math.trunc(this.args[0].evaluate(context));\r\n default:\r\n throw new Error(\"Non const function: \" + this.name);\r\n }\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n for (const node of this.args) {\r\n node.search(callback);\r\n }\r\n callback(this);\r\n }\r\n}\r\n\r\n/**\r\n * @class VariableExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class VariableExpr extends Expression {\r\n name: string;\r\n\r\n constructor(name: string) {\r\n super();\r\n this.name = name;\r\n }\r\n\r\n get astNodeType() {\r\n return \"varExpr\";\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n callback(this);\r\n if (this.postfix) {\r\n this.postfix.search(callback);\r\n }\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n const constant = context.constants.get(this.name);\r\n if (!constant) {\r\n throw new Error(\"Cannot evaluate node\");\r\n }\r\n return constant.evaluate(context);\r\n }\r\n}\r\n\r\n/**\r\n * @class ConstExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class ConstExpr extends Expression {\r\n name: string;\r\n initializer: Expression;\r\n\r\n constructor(name: string, initializer: Expression) {\r\n super();\r\n this.name = name;\r\n this.initializer = initializer;\r\n }\r\n\r\n get astNodeType() {\r\n return \"constExpr\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n if (this.initializer instanceof CreateExpr) {\r\n // This is a struct constant\r\n const property = this.postfix?.evaluateString(context);\r\n const type = this.initializer.type?.name;\r\n const struct = context.structs.get(type);\r\n const memberIndex = struct?.getMemberIndex(property);\r\n if (memberIndex !== undefined && memberIndex != -1) {\r\n const value = this.initializer.args[memberIndex].evaluate(context);\r\n return value;\r\n } else {\r\n return this.initializer.evaluate(context);\r\n }\r\n console.log(memberIndex);\r\n }\r\n\r\n return this.initializer.evaluate(context);\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.initializer.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class LiteralExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class LiteralExpr extends Expression {\r\n value: number;\r\n\r\n constructor(value: number) {\r\n super();\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"literalExpr\";\r\n }\r\n\r\n evaluate(): number {\r\n return this.value;\r\n }\r\n}\r\n\r\n/**\r\n * @class BitcastExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class BitcastExpr extends Expression {\r\n type: Type | null;\r\n value: Expression;\r\n\r\n constructor(type: Type | null, value: Expression) {\r\n super();\r\n this.type = type;\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"bitcastExpr\";\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.value.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class TypecastExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class TypecastExpr extends Expression {\r\n type: Type | null;\r\n args: Array<Expression> | null;\r\n\r\n constructor(type: Type | null, args: Array<Expression> | null) {\r\n super();\r\n this.type = type;\r\n this.args = args;\r\n }\r\n\r\n get astNodeType() {\r\n return \"typecastExpr\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n return this.args[0].evaluate(context);\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.searchBlock(this.args, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class GroupingExpr\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class GroupingExpr extends Expression {\r\n contents: Array<Expression>;\r\n\r\n constructor(contents: Array<Expression>) {\r\n super();\r\n this.contents = contents;\r\n }\r\n\r\n get astNodeType() {\r\n return \"groupExpr\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n return this.contents[0].evaluate(context);\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.searchBlock(this.contents, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class ArrayIndex\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class ArrayIndex extends Expression {\r\n index: Expression;\r\n constructor(index: Expression) {\r\n super();\r\n this.index = index;\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.index.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Operator\r\n * @extends Expression\r\n * @category AST\r\n */\r\nexport class Operator extends Expression {\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\n/**\r\n * @class UnaryOperator\r\n * @extends Operator\r\n * @category AST\r\n * @property {string} operator +, -, !, ~\r\n */\r\nexport class UnaryOperator extends Operator {\r\n operator: string;\r\n right: Expression;\r\n\r\n constructor(operator: string, right: Expression) {\r\n super();\r\n this.operator = operator;\r\n this.right = right;\r\n }\r\n\r\n get astNodeType() {\r\n return \"unaryOp\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n switch (this.operator) {\r\n case \"+\":\r\n return this.right.evaluate(context);\r\n case \"-\":\r\n return -this.right.evaluate(context);\r\n case \"!\":\r\n return this.right.evaluate(context) ? 0 : 1;\r\n case \"~\":\r\n return ~this.right.evaluate(context);\r\n default:\r\n throw new Error(\"Unknown unary operator: \" + this.operator);\r\n }\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.right.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class BinaryOperator\r\n * @extends Operator\r\n * @category AST\r\n * @property {string} operator +, -, *, /, %, ==, !=, <, >, <=, >=, &&, ||\r\n */\r\nexport class BinaryOperator extends Operator {\r\n operator: string;\r\n left: Expression;\r\n right: Expression;\r\n\r\n constructor(operator: string, left: Expression, right: Expression) {\r\n super();\r\n this.operator = operator;\r\n this.left = left;\r\n this.right = right;\r\n }\r\n\r\n get astNodeType() {\r\n return \"binaryOp\";\r\n }\r\n\r\n evaluate(context: ParseContext): number {\r\n switch (this.operator) {\r\n case \"+\":\r\n return this.left.evaluate(context) + this.right.evaluate(context);\r\n case \"-\":\r\n return this.left.evaluate(context) - this.right.evaluate(context);\r\n case \"*\":\r\n return this.left.evaluate(context) * this.right.evaluate(context);\r\n case \"/\":\r\n return this.left.evaluate(context) / this.right.evaluate(context);\r\n case \"%\":\r\n return this.left.evaluate(context) % this.right.evaluate(context);\r\n case \"==\":\r\n return this.left.evaluate(context) == this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n case \"!=\":\r\n return this.left.evaluate(context) != this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n case \"<\":\r\n return this.left.evaluate(context) < this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n case \">\":\r\n return this.left.evaluate(context) > this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n case \"<=\":\r\n return this.left.evaluate(context) <= this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n case \">=\":\r\n return this.left.evaluate(context) >= this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n case \"&&\":\r\n return this.left.evaluate(context) && this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n case \"||\":\r\n return this.left.evaluate(context) || this.right.evaluate(context)\r\n ? 1\r\n : 0;\r\n default:\r\n throw new Error(`Unknown operator ${this.operator}`);\r\n }\r\n }\r\n\r\n search(callback: (node: Node) => void) {\r\n this.left.search(callback);\r\n this.right.search(callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class SwitchCase\r\n * @extends Node\r\n * @category AST\r\n */\r\nexport class SwitchCase extends Node {\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\n/**\r\n * @class Case\r\n * @extends SwitchCase\r\n * @category AST\r\n */\r\nexport class Case extends SwitchCase {\r\n selector: Array<Expression>;\r\n body: Array<Statement>;\r\n\r\n constructor(selector: Array<Expression>, body: Array<Statement>) {\r\n super();\r\n this.selector = selector;\r\n this.body = body;\r\n }\r\n\r\n get astNodeType() {\r\n return \"case\";\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.searchBlock(this.body, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Default\r\n * @extends SwitchCase\r\n * @category AST\r\n */\r\nexport class Default extends SwitchCase {\r\n body: Array<Statement>;\r\n\r\n constructor(body: Array<Statement>) {\r\n super();\r\n this.body = body;\r\n }\r\n\r\n get astNodeType() {\r\n return \"default\";\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.searchBlock(this.body, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Argument\r\n * @extends Node\r\n * @category AST\r\n */\r\nexport class Argument extends Node {\r\n name: string;\r\n type: Type;\r\n attributes: Array<Attribute> | null;\r\n\r\n constructor(name: string, type: Type, attributes: Array<Attribute> | null) {\r\n super();\r\n this.name = name;\r\n this.type = type;\r\n this.attributes = attributes;\r\n }\r\n\r\n get astNodeType() {\r\n return \"argument\";\r\n }\r\n}\r\n\r\n/**\r\n * @class ElseIf\r\n * @extends Node\r\n * @category AST\r\n */\r\nexport class ElseIf extends Node {\r\n condition: Expression;\r\n body: Array<Statement>;\r\n\r\n constructor(condition: Expression, body: Array<Statement>) {\r\n super();\r\n this.condition = condition;\r\n this.body = body;\r\n }\r\n\r\n get astNodeType() {\r\n return \"elseif\";\r\n }\r\n\r\n search(callback: (node: Node) => void): void {\r\n this.condition.search(callback);\r\n this.searchBlock(this.body, callback);\r\n }\r\n}\r\n\r\n/**\r\n * @class Member\r\n * @extends Node\r\n * @category AST\r\n */\r\nexport class Member extends Node {\r\n name: string;\r\n type: Type | null;\r\n attributes: Array<Attribute> | null;\r\n\r\n constructor(\r\n name: string,\r\n type: Type | null,\r\n attributes: Array<Attribute> | null\r\n ) {\r\n super();\r\n this.name = name;\r\n this.type = type;\r\n this.attributes = attributes;\r\n }\r\n\r\n get astNodeType() {\r\n return \"member\";\r\n }\r\n}\r\n\r\n/**\r\n * @class Attribute\r\n * @extends Node\r\n * @category AST\r\n */\r\nexport class Attribute extends Node {\r\n name: string;\r\n value: string | Array<string> | null;\r\n\r\n constructor(name: string, value: string | Array<string> | null) {\r\n super();\r\n this.name = name;\r\n this.value = value;\r\n }\r\n\r\n get astNodeType() {\r\n return \"attribute\";\r\n }\r\n}\r\n","export enum TokenClass {\r\n token,\r\n keyword,\r\n reserved,\r\n}\r\n\r\nexport class TokenType {\r\n name: string;\r\n type: TokenClass;\r\n rule: RegExp | string;\r\n\r\n constructor(name: string, type: TokenClass, rule: RegExp | string) {\r\n this.name = name;\r\n this.type = type;\r\n this.rule = rule;\r\n }\r\n\r\n toString(): string {\r\n return this.name;\r\n }\r\n}\r\n\r\n/// Catalog of defined token types, keywords, and reserved words.\r\nexport class TokenTypes {\r\n static readonly none = new TokenType(\"\", TokenClass.reserved, \"\");\r\n static readonly eof = new TokenType(\"EOF\", TokenClass.token, \"\");\r\n\r\n static readonly reserved = {\r\n asm: new TokenType(\"asm\", TokenClass.reserved, \"asm\"),\r\n bf16: new TokenType(\"bf16\", TokenClass.reserved, \"bf16\"),\r\n do: new TokenType(\"do\", TokenClass.reserved, \"do\"),\r\n enum: new TokenType(\"enum\", TokenClass.reserved, \"enum\"),\r\n f16: new TokenType(\"f16\", TokenClass.reserved, \"f16\"),\r\n f64: new TokenType(\"f64\", TokenClass.reserved, \"f64\"),\r\n handle: new TokenType(\"handle\", TokenClass.reserved, \"handle\"),\r\n i8: new TokenType(\"i8\", TokenClass.reserved, \"i8\"),\r\n i16: new TokenType(\"i16\", TokenClass.reserved, \"i16\"),\r\n i64: new TokenType(\"i64\", TokenClass.reserved, \"i64\"),\r\n mat: new TokenType(\"mat\", TokenClass.reserved, \"mat\"),\r\n premerge: new TokenType(\"premerge\", TokenClass.reserved, \"premerge\"),\r\n regardless: new TokenType(\"regardless\", TokenClass.reserved, \"regardless\"),\r\n typedef: new TokenType(\"typedef\", TokenClass.reserved, \"typedef\"),\r\n u8: new TokenType(\"u8\", TokenClass.reserved, \"u8\"),\r\n u16: new TokenType(\"u16\", TokenClass.reserved, \"u16\"),\r\n u64: new TokenType(\"u64\", TokenClass.reserved, \"u64\"),\r\n unless: new TokenType(\"unless\", TokenClass.reserved, \"unless\"),\r\n using: new TokenType(\"using\", TokenClass.reserved, \"using\"),\r\n vec: new TokenType(\"vec\", TokenClass.reserved, \"vec\"),\r\n void: new TokenType(\"void\", TokenClass.reserved, \"void\"),\r\n };\r\n\r\n static readonly keywords = {\r\n array: new TokenType(\"array\", TokenClass.keyword, \"array\"),\r\n atomic: new TokenType(\"atomic\", TokenClass.keyword, \"atomic\"),\r\n bool: new TokenType(\"bool\", TokenClass.keyword, \"bool\"),\r\n f32: new TokenType(\"f32\", TokenClass.keyword, \"f32\"),\r\n i32: new TokenType(\"i32\", TokenClass.keyword, \"i32\"),\r\n mat2x2: new TokenType(\"mat2x2\", TokenClass.keyword, \"mat2x2\"),\r\n mat2x3: new TokenType(\"mat2x3\", TokenClass.keyword, \"mat2x3\"),\r\n mat2x4: new TokenType(\"mat2x4\", TokenClass.keyword, \"mat2x4\"),\r\n mat3x2: new TokenType(\"mat3x2\", TokenClass.keyword, \"mat3x2\"),\r\n mat3x3: new TokenType(\"mat3x3\", TokenClass.keyword, \"mat3x3\"),\r\n mat3x4: new TokenType(\"mat3x4\", TokenClass.keyword, \"mat3x4\"),\r\n mat4x2: new TokenType(\"mat4x2\", TokenClass.keyword, \"mat4x2\"),\r\n mat4x3: new TokenType(\"mat4x3\", TokenClass.keyword, \"mat4x3\"),\r\n mat4x4: new TokenType(\"mat4x4\", TokenClass.keyword, \"mat4x4\"),\r\n ptr: new TokenType(\"ptr\", TokenClass.keyword, \"ptr\"),\r\n sampler: new TokenType(\"sampler\", TokenClass.keyword, \"sampler\"),\r\n sampler_comparison: new TokenType(\r\n \"sampler_comparison\",\r\n TokenClass.keyword,\r\n \"sampler_comparison\"\r\n ),\r\n struct: new TokenType(\"struct\", TokenClass.keyword, \"struct\"),\r\n texture_1d: new TokenType(\"texture_1d\", TokenClass.keyword, \"texture_1d\"),\r\n texture_2d: new TokenType(\"texture_2d\", TokenClass.keyword, \"texture_2d\"),\r\n texture_2d_array: new TokenType(\r\n \"texture_2d_array\",\r\n TokenClass.keyword,\r\n \"texture_2d_array\"\r\n ),\r\n texture_3d: new TokenType(\"texture_3d\", TokenClass.keyword, \"texture_3d\"),\r\n texture_cube: new TokenType(\r\n \"texture_cube\",\r\n TokenClass.keyword,\r\n \"texture_cube\"\r\n ),\r\n texture_cube_array: new TokenType(\r\n \"texture_cube_array\",\r\n TokenClass.keyword,\r\n \"texture_cube_array\"\r\n ),\r\n texture_multisampled_2d: new TokenType(\r\n \"texture_multisampled_2d\",\r\n TokenClass.keyword,\r\n \"texture_multisampled_2d\"\r\n ),\r\n texture_storage_1d: new TokenType(\r\n \"texture_storage_1d\",\r\n TokenClass.keyword,\r\n \"texture_storage_1d\"\r\n ),\r\n texture_storage_2d: new TokenType(\r\n \"texture_storage_2d\",\r\n TokenClass.keyword,\r\n \"texture_storage_2d\"\r\n ),\r\n texture_storage_2d_array: new TokenType(\r\n \"texture_storage_2d_array\",\r\n TokenClass.keyword,\r\n \"texture_storage_2d_array\"\r\n ),\r\n texture_storage_3d: new TokenType(\r\n \"texture_storage_3d\",\r\n TokenClass.keyword,\r\n \"texture_storage_3d\"\r\n ),\r\n texture_depth_2d: new TokenType(\r\n \"texture_depth_2d\",\r\n TokenClass.keyword,\r\n \"texture_depth_2d\"\r\n ),\r\n texture_depth_2d_array: new TokenType(\r\n \"texture_depth_2d_array\",\r\n TokenClass.keyword,\r\n \"texture_depth_2d_array\"\r\n ),\r\n texture_depth_cube: new TokenType(\r\n \"texture_depth_cube\",\r\n TokenClass.keyword,\r\n \"texture_depth_cube\"\r\n ),\r\n texture_depth_cube_array: new TokenType(\r\n \"texture_depth_cube_array\",\r\n TokenClass.keyword,\r\n \"texture_depth_cube_array\"\r\n ),\r\n texture_depth_multisampled_2d: new TokenType(\r\n \"texture_depth_multisampled_2d\",\r\n TokenClass.keyword,\r\n \"texture_depth_multisampled_2d\"\r\n ),\r\n texture_external: new TokenType(\r\n \"texture_external\",\r\n TokenClass.keyword,\r\n \"texture_external\"\r\n ),\r\n u32: new TokenType(\"u32\", TokenClass.keyword, \"u32\"),\r\n vec2: new TokenType(\"vec2\", TokenClass.keyword, \"vec2\"),\r\n vec3: new TokenType(\"vec3\", TokenClass.keyword, \"vec3\"),\r\n vec4: new TokenType(\"vec4\", TokenClass.keyword, \"vec4\"),\r\n bitcast: new TokenType(\"bitcast\", TokenClass.keyword, \"bitcast\"),\r\n block: new TokenType(\"block\", TokenClass.keyword, \"block\"),\r\n break: new TokenType(\"break\", TokenClass.keyword, \"break\"),\r\n case: new TokenType(\"case\", TokenClass.keyword, \"case\"),\r\n continue: new TokenType(\"continue\", TokenClass.keyword, \"continue\"),\r\n continuing: new TokenType(\"continuing\", TokenClass.keyword, \"continuing\"),\r\n default: new TokenType(\"default\", TokenClass.keyword, \"default\"),\r\n diagnostic: new TokenType(\"diagnostic\", TokenClass.keyword, \"diagnostic\"),\r\n discard: new TokenType(\"discard\", TokenClass.keyword, \"discard\"),\r\n else: new TokenType(\"else\", TokenClass.keyword, \"else\"),\r\n enable: new TokenType(\"enable\", TokenClass.keyword, \"enable\"),\r\n fallthrough: new TokenType(\r\n \"fallthrough\",\r\n TokenClass.keyword,\r\n \"fallthrough\"\r\n ),\r\n false: new TokenType(\"false\", TokenClass.keyword, \"false\"),\r\n fn: new TokenType(\"fn\", TokenClass.keyword, \"fn\"),\r\n for: new TokenType(\"for\", TokenClass.keyword, \"for\"),\r\n function: new TokenType(\"function\", TokenClass.keyword, \"function\"),\r\n if: new TokenType(\"if\", TokenClass.keyword, \"if\"),\r\n let: new TokenType(\"let\", TokenClass.keyword, \"let\"),\r\n const: new TokenType(\"const\", TokenClass.keyword, \"const\"),\r\n loop: new TokenType(\"loop\", TokenClass.keyword, \"loop\"),\r\n while: new TokenType(\"while\", TokenClass.keyword, \"while\"),\r\n private: new TokenType(\"private\", TokenClass.keyword, \"private\"),\r\n read: new TokenType(\"read\", TokenClass.keyword, \"read\"),\r\n read_write: new TokenType(\"read_write\", TokenClass.keyword, \"read_write\"),\r\n return: new TokenType(\"return\", TokenClass.keyword, \"return\"),\r\n requires: new TokenType(\"requires\", TokenClass.keyword, \"requires\"),\r\n storage: new TokenType(\"storage\", TokenClass.keyword, \"storage\"),\r\n switch: new TokenType(\"switch\", TokenClass.keyword, \"switch\"),\r\n true: new TokenType(\"true\", TokenClass.keyword, \"true\"),\r\n alias: new TokenType(\"alias\", TokenClass.keyword, \"alias\"),\r\n type: new TokenType(\"type\", TokenClass.keyword, \"type\"),\r\n uniform: new TokenType(\"uniform\", TokenClass.keyword, \"uniform\"),\r\n var: new TokenType(\"var\", TokenClass.keyword, \"var\"),\r\n override: new TokenType(\"override\", TokenClass.keyword, \"override\"),\r\n workgroup: new TokenType(\"workgroup\", TokenClass.keyword, \"workgroup\"),\r\n write: new TokenType(\"write\", TokenClass.keyword, \"write\"),\r\n r8unorm: new TokenType(\"r8unorm\", TokenClass.keyword, \"r8unorm\"),\r\n r8snorm: new TokenType(\"r8snorm\", TokenClass.keyword, \"r8snorm\"),\r\n r8uint: new TokenType(\"r8uint\", TokenClass.keyword, \"r8uint\"),\r\n r8sint: new TokenType(\"r8sint\", TokenClass.keyword, \"r8sint\"),\r\n r16uint: new TokenType(\"r16uint\", TokenClass.keyword, \"r16uint\"),\r\n r16sint: new TokenType(\"r16sint\", TokenClass.keyword, \"r16sint\"),\r\n r16float: new TokenType(\"r16float\", TokenClass.keyword, \"r16float\"),\r\n rg8unorm: new TokenType(\"rg8unorm\", TokenClass.keyword, \"rg8unorm\"),\r\n rg8snorm: new TokenType(\"rg8snorm\", TokenClass.keyword, \"rg8snorm\"),\r\n rg8uint: new TokenType(\"rg8uint\", TokenClass.keyword, \"rg8uint\"),\r\n rg8sint: new TokenType(\"rg8sint\", TokenClass.keyword, \"rg8sint\"),\r\n r32uint: new TokenType(\"r32uint\", TokenClass.keyword, \"r32uint\"),\r\n r32sint: new TokenType(\"r32sint\", TokenClass.keyword, \"r32sint\"),\r\n r32float: new TokenType(\"r32float\", TokenClass.keyword, \"r32float\"),\r\n rg16uint: new TokenType(\"rg16uint\", TokenClass.keyword, \"rg16uint\"),\r\n rg16sint: new TokenType(\"rg16sint\", TokenClass.keyword, \"rg16sint\"),\r\n rg16float: new TokenType(\"rg16float\", TokenClass.keyword, \"rg16float\"),\r\n rgba8unorm: new TokenType(\"rgba8unorm\", TokenClass.keyword, \"rgba8unorm\"),\r\n rgba8unorm_srgb: new TokenType(\r\n \"rgba8unorm_srgb\",\r\n TokenClass.keyword,\r\n \"rgba8unorm_srgb\"\r\n ),\r\n rgba8snorm: new TokenType(\"rgba8snorm\", TokenClass.keyword, \"rgba8snorm\"),\r\n rgba8uint: new TokenType(\"rgba8uint\", TokenClass.keyword, \"rgba8uint\"),\r\n rgba8sint: new TokenType(\"rgba8sint\", TokenClass.keyword, \"rgba8sint\"),\r\n bgra8unorm: new TokenType(\"bgra8unorm\", TokenClass.keyword, \"bgra8unorm\"),\r\n bgra8unorm_srgb: new TokenType(\r\n \"bgra8unorm_srgb\",\r\n TokenClass.keyword,\r\n \"bgra8unorm_srgb\"\r\n ),\r\n rgb10a2unorm: new TokenType(\r\n \"rgb10a2unorm\",\r\n TokenClass.keyword,\r\n \"rgb10a2unorm\"\r\n ),\r\n rg11b10float: new TokenType(\r\n \"rg11b10float\",\r\n TokenClass.keyword,\r\n \"rg11b10float\"\r\n ),\r\n rg32uint: new TokenType(\"rg32uint\", TokenClass.keyword, \"rg32uint\"),\r\n rg32sint: new TokenType(\"rg32sint\", TokenClass.keyword, \"rg32sint\"),\r\n rg32float: new TokenType(\"rg32float\", TokenClass.keyword, \"rg32float\"),\r\n rgba16uint: new TokenType(\"rgba16uint\", TokenClass.keyword, \"rgba16uint\"),\r\n rgba16sint: new TokenType(\"rgba16sint\", TokenClass.keyword, \"rgba16sint\"),\r\n rgba16float: new TokenType(\r\n \"rgba16float\",\r\n TokenClass.keyword,\r\n \"rgba16float\"\r\n ),\r\n rgba32uint: new TokenType(\"rgba32uint\", TokenClass.keyword, \"rgba32uint\"),\r\n rgba32sint: new TokenType(\"rgba32sint\", TokenClass.keyword, \"rgba32sint\"),\r\n rgba32float: new TokenType(\r\n \"rgba32float\",\r\n TokenClass.keyword,\r\n \"rgba32float\"\r\n ),\r\n static_assert: new TokenType(\r\n \"static_assert\",\r\n TokenClass.keyword,\r\n \"static_assert\"\r\n ),\r\n\r\n // WGSL grammar has a few keywords that have different token names than the strings they\r\n // represent. Aliasing them here.\r\n /*int32: new TokenType(\"i32\", TokenClass.keyword, \"i32\"),\r\n uint32: new TokenType(\"u32\", TokenClass.keyword, \"u32\"),\r\n float32: new TokenType(\"f32\", TokenClass.keyword, \"f32\"),\r\n pointer: new TokenType(\"ptr\", TokenClass.keyword, \"ptr\"),*/\r\n };\r\n\r\n static readonly tokens = {\r\n decimal_float_literal: new TokenType(\r\n \"decimal_float_literal\",\r\n TokenClass.token,\r\n /((-?[0-9]*\\.[0-9]+|-?[0-9]+\\.[0-9]*)((e|E)(\\+|-)?[0-9]+)?f?)|(-?[0-9]+(e|E)(\\+|-)?[0-9]+f?)|([0-9]+f)/\r\n ),\r\n hex_float_literal: new TokenType(\r\n \"hex_float_literal\",\r\n TokenClass.token,\r\n /-?0x((([0-9a-fA-F]*\\.[0-9a-fA-F]+|[0-9a-fA-F]+\\.[0-9a-fA-F]*)((p|P)(\\+|-)?[0-9]+f?)?)|([0-9a-fA-F]+(p|P)(\\+|-)?[0-9]+f?))/\r\n ),\r\n int_literal: new TokenType(\r\n \"int_literal\",\r\n TokenClass.token,\r\n /-?0x[0-9a-fA-F]+|0i?|-?[1-9][0-9]*i?/\r\n ),\r\n uint_literal: new TokenType(\r\n \"uint_literal\",\r\n TokenClass.token,\r\n /0x[0-9a-fA-F]+u|0u|[1-9][0-9]*u/\r\n ),\r\n ident: new TokenType(\"ident\", TokenClass.token, /[_a-zA-Z][0-9a-zA-Z_]*/),\r\n and: new TokenType(\"and\", TokenClass.token, \"&\"),\r\n and_and: new TokenType(\"and_and\", TokenClass.token, \"&&\"),\r\n arrow: new TokenType(\"arrow \", TokenClass.token, \"->\"),\r\n attr: new TokenType(\"attr\", TokenClass.token, \"@\"),\r\n forward_slash: new TokenType(\"forward_slash\", TokenClass.token, \"/\"),\r\n bang: new TokenType(\"bang\", TokenClass.token, \"!\"),\r\n bracket_left: new TokenType(\"bracket_left\", TokenClass.token, \"[\"),\r\n bracket_right: new TokenType(\"bracket_right\", TokenClass.token, \"]\"),\r\n brace_left: new TokenType(\"brace_left\", TokenClass.token, \"{\"),\r\n brace_right: new TokenType(\"brace_right\", TokenClass.token, \"}\"),\r\n colon: new TokenType(\"colon\", TokenClass.token, \":\"),\r\n comma: new TokenType(\"comma\", TokenClass.token, \",\"),\r\n equal: new TokenType(\"equal\", TokenClass.token, \"=\"),\r\n equal_equal: new TokenType(\"equal_equal\", TokenClass.token, \"==\"),\r\n not_equal: new TokenType(\"not_equal\", TokenClass.token, \"!=\"),\r\n greater_than: new TokenType(\"greater_than\", TokenClass.token, \">\"),\r\n greater_than_equal: new TokenType(\r\n \"greater_than_equal\",\r\n TokenClass.token,\r\n \">=\"\r\n ),\r\n shift_right: new TokenType(\"shift_right\", TokenClass.token, \">>\"),\r\n less_than: new TokenType(\"less_than\", TokenClass.token, \"<\"),\r\n less_than_equal: new TokenType(\"less_than_equal\", TokenClass.token, \"<=\"),\r\n shift_left: new TokenType(\"shift_left\", TokenClass.token, \"<<\"),\r\n modulo: new TokenType(\"modulo\", TokenClass.token, \"%\"),\r\n minus: new TokenType(\"minus\", TokenClass.token, \"-\"),\r\n minus_minus: new TokenType(\"minus_minus\", TokenClass.token, \"--\"),\r\n period: new TokenType(\"period\", TokenClass.token, \".\"),\r\n plus: new TokenType(\"plus\", TokenClass.token, \"+\"),\r\n plus_plus: new TokenType(\"plus_plus\", TokenClass.token, \"++\"),\r\n or: new TokenType(\"or\", TokenClass.token, \"|\"),\r\n or_or: new TokenType(\"or_or\", TokenClass.token, \"||\"),\r\n paren_left: new TokenType(\"paren_left\", TokenClass.token, \"(\"),\r\n paren_right: new TokenType(\"paren_right\", TokenClass.token, \")\"),\r\n semicolon: new TokenType(\"semicolon\", TokenClass.token, \";\"),\r\n star: new TokenType(\"star\", TokenClass.token, \"*\"),\r\n tilde: new TokenType(\"tilde\", TokenClass.token, \"~\"),\r\n underscore: new TokenType(\"underscore\", TokenClass.token, \"_\"),\r\n xor: new TokenType(\"xor\", TokenClass.token, \"^\"),\r\n plus_equal: new TokenType(\"plus_equal\", TokenClass.token, \"+=\"),\r\n minus_equal: new TokenType(\"minus_equal\", TokenClass.token, \"-=\"),\r\n times_equal: new TokenType(\"times_equal\", TokenClass.token, \"*=\"),\r\n division_equal: new TokenType(\"division_equal\", TokenClass.token, \"/=\"),\r\n modulo_equal: new TokenType(\"modulo_equal\", TokenClass.token, \"%=\"),\r\n and_equal: new TokenType(\"and_equal\", TokenClass.token, \"&=\"),\r\n or_equal: new TokenType(\"or_equal\", TokenClass.token, \"|=\"),\r\n xor_equal: new TokenType(\"xor_equal\", TokenClass.token, \"^=\"),\r\n shift_right_equal: new TokenType(\r\n \"shift_right_equal\",\r\n TokenClass.token,\r\n \">>=\"\r\n ),\r\n shift_left_equal: new TokenType(\r\n \"shift_left_equal\",\r\n TokenClass.token,\r\n \"<<=\"\r\n ),\r\n };\r\n\r\n static readonly simpleTokens = {\r\n \"@\": this.tokens.attr,\r\n \"{\": this.tokens.brace_left,\r\n \"}\": this.tokens.brace_right,\r\n \":\": this.tokens.colon,\r\n \",\": this.tokens.comma,\r\n \"(\": this.tokens.paren_left,\r\n \")\": this.tokens.paren_right,\r\n \";\": this.tokens.semicolon,\r\n };\r\n\r\n static readonly literalTokens = {\r\n \"&\": this.tokens.and,\r\n \"&&\": this.tokens.and_and,\r\n \"->\": this.tokens.arrow ,\r\n \"/\": this.tokens.forward_slash,\r\n \"!\": this.tokens.bang,\r\n \"[\": this.tokens.bracket_left,\r\n \"]\": this.tokens.bracket_right,\r\n \"=\": this.tokens.equal,\r\n \"==\": this.tokens.equal_equal,\r\n \"!=\": this.tokens.not_equal,\r\n \">\": this.tokens.greater_than,\r\n \">=\": this.tokens.greater_than_equal,\r\n \">>\": this.tokens.shift_right,\r\n \"<\": this.tokens.less_than,\r\n \"<=\": this.tokens.less_than_equal,\r\n \"<<\": this.tokens.shift_left,\r\n \"%\": this.tokens.modulo,\r\n \"-\": this.tokens.minus,\r\n \"--\": this.tokens.minus_minus,\r\n \".\": this.tokens.period,\r\n \"+\": this.tokens.plus,\r\n \"++\": this.tokens.plus_plus,\r\n \"|\": this.tokens.or,\r\n \"||\": this.tokens.or_or,\r\n \"*\": this.tokens.star,\r\n \"~\": this.tokens.tilde,\r\n \"_\": this.tokens.underscore,\r\n \"^\": this.tokens.xor,\r\n \"+=\": this.tokens.plus_equal,\r\n \"-=\": this.tokens.minus_equal,\r\n \"*=\": this.tokens.times_equal,\r\n \"/=\": this.tokens.division_equal,\r\n \"%=\": this.tokens.modulo_equal,\r\n \"&=\": this.tokens.and_equal,\r\n \"|=\": this.tokens.or_equal,\r\n \"^=\": this.tokens.xor_equal,\r\n \">>=\": this.tokens.shift_right_equal,\r\n \"<<=\": this.tokens.shift_left_equal,\r\n };\r\n\r\n static readonly regexTokens = {\r\n decimal_float_literal: this.tokens.decimal_float_literal,\r\n hex_float_literal: this.tokens.hex_float_literal,\r\n int_literal: this.tokens.int_literal,\r\n uint_literal: this.tokens.uint_literal,\r\n ident: this.tokens.ident,\r\n };\r\n\r\n static readonly storage_class = [\r\n this.keywords.function,\r\n this.keywords.private,\r\n this.keywords.workgroup,\r\n this.keywords.uniform,\r\n this.keywords.storage,\r\n ];\r\n\r\n static readonly access_mode = [\r\n this.keywords.read,\r\n this.keywords.write,\r\n this.keywords.read_write,\r\n ];\r\n\r\n static readonly sampler_type = [\r\n this.keywords.sampler,\r\n this.keywords.sampler_comparison,\r\n ];\r\n\r\n static readonly sampled_texture_type = [\r\n this.keywords.texture_1d,\r\n this.keywords.texture_2d,\r\n this.keywords.texture_2d_array,\r\n this.keywords.texture_3d,\r\n this.keywords.texture_cube,\r\n this.keywords.texture_cube_array,\r\n ];\r\n\r\n static readonly multisampled_texture_type = [\r\n this.keywords.texture_multisampled_2d,\r\n ];\r\n\r\n static readonly storage_texture_type = [\r\n this.keywords.texture_storage_1d,\r\n this.keywords.texture_storage_2d,\r\n this.keywords.texture_storage_2d_array,\r\n this.keywords.texture_storage_3d,\r\n ];\r\n\r\n static readonly depth_texture_type = [\r\n this.keywords.texture_depth_2d,\r\n this.keywords.texture_depth_2d_array,\r\n this.keywords.texture_depth_cube,\r\n this.keywords.texture_depth_cube_array,\r\n this.keywords.texture_depth_multisampled_2d,\r\n ];\r\n\r\n static readonly texture_external_type = [this.keywords.texture_external];\r\n\r\n static readonly any_texture_type = [\r\n ...this.sampled_texture_type,\r\n ...this.multisampled_texture_type,\r\n ...this.storage_texture_type,\r\n ...this.depth_texture_type,\r\n ...this.texture_external_type,\r\n ];\r\n\r\n static readonly texel_format = [\r\n this.keywords.r8unorm,\r\n this.keywords.r8snorm,\r\n this.keywords.r8uint,\r\n this.keywords.r8sint,\r\n this.keywords.r16uint,\r\n this.keywords.r16sint,\r\n this.keywords.r16float,\r\n this.keywords.rg8unorm,\r\n this.keywords.rg8snorm,\r\n this.keywords.rg8uint,\r\n this.keywords.rg8sint,\r\n this.keywords.r32uint,\r\n this.keywords.r32sint,\r\n this.keywords.r32float,\r\n this.keywords.rg16uint,\r\n this.keywords.rg16sint,\r\n this.keywords.rg16float,\r\n this.keywords.rgba8unorm,\r\n this.keywords.rgba8unorm_srgb,\r\n this.keywords.rgba8snorm,\r\n this.keywords.rgba8uint,\r\n this.keywords.rgba8sint,\r\n this.keywords.bgra8unorm,\r\n this.keywords.bgra8unorm_srgb,\r\n this.keywords.rgb10a2unorm,\r\n this.keywords.rg11b10float,\r\n this.keywords.rg32uint,\r\n this.keywords.rg32sint,\r\n this.keywords.rg32float,\r\n this.keywords.rgba16uint,\r\n this.keywords.rgba16sint,\r\n this.keywords.rgba16float,\r\n this.keywords.rgba32uint,\r\n this.keywords.rgba32sint,\r\n this.keywords.rgba32float,\r\n ];\r\n\r\n static readonly const_literal = [\r\n this.tokens.int_literal,\r\n this.tokens.uint_literal,\r\n this.tokens.decimal_float_literal,\r\n this.tokens.hex_float_literal,\r\n this.keywords.true,\r\n this.keywords.false,\r\n ];\r\n\r\n static readonly literal_or_ident = [\r\n this.tokens.ident,\r\n this.tokens.int_literal,\r\n this.tokens.uint_literal,\r\n this.tokens.decimal_float_literal,\r\n this.tokens.hex_float_literal,\r\n ];\r\n\r\n static readonly element_count_expression = [\r\n this.tokens.int_literal,\r\n this.tokens.uint_literal,\r\n this.tokens.ident,\r\n ];\r\n\r\n static readonly template_types = [\r\n this.keywords.vec2,\r\n this.keywords.vec3,\r\n this.keywords.vec4,\r\n this.keywords.mat2x2,\r\n this.keywords.mat2x3,\r\n this.keywords.mat2x4,\r\n this.keywords.mat3x2,\r\n this.keywords.mat3x3,\r\n this.keywords.mat3x4,\r\n this.keywords.mat4x2,\r\n this.keywords.mat4x3,\r\n this.keywords.mat4x4,\r\n this.keywords.atomic,\r\n this.keywords.bitcast,\r\n ...this.any_texture_type,\r\n ];\r\n\r\n // The grammar calls out 'block', but attribute grammar is defined to use a 'ident'.\r\n // The attribute grammar should be ident | block.\r\n static readonly attribute_name = [this.tokens.ident, this.keywords.block, this.keywords.diagnostic];\r\n\r\n static readonly assignment_operators = [\r\n this.tokens.equal,\r\n this.tokens.plus_equal,\r\n this.tokens.minus_equal,\r\n this.tokens.times_equal,\r\n this.tokens.division_equal,\r\n this.tokens.modulo_equal,\r\n this.tokens.and_equal,\r\n this.tokens.or_equal,\r\n this.tokens.xor_equal,\r\n this.tokens.shift_right_equal,\r\n this.tokens.shift_left_equal,\r\n ];\r\n\r\n static readonly increment_operators = [\r\n this.tokens.plus_plus,\r\n this.tokens.minus_minus,\r\n ];\r\n}\r\n\r\n/// A token parsed by the WgslScanner.\r\nexport class Token {\r\n readonly type: TokenType;\r\n readonly lexeme: string;\r\n readonly line: number;\r\n\r\n constructor(type: TokenType, lexeme: string, line: number) {\r\n this.type = type;\r\n this.lexeme = lexeme;\r\n this.line = line;\r\n }\r\n\r\n toString(): string {\r\n return this.lexeme;\r\n }\r\n\r\n isTemplateType(): boolean {\r\n return TokenTypes.template_types.indexOf(this.type) != -1;\r\n }\r\n\r\n isArrayType(): boolean {\r\n return this.type == TokenTypes.keywords.array;\r\n }\r\n\r\n isArrayOrTemplateType(): boolean {\r\n return this.isArrayType() || this.isTemplateType();\r\n }\r\n}\r\n\r\n/// Lexical scanner for the WGSL language. This takes an input source text and generates a list\r\n/// of Token objects, which can then be fed into the WgslParser to generate an AST.\r\nexport class WgslScanner {\r\n private _source: string;\r\n private _tokens: Array<Token> = [];\r\n private _start = 0;\r\n private _current = 0;\r\n private _line = 1;\r\n\r\n constructor(source?: string) {\r\n this._source = source ?? \"\";\r\n }\r\n\r\n /// Scan all tokens from the source.\r\n scanTokens(): Array<Token> {\r\n while (!this._isAtEnd()) {\r\n this._start = this._current;\r\n if (!this.scanToken()) {\r\n throw `Invalid syntax at line ${this._line}`;\r\n }\r\n }\r\n\r\n this._tokens.push(new Token(TokenTypes.eof, \"\", this._line));\r\n return this._tokens;\r\n }\r\n\r\n /// Scan a single token from the source.\r\n scanToken(): boolean {\r\n // Find the longest consecutive set of characters that match a rule.\r\n let lexeme = this._advance();\r\n\r\n // Skip line-feed, adding to the line counter.\r\n if (lexeme == \"\\n\") {\r\n this._line++;\r\n return true;\r\n }\r\n\r\n // Skip whitespace\r\n if (this._isWhitespace(lexeme)) {\r\n return true;\r\n }\r\n\r\n if (lexeme == \"/\") {\r\n // If it's a // comment, skip everything until the next line-feed.\r\n if (this._peekAhead() == \"/\") {\r\n while (lexeme != \"\\n\") {\r\n if (this._isAtEnd()) {\r\n return true;\r\n }\r\n lexeme = this._advance();\r\n }\r\n // skip the linefeed\r\n this._line++;\r\n return true;\r\n } else if (this._peekAhead() == \"*\") {\r\n // If it's a / * block comment, skip everything until the matching * /,\r\n // allowing for nested block comments.\r\n this._advance();\r\n let commentLevel = 1;\r\n while (commentLevel > 0) {\r\n if (this._isAtEnd()) {\r\n return true;\r\n }\r\n lexeme = this._advance();\r\n if (lexeme == \"\\n\") {\r\n this._line++;\r\n } else if (lexeme == \"*\") {\r\n if (this._peekAhead() == \"/\") {\r\n this._advance();\r\n commentLevel--;\r\n if (commentLevel == 0) {\r\n return true;\r\n }\r\n }\r\n } else if (lexeme == \"/\") {\r\n if (this._peekAhead() == \"*\") {\r\n this._advance();\r\n commentLevel++;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n\r\n // Shortcut single character tokens\r\n const simpleToken = TokenTypes.simpleTokens[lexeme];\r\n if (simpleToken) {\r\n this._addToken(simpleToken);\r\n return true;\r\n }\r\n\r\n // Shortcut keywords and identifiers\r\n let matchType = TokenTypes.none;\r\n const isAlpha = this._isAlpha(lexeme);\r\n const isUnderscore = lexeme === \"_\";\r\n\r\n if (this._isAlphaNumeric(lexeme)) {\r\n let nextChar = this._peekAhead();\r\n while (this._isAlphaNumeric(nextChar)) {\r\n lexeme += this._advance();\r\n nextChar = this._peekAhead();\r\n }\r\n }\r\n\r\n if (isAlpha) {\r\n const matchedType = TokenTypes.keywords[lexeme];\r\n if (matchedType) {\r\n this._addToken(matchedType);\r\n return true;\r\n }\r\n }\r\n\r\n if (isAlpha || isUnderscore) {\r\n this._addToken(TokenTypes.tokens.ident);\r\n return true;\r\n }\r\n\r\n // Scan for the next valid token type\r\n for (;;) {\r\n let matchedType = this._findType(lexeme);\r\n\r\n // An exception to \"longest lexeme\" rule is '>>'. In the case of 1>>2, it's a\r\n // shift_right.\r\n // In the case of array<vec4<f32>>, it's two greater_than's (one to close the vec4,\r\n // and one to close the array).\r\n // Another ambiguity is '>='. In the case of vec2<i32>=vec2(1,2),\r\n // it's a greather_than and an equal, not a greater_than_equal.\r\n // Another ambiguity is '-'. In the case of a-2, it's a minus; in the case of a*-2, it's a -2;\r\n // in the case of foo()->int, it's a ->; in the case of foo-- or --foo, it's a -- decrement.\r\n\r\n // WGSL requires context sensitive parsing to resolve these ambiguities. Both of these cases\r\n // are predicated on it the > either closing a template, or being part of an operator.\r\n // The solution here is to check if there was a less_than up to some number of tokens\r\n // previously, and the token prior to that is a keyword that requires a '<', then it will be\r\n // split into two operators; otherwise it's a single operator.\r\n const nextLexeme = this._peekAhead();\r\n if (lexeme == \"-\" && this._tokens.length > 0) {\r\n if (nextLexeme == \"=\") {\r\n this._current++;\r\n lexeme += nextLexeme;\r\n this._addToken(TokenTypes.tokens.minus_equal);\r\n return true;\r\n }\r\n if (nextLexeme == \"-\") {\r\n this._current++;\r\n lexeme += nextLexeme;\r\n this._addToken(TokenTypes.tokens.minus_minus);\r\n return true;\r\n }\r\n const ti = this._tokens.length - 1;\r\n const isIdentOrLiteral = TokenTypes.literal_or_ident.indexOf(this._tokens[ti].type) != -1;\r\n if ((isIdentOrLiteral || this._tokens[ti].type == TokenTypes.tokens.paren_right) && nextLexeme != \">\") {\r\n this._addToken(matchedType);\r\n return true;\r\n }\r\n }\r\n if (lexeme == \">\" && (nextLexeme == \">\" || nextLexeme == \"=\")) {\r\n let foundLessThan = false;\r\n let ti = this._tokens.length - 1;\r\n for (let count = 0; count < 5 && ti >= 0; ++count, --ti) {\r\n if (TokenTypes.assignment_operators.indexOf(this._tokens[ti].type) !== -1) {\r\n break;\r\n }\r\n if (this._tokens[ti].type === TokenTypes.tokens.less_than) {\r\n if (ti > 0 && this._tokens[ti - 1].isArrayOrTemplateType()) {\r\n foundLessThan = true;\r\n }\r\n break;\r\n }\r\n }\r\n // If there was a less_than in the recent token history, then this is probably a\r\n // greater_than.\r\n if (foundLessThan) {\r\n this._addToken(matchedType);\r\n return true;\r\n }\r\n }\r\n\r\n // The current lexeme may not match any rule, but some token types may be invalid for\r\n // part of the string but valid after a few more characters.\r\n // For example, 0x.5 is a hex_float_literal. But as it's being scanned,\r\n // \"0\" is a int_literal, then \"0x\" is invalid. If we stopped there, it would return\r\n // the int_literal \"0\", but that's incorrect. So if we look forward a few characters,\r\n // we'd get \"0x.\", which is still invalid, followed by \"0x.5\" which is the correct\r\n // hex_float_literal. So that means if we hit an non-matching string, we should look\r\n // ahead up to two characters to see if the string starts matching a valid rule again.\r\n if (matchedType === TokenTypes.none) {\r\n let lookAheadLexeme = lexeme;\r\n let lookAhead = 0;\r\n const maxLookAhead = 2;\r\n for (let li = 0; li < maxLookAhead; ++li) {\r\n lookAheadLexeme += this._peekAhead(li);\r\n matchedType = this._findType(lookAheadLexeme);\r\n if (matchedType !== TokenTypes.none) {\r\n lookAhead = li;\r\n break;\r\n }\r\n }\r\n\r\n if (matchedType === TokenTypes.none) {\r\n if (matchType === TokenTypes.none) {\r\n return false;\r\n }\r\n this._current--;\r\n this._addToken(matchType);\r\n return true;\r\n }\r\n\r\n lexeme = lookAheadLexeme;\r\n this._current += lookAhead + 1;\r\n }\r\n\r\n matchType = matchedType;\r\n\r\n if (this._isAtEnd()) {\r\n break;\r\n }\r\n\r\n lexeme += this._advance();\r\n }\r\n\r\n // We got to the end of the input stream. Then the token we've ready so far is it.\r\n if (matchType === TokenTypes.none) {\r\n return false;\r\n }\r\n\r\n this._addToken(matchType);\r\n return true;\r\n }\r\n\r\n _findType(lexeme: string): TokenType {\r\n for (const name in TokenTypes.regexTokens) {\r\n const type = TokenTypes.regexTokens[name];\r\n if (this._match(lexeme, type.rule)) {\r\n return type;\r\n }\r\n }\r\n\r\n const type = TokenTypes.literalTokens[lexeme];\r\n if (type) {\r\n return type;\r\n }\r\n return TokenTypes.none;\r\n }\r\n\r\n _match(lexeme: string, rule: RegExp): boolean {\r\n const match = rule.exec(lexeme);\r\n return match && match.index == 0 && match[0] == lexeme;\r\n }\r\n\r\n _isAtEnd(): boolean {\r\n return this._current >= this._source.length;\r\n }\r\n\r\n _isAlpha(c: string): boolean {\r\n return (c >= \"a\" && c <= \"z\") || (c >= \"A\" && c <= \"Z\");\r\n }\r\n\r\n _isAlphaNumeric(c: string): boolean {\r\n return (c >= \"a\" && c <= \"z\") || (c >= \"A\" && c <= \"Z\") || c == \"_\" || (c >= \"0\" && c <= \"9\");\r\n }\r\n\r\n _isWhitespace(c: string): boolean {\r\n return c == \" \" || c == \"\\t\" || c == \"\\r\";\r\n }\r\n\r\n _advance(amount: number = 0): string {\r\n let c = this._source[this._current];\r\n amount = amount || 0;\r\n amount++;\r\n this._current += amount;\r\n return c;\r\n }\r\n\r\n _peekAhead(offset: number = 0): string {\r\n offset = offset || 0;\r\n if (this._current + offset >= this._source.length) {\r\n return \"\\0\";\r\n }\r\n return this._source[this._current + offset];\r\n }\r\n\r\n _addToken(type: TokenType) {\r\n const text = this._source.substring(this._start, this._current);\r\n this._tokens.push(new Token(type, text, this._line));\r\n }\r\n}\r\n","/**\r\n * @author Brendan Duncan / https://github.com/brendan-duncan\r\n */\r\nimport { WgslScanner, Token, TokenType, TokenTypes } from \"./wgsl_scanner.js\";\r\nimport * as AST from \"./wgsl_ast.js\";\r\n\r\n/// Parse a sequence of tokens from the WgslScanner into an Abstract Syntax Tree (AST).\r\nexport class WgslParser {\r\n _tokens: Array<Token> = [];\r\n _current: number = 0;\r\n _currentLine: number = 0;\r\n _context: AST.ParseContext = new AST.ParseContext();\r\n _deferArrayCountEval: Array<Object> = [];\r\n\r\n parse(tokensOrCode: Array<Token> | string): Array<AST.Statement> {\r\n this._initialize(tokensOrCode);\r\n\r\n this._deferArrayCountEval.length = 0;\r\n\r\n const statements: Array<AST.Statement> = [];\r\n while (!this._isAtEnd()) {\r\n const statement = this._global_decl_or_directive();\r\n if (!statement) {\r\n break;\r\n }\r\n statements.push(statement);\r\n }\r\n\r\n // Since constants can be declared after they are used, and\r\n // constants can be used to size arrays, defer calculating the\r\n // size until after the shader has finished parsing.\r\n if (this._deferArrayCountEval.length > 0) {\r\n for (const arrayDecl of this._deferArrayCountEval) {\r\n const arrayType = arrayDecl[\"arrayType\"];\r\n const countNode = arrayDecl[\"countNode\"];\r\n\r\n if (countNode instanceof AST.VariableExpr) {\r\n const variable = countNode as AST.VariableExpr;\r\n const name = variable.name;\r\n const constant = this._context.constants.get(name);\r\n if (constant) {\r\n try {\r\n const count = constant.evaluate(this._context);\r\n arrayType.count = count;\r\n } catch (e) {\r\n }\r\n }\r\n }\r\n }\r\n this._deferArrayCountEval.length = 0;\r\n }\r\n\r\n return statements;\r\n }\r\n\r\n _initialize(tokensOrCode: Array<Token> | string) {\r\n if (tokensOrCode) {\r\n if (typeof tokensOrCode == \"string\") {\r\n const scanner = new WgslScanner(tokensOrCode);\r\n this._tokens = scanner.scanTokens();\r\n } else {\r\n this._tokens = tokensOrCode;\r\n }\r\n } else {\r\n this._tokens = [];\r\n }\r\n this._current = 0;\r\n }\r\n\r\n _error(token: Token, message: string | null): Object {\r\n return {\r\n token,\r\n message,\r\n toString: function () {\r\n return `${message}`;\r\n },\r\n };\r\n }\r\n\r\n _isAtEnd(): boolean {\r\n return (\r\n this._current >= this._tokens.length ||\r\n this._peek().type == TokenTypes.eof\r\n );\r\n }\r\n\r\n _match(types: TokenType | Array<TokenType>): boolean {\r\n if (types instanceof TokenType) {\r\n if (this._check(types)) {\r\n this._advance();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n for (let i = 0, l = types.length; i < l; ++i) {\r\n const type = types[i];\r\n if (this._check(type)) {\r\n this._advance();\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n _consume(types: TokenType | Array<TokenType>, message: string | null): Token {\r\n if (this._check(types)) {\r\n return this._advance();\r\n }\r\n throw this._error(this._peek(), message);\r\n }\r\n\r\n _check(types: TokenType | Array<TokenType>): boolean {\r\n if (this._isAtEnd()) {\r\n return false;\r\n }\r\n const tk = this._peek();\r\n if (types instanceof Array) {\r\n const t = tk.type;\r\n const index = types.indexOf(t);\r\n return index != -1;\r\n }\r\n return tk.type == types;\r\n }\r\n\r\n _advance(): Token {\r\n this._currentLine = this._peek()?.line ?? -1;\r\n if (!this._isAtEnd()) {\r\n this._current++;\r\n }\r\n return this._previous();\r\n }\r\n\r\n _peek(): Token {\r\n return this._tokens[this._current];\r\n }\r\n\r\n _previous(): Token {\r\n return this._tokens[this._current - 1];\r\n }\r\n\r\n _global_decl_or_directive(): AST.Statement | null {\r\n // semicolon\r\n // global_variable_decl semicolon\r\n // global_constant_decl semicolon\r\n // type_alias semicolon\r\n // struct_decl\r\n // function_decl\r\n // enable_directive\r\n\r\n // Ignore any stand-alone semicolons\r\n while (this._match(TokenTypes.tokens.semicolon) && !this._isAtEnd());\r\n\r\n if (this._match(TokenTypes.keywords.alias)) {\r\n const type = this._type_alias();\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'\");\r\n return type;\r\n }\r\n\r\n if (this._match(TokenTypes.keywords.diagnostic)) {\r\n const directive = this._diagnostic();\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'\");\r\n return directive;\r\n }\r\n\r\n if (this._match(TokenTypes.keywords.requires)) {\r\n const requires = this._requires_directive();\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'\");\r\n return requires;\r\n }\r\n\r\n if (this._match(TokenTypes.keywords.enable)) {\r\n const enable = this._enable_directive();\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'\");\r\n return enable;\r\n }\r\n\r\n // The following statements have an optional attribute*\r\n const attrs = this._attribute();\r\n\r\n if (this._check(TokenTypes.keywords.var)) {\r\n const _var = this._global_variable_decl();\r\n if (_var != null) {\r\n _var.attributes = attrs;\r\n }\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'.\");\r\n return _var;\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.override)) {\r\n const _override = this._override_variable_decl();\r\n if (_override != null) {\r\n _override.attributes = attrs;\r\n }\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'.\");\r\n return _override;\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.let)) {\r\n const _let = this._global_let_decl();\r\n if (_let != null) {\r\n _let.attributes = attrs;\r\n }\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'.\");\r\n return _let;\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.const)) {\r\n const _const = this._global_const_decl();\r\n if (_const != null) {\r\n _const.attributes = attrs;\r\n }\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'.\");\r\n return _const;\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.struct)) {\r\n const _struct = this._struct_decl();\r\n if (_struct != null) {\r\n _struct.attributes = attrs;\r\n }\r\n return _struct;\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.fn)) {\r\n const _fn = this._function_decl();\r\n if (_fn != null) {\r\n _fn.attributes = attrs;\r\n }\r\n return _fn;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _function_decl(): AST.Function | null {\r\n // attribute* function_header compound_statement\r\n // function_header: fn ident paren_left param_list? paren_right (arrow attribute* type_decl)?\r\n if (!this._match(TokenTypes.keywords.fn)) {\r\n return null;\r\n }\r\n\r\n const startLine = this._currentLine;\r\n\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected function name.\"\r\n ).toString();\r\n\r\n this._consume(\r\n TokenTypes.tokens.paren_left,\r\n \"Expected '(' for function arguments.\"\r\n );\r\n\r\n const args: Array<AST.Argument> = [];\r\n if (!this._check(TokenTypes.tokens.paren_right)) {\r\n do {\r\n if (this._check(TokenTypes.tokens.paren_right)) {\r\n break;\r\n }\r\n const argAttrs = this._attribute();\r\n\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected argument name.\"\r\n ).toString();\r\n\r\n this._consume(\r\n TokenTypes.tokens.colon,\r\n \"Expected ':' for argument type.\"\r\n );\r\n\r\n const typeAttrs = this._attribute();\r\n const type = this._type_decl();\r\n if (type != null) {\r\n type.attributes = typeAttrs;\r\n\r\n args.push(new AST.Argument(name, type, argAttrs));\r\n }\r\n } while (this._match(TokenTypes.tokens.comma));\r\n }\r\n\r\n this._consume(\r\n TokenTypes.tokens.paren_right,\r\n \"Expected ')' after function arguments.\"\r\n );\r\n\r\n let _return: AST.Type | null = null;\r\n if (this._match(TokenTypes.tokens.arrow)) {\r\n const attrs = this._attribute();\r\n _return = this._type_decl();\r\n if (_return != null) {\r\n _return.attributes = attrs;\r\n }\r\n }\r\n\r\n const body = this._compound_statement();\r\n\r\n const endLine = this._currentLine;\r\n\r\n return new AST.Function(name, args, _return, body, startLine, endLine);\r\n }\r\n\r\n _compound_statement(): Array<AST.Statement> {\r\n // brace_left statement* brace_right\r\n const statements: Array<AST.Statement> = [];\r\n\r\n this._consume(TokenTypes.tokens.brace_left, \"Expected '{' for block.\");\r\n while (!this._check(TokenTypes.tokens.brace_right)) {\r\n const statement = this._statement();\r\n if (statement !== null) {\r\n statements.push(statement as AST.Statement);\r\n }\r\n }\r\n this._consume(TokenTypes.tokens.brace_right, \"Expected '}' for block.\");\r\n\r\n return statements;\r\n }\r\n\r\n _statement(): AST.Statement | Array<AST.Statement> | null {\r\n // semicolon\r\n // return_statement semicolon\r\n // if_statement\r\n // switch_statement\r\n // loop_statement\r\n // for_statement\r\n // func_call_statement semicolon\r\n // variable_statement semicolon\r\n // break_statement semicolon\r\n // continue_statement semicolon\r\n // continuing_statement compound_statement\r\n // discard semicolon\r\n // assignment_statement semicolon\r\n // compound_statement\r\n // increment_statement semicolon\r\n // decrement_statement semicolon\r\n // static_assert_statement semicolon\r\n\r\n // Ignore any stand-alone semicolons\r\n while (this._match(TokenTypes.tokens.semicolon) && !this._isAtEnd());\r\n\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.if)) {\r\n return this._if_statement();\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.switch)) {\r\n return this._switch_statement();\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.loop)) {\r\n return this._loop_statement();\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.for)) {\r\n return this._for_statement();\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.while)) {\r\n return this._while_statement();\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.continuing)) {\r\n return this._continuing_statement();\r\n }\r\n\r\n if (this._check(TokenTypes.keywords.static_assert)) {\r\n return this._static_assert_statement();\r\n }\r\n\r\n if (this._check(TokenTypes.tokens.brace_left)) {\r\n return this._compound_statement();\r\n }\r\n\r\n let result: AST.Statement | null = null;\r\n if (this._check(TokenTypes.keywords.return)) {\r\n result = this._return_statement();\r\n } else if (\r\n this._check([\r\n TokenTypes.keywords.var,\r\n TokenTypes.keywords.let,\r\n TokenTypes.keywords.const,\r\n ])\r\n ) {\r\n result = this._variable_statement();\r\n } else if (this._match(TokenTypes.keywords.discard)) {\r\n result = new AST.Discard();\r\n } else if (this._match(TokenTypes.keywords.break)) {\r\n result = new AST.Break();\r\n } else if (this._match(TokenTypes.keywords.continue)) {\r\n result = new AST.Continue();\r\n } else {\r\n result =\r\n this._increment_decrement_statement() ||\r\n this._func_call_statement() ||\r\n this._assignment_statement();\r\n }\r\n\r\n if (result != null) {\r\n this._consume(\r\n TokenTypes.tokens.semicolon,\r\n \"Expected ';' after statement.\"\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n _static_assert_statement(): AST.StaticAssert | null {\r\n if (!this._match(TokenTypes.keywords.static_assert)) {\r\n return null;\r\n }\r\n const expression = this._optional_paren_expression();\r\n return new AST.StaticAssert(expression);\r\n }\r\n\r\n _while_statement(): AST.While | null {\r\n if (!this._match(TokenTypes.keywords.while)) {\r\n return null;\r\n }\r\n const condition = this._optional_paren_expression();\r\n\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n\r\n const block = this._compound_statement();\r\n return new AST.While(condition, block);\r\n }\r\n\r\n _continuing_statement(): AST.Continuing | null {\r\n if (!this._match(TokenTypes.keywords.continuing)) {\r\n return null;\r\n }\r\n const block = this._compound_statement();\r\n return new AST.Continuing(block);\r\n }\r\n\r\n _for_statement(): AST.For | null {\r\n // for paren_left for_header paren_right compound_statement\r\n if (!this._match(TokenTypes.keywords.for)) {\r\n return null;\r\n }\r\n\r\n this._consume(TokenTypes.tokens.paren_left, \"Expected '('.\");\r\n\r\n // for_header: (variable_statement assignment_statement func_call_statement)? semicolon short_circuit_or_expression? semicolon (assignment_statement func_call_statement)?\r\n const init = !this._check(TokenTypes.tokens.semicolon)\r\n ? this._for_init()\r\n : null;\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'.\");\r\n const condition = !this._check(TokenTypes.tokens.semicolon)\r\n ? this._short_circuit_or_expression()\r\n : null;\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'.\");\r\n const increment = !this._check(TokenTypes.tokens.paren_right)\r\n ? this._for_increment()\r\n : null;\r\n\r\n this._consume(TokenTypes.tokens.paren_right, \"Expected ')'.\");\r\n\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n\r\n const body = this._compound_statement();\r\n\r\n return new AST.For(init, condition, increment, body);\r\n }\r\n\r\n _for_init(): AST.Statement | null {\r\n // (variable_statement assignment_statement func_call_statement)?\r\n return (\r\n this._variable_statement() ||\r\n this._func_call_statement() ||\r\n this._assignment_statement()\r\n );\r\n }\r\n\r\n _for_increment(): AST.Statement | null {\r\n // (assignment_statement func_call_statement increment_statement)?\r\n return (\r\n this._func_call_statement() ||\r\n this._increment_decrement_statement() ||\r\n this._assignment_statement()\r\n );\r\n }\r\n\r\n _variable_statement(): AST.Var | null {\r\n // variable_decl\r\n // variable_decl equal short_circuit_or_expression\r\n // let (ident variable_ident_decl) equal short_circuit_or_expression\r\n // const (ident variable_ident_decl) equal short_circuit_or_expression\r\n if (this._check(TokenTypes.keywords.var)) {\r\n const _var = this._variable_decl();\r\n if (_var === null) {\r\n throw this._error(this._peek(), \"Variable declaration expected.\");\r\n }\r\n let value: AST.Expression | null = null;\r\n if (this._match(TokenTypes.tokens.equal)) {\r\n value = this._short_circuit_or_expression();\r\n }\r\n\r\n return new AST.Var(\r\n _var.name,\r\n _var.type,\r\n _var.storage,\r\n _var.access,\r\n value\r\n );\r\n }\r\n\r\n if (this._match(TokenTypes.keywords.let)) {\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected name for let.\"\r\n ).toString();\r\n let type: AST.Type | null = null;\r\n if (this._match(TokenTypes.tokens.colon)) {\r\n const typeAttrs = this._attribute();\r\n type = this._type_decl();\r\n if (type != null) {\r\n type.attributes = typeAttrs;\r\n }\r\n }\r\n this._consume(TokenTypes.tokens.equal, \"Expected '=' for let.\");\r\n const value = this._short_circuit_or_expression();\r\n return new AST.Let(name, type, null, null, value);\r\n }\r\n\r\n if (this._match(TokenTypes.keywords.const)) {\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected name for const.\"\r\n ).toString();\r\n let type: AST.Type | null = null;\r\n if (this._match(TokenTypes.tokens.colon)) {\r\n const typeAttrs = this._attribute();\r\n type = this._type_decl();\r\n if (type != null) {\r\n type.attributes = typeAttrs;\r\n }\r\n }\r\n this._consume(TokenTypes.tokens.equal, \"Expected '=' for const.\");\r\n const value = this._short_circuit_or_expression();\r\n return new AST.Const(name, type, null, null, value);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _increment_decrement_statement(): AST.Statement | null {\r\n const savedPos = this._current;\r\n\r\n const _var = this._unary_expression();\r\n if (_var == null) {\r\n return null;\r\n }\r\n\r\n if (!this._check(TokenTypes.increment_operators)) {\r\n this._current = savedPos;\r\n return null;\r\n }\r\n\r\n const token = this._consume(\r\n TokenTypes.increment_operators,\r\n \"Expected increment operator\"\r\n );\r\n\r\n return new AST.Increment(\r\n token.type === TokenTypes.tokens.plus_plus\r\n ? AST.IncrementOperator.increment\r\n : AST.IncrementOperator.decrement,\r\n _var\r\n );\r\n }\r\n\r\n _assignment_statement(): AST.Assign | null {\r\n // (unary_expression underscore) equal short_circuit_or_expression\r\n let _var: AST.Expression | null = null;\r\n\r\n if (this._check(TokenTypes.tokens.brace_right)) {\r\n return null;\r\n }\r\n\r\n let isUnderscore = this._match(TokenTypes.tokens.underscore);\r\n if (!isUnderscore) {\r\n _var = this._unary_expression();\r\n }\r\n\r\n if (!isUnderscore && _var == null) {\r\n return null;\r\n }\r\n\r\n const type = this._consume(\r\n TokenTypes.assignment_operators,\r\n \"Expected assignment operator.\"\r\n );\r\n\r\n const value = this._short_circuit_or_expression();\r\n\r\n return new AST.Assign(\r\n AST.AssignOperator.parse(type.lexeme),\r\n _var as AST.Expression,\r\n value\r\n );\r\n }\r\n\r\n _func_call_statement(): AST.Call | null {\r\n // ident argument_expression_list\r\n if (!this._check(TokenTypes.tokens.ident)) {\r\n return null;\r\n }\r\n\r\n const savedPos = this._current;\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected function name.\"\r\n );\r\n const args = this._argument_expression_list();\r\n\r\n if (args === null) {\r\n this._current = savedPos;\r\n return null;\r\n }\r\n\r\n return new AST.Call(name.lexeme, args);\r\n }\r\n\r\n _loop_statement(): AST.Loop | null {\r\n // loop brace_left statement* continuing_statement? brace_right\r\n if (!this._match(TokenTypes.keywords.loop)) {\r\n return null;\r\n }\r\n\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n\r\n this._consume(TokenTypes.tokens.brace_left, \"Expected '{' for loop.\");\r\n\r\n // statement*\r\n const statements: Array<AST.Statement> = [];\r\n let statement = this._statement();\r\n while (statement !== null) {\r\n if (Array.isArray(statement)) {\r\n for (let s of statement) {\r\n statements.push(s);\r\n }\r\n } else {\r\n statements.push(statement);\r\n }\r\n statement = this._statement();\r\n }\r\n\r\n // continuing_statement: continuing compound_statement\r\n let continuing: Array<AST.Statement> | null = null;\r\n if (this._match(TokenTypes.keywords.continuing)) {\r\n continuing = this._compound_statement();\r\n }\r\n\r\n this._consume(TokenTypes.tokens.brace_right, \"Expected '}' for loop.\");\r\n\r\n return new AST.Loop(statements, continuing);\r\n }\r\n\r\n _switch_statement(): AST.Switch | null {\r\n // switch optional_paren_expression brace_left switch_body+ brace_right\r\n if (!this._match(TokenTypes.keywords.switch)) {\r\n return null;\r\n }\r\n\r\n const condition = this._optional_paren_expression();\r\n\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n\r\n this._consume(TokenTypes.tokens.brace_left, \"Expected '{' for switch.\");\r\n const body = this._switch_body();\r\n if (body == null || body.length == 0) {\r\n throw this._error(this._previous(), \"Expected 'case' or 'default'.\");\r\n }\r\n this._consume(TokenTypes.tokens.brace_right, \"Expected '}' for switch.\");\r\n return new AST.Switch(condition, body);\r\n }\r\n\r\n _switch_body(): Array<AST.Statement> {\r\n // case case_selectors colon brace_left case_body? brace_right\r\n // default colon brace_left case_body? brace_right\r\n const cases: Array<AST.Statement> = [];\r\n if (this._match(TokenTypes.keywords.case)) {\r\n const selector = this._case_selectors();\r\n this._match(TokenTypes.tokens.colon); // colon is optional\r\n\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n\r\n this._consume(\r\n TokenTypes.tokens.brace_left,\r\n \"Exected '{' for switch case.\"\r\n );\r\n const body = this._case_body();\r\n this._consume(\r\n TokenTypes.tokens.brace_right,\r\n \"Exected '}' for switch case.\"\r\n );\r\n cases.push(new AST.Case(selector, body));\r\n }\r\n\r\n if (this._match(TokenTypes.keywords.default)) {\r\n this._match(TokenTypes.tokens.colon); // colon is optional\r\n \r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n \r\n this._consume(\r\n TokenTypes.tokens.brace_left,\r\n \"Exected '{' for switch default.\"\r\n );\r\n const body = this._case_body();\r\n this._consume(\r\n TokenTypes.tokens.brace_right,\r\n \"Exected '}' for switch default.\"\r\n );\r\n cases.push(new AST.Default(body));\r\n }\r\n\r\n if (this._check([TokenTypes.keywords.default, TokenTypes.keywords.case])) {\r\n const _cases = this._switch_body();\r\n cases.push(_cases[0]);\r\n }\r\n\r\n return cases;\r\n }\r\n\r\n _case_selectors(): Array<AST.Expression> {\r\n // const_literal (comma const_literal)* comma?\r\n const selectors = [\r\n this._shift_expression(),//?.evaluate(this._context).toString() ?? \"\",\r\n ];\r\n while (this._match(TokenTypes.tokens.comma)) {\r\n selectors.push(\r\n this._shift_expression(),//?.evaluate(this._context).toString() ?? \"\"\r\n );\r\n }\r\n return selectors;\r\n }\r\n\r\n _case_body(): Array<AST.Statement> {\r\n // statement case_body?\r\n // fallthrough semicolon\r\n if (this._match(TokenTypes.keywords.fallthrough)) {\r\n this._consume(TokenTypes.tokens.semicolon, \"Expected ';'\");\r\n return [];\r\n }\r\n\r\n let statement = this._statement();\r\n if (statement == null) {\r\n return [];\r\n }\r\n\r\n if (!(statement instanceof Array)) {\r\n statement = [statement];\r\n }\r\n\r\n const nextStatement = this._case_body();\r\n if (nextStatement.length == 0) {\r\n return statement;\r\n }\r\n\r\n return [...statement, nextStatement[0]];\r\n }\r\n\r\n _if_statement(): AST.If | null {\r\n // if optional_paren_expression compound_statement elseif_statement? else_statement?\r\n if (!this._match(TokenTypes.keywords.if)) {\r\n return null;\r\n }\r\n\r\n const condition = this._optional_paren_expression();\r\n\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n\r\n const block = this._compound_statement();\r\n\r\n let elseif: Array<AST.ElseIf> | null = [];\r\n if (this._match_elseif()) {\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n elseif = this._elseif_statement(elseif);\r\n }\r\n\r\n let _else: Array<AST.Statement> | null = null;\r\n if (this._match(TokenTypes.keywords.else)) {\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n _else = this._compound_statement();\r\n }\r\n\r\n return new AST.If(condition, block, elseif, _else);\r\n }\r\n\r\n _match_elseif(): boolean {\r\n if (\r\n this._tokens[this._current].type === TokenTypes.keywords.else &&\r\n this._tokens[this._current + 1].type === TokenTypes.keywords.if\r\n ) {\r\n this._advance();\r\n this._advance();\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n _elseif_statement(elseif: Array<AST.ElseIf> = []): Array<AST.ElseIf> {\r\n // else_if optional_paren_expression compound_statement elseif_statement?\r\n const condition = this._optional_paren_expression();\r\n const block = this._compound_statement();\r\n elseif.push(new AST.ElseIf(condition, block));\r\n if (this._match_elseif()) {\r\n let attributes = null;\r\n if (this._check(TokenTypes.tokens.attr)) {\r\n attributes = this._attribute();\r\n }\r\n this._elseif_statement(elseif);\r\n }\r\n return elseif;\r\n }\r\n\r\n _return_statement(): AST.Return | null {\r\n // return short_circuit_or_expression?\r\n if (!this._match(TokenTypes.keywords.return)) {\r\n return null;\r\n }\r\n const value = this._short_circuit_or_expression();\r\n return new AST.Return(value);\r\n }\r\n\r\n _short_circuit_or_expression(): AST.Expression {\r\n // short_circuit_and_expression\r\n // short_circuit_or_expression or_or short_circuit_and_expression\r\n let expr = this._short_circuit_and_expr();\r\n while (this._match(TokenTypes.tokens.or_or)) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._short_circuit_and_expr()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _short_circuit_and_expr(): AST.Expression {\r\n // inclusive_or_expression\r\n // short_circuit_and_expression and_and inclusive_or_expression\r\n let expr = this._inclusive_or_expression();\r\n while (this._match(TokenTypes.tokens.and_and)) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._inclusive_or_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _inclusive_or_expression(): AST.Expression {\r\n // exclusive_or_expression\r\n // inclusive_or_expression or exclusive_or_expression\r\n let expr = this._exclusive_or_expression();\r\n while (this._match(TokenTypes.tokens.or)) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._exclusive_or_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _exclusive_or_expression(): AST.Expression {\r\n // and_expression\r\n // exclusive_or_expression xor and_expression\r\n let expr = this._and_expression();\r\n while (this._match(TokenTypes.tokens.xor)) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._and_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _and_expression(): AST.Expression {\r\n // equality_expression\r\n // and_expression and equality_expression\r\n let expr = this._equality_expression();\r\n while (this._match(TokenTypes.tokens.and)) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._equality_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _equality_expression(): AST.Expression {\r\n // relational_expression\r\n // relational_expression equal_equal relational_expression\r\n // relational_expression not_equal relational_expression\r\n const expr = this._relational_expression();\r\n if (\r\n this._match([TokenTypes.tokens.equal_equal, TokenTypes.tokens.not_equal])\r\n ) {\r\n return new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._relational_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _relational_expression(): AST.Expression {\r\n // shift_expression\r\n // relational_expression less_than shift_expression\r\n // relational_expression greater_than shift_expression\r\n // relational_expression less_than_equal shift_expression\r\n // relational_expression greater_than_equal shift_expression\r\n let expr = this._shift_expression();\r\n while (\r\n this._match([\r\n TokenTypes.tokens.less_than,\r\n TokenTypes.tokens.greater_than,\r\n TokenTypes.tokens.less_than_equal,\r\n TokenTypes.tokens.greater_than_equal,\r\n ])\r\n ) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._shift_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _shift_expression(): AST.Expression {\r\n // additive_expression\r\n // shift_expression shift_left additive_expression\r\n // shift_expression shift_right additive_expression\r\n let expr = this._additive_expression();\r\n while (\r\n this._match([TokenTypes.tokens.shift_left, TokenTypes.tokens.shift_right])\r\n ) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._additive_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _additive_expression(): AST.Expression {\r\n // multiplicative_expression\r\n // additive_expression plus multiplicative_expression\r\n // additive_expression minus multiplicative_expression\r\n let expr = this._multiplicative_expression();\r\n while (this._match([TokenTypes.tokens.plus, TokenTypes.tokens.minus])) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._multiplicative_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _multiplicative_expression(): AST.Expression {\r\n // unary_expression\r\n // multiplicative_expression star unary_expression\r\n // multiplicative_expression forward_slash unary_expression\r\n // multiplicative_expression modulo unary_expression\r\n let expr = this._unary_expression();\r\n while (\r\n this._match([\r\n TokenTypes.tokens.star,\r\n TokenTypes.tokens.forward_slash,\r\n TokenTypes.tokens.modulo,\r\n ])\r\n ) {\r\n expr = new AST.BinaryOperator(\r\n this._previous().toString(),\r\n expr,\r\n this._unary_expression()\r\n );\r\n }\r\n return expr;\r\n }\r\n\r\n _unary_expression(): AST.Expression {\r\n // singular_expression\r\n // minus unary_expression\r\n // bang unary_expression\r\n // tilde unary_expression\r\n // star unary_expression\r\n // and unary_expression\r\n if (\r\n this._match([\r\n TokenTypes.tokens.minus,\r\n TokenTypes.tokens.bang,\r\n TokenTypes.tokens.tilde,\r\n TokenTypes.tokens.star,\r\n TokenTypes.tokens.and,\r\n ])\r\n ) {\r\n return new AST.UnaryOperator(\r\n this._previous().toString(),\r\n this._unary_expression()\r\n );\r\n }\r\n return this._singular_expression();\r\n }\r\n\r\n _singular_expression(): AST.Expression {\r\n // primary_expression postfix_expression ?\r\n const expr = this._primary_expression();\r\n const p = this._postfix_expression();\r\n if (p) {\r\n expr.postfix = p;\r\n }\r\n return expr;\r\n }\r\n\r\n _postfix_expression(): AST.Expression | null {\r\n // bracket_left short_circuit_or_expression bracket_right postfix_expression?\r\n if (this._match(TokenTypes.tokens.bracket_left)) {\r\n const expr = this._short_circuit_or_expression();\r\n this._consume(TokenTypes.tokens.bracket_right, \"Expected ']'.\");\r\n const arrayIndex = new AST.ArrayIndex(expr);\r\n const p = this._postfix_expression();\r\n if (p) {\r\n arrayIndex.postfix = p;\r\n }\r\n return arrayIndex;\r\n }\r\n\r\n // period ident postfix_expression?\r\n if (this._match(TokenTypes.tokens.period)) {\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected member name.\"\r\n );\r\n const p = this._postfix_expression();\r\n const expr = new AST.StringExpr(name.lexeme);\r\n if (p) {\r\n expr.postfix = p;\r\n }\r\n return expr;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _getStruct(name: string): AST.Type | null {\r\n if (this._context.aliases.has(name)) {\r\n const alias = this._context.aliases.get(name).type;\r\n return alias;\r\n }\r\n if (this._context.structs.has(name)) {\r\n const struct = this._context.structs.get(name);\r\n return struct;\r\n }\r\n return null;\r\n }\r\n\r\n _primary_expression(): AST.Expression {\r\n // ident argument_expression_list?\r\n if (this._match(TokenTypes.tokens.ident)) {\r\n const name = this._previous().toString();\r\n if (this._check(TokenTypes.tokens.paren_left)) {\r\n const args = this._argument_expression_list();\r\n const struct = this._getStruct(name);\r\n if (struct != null) {\r\n return new AST.CreateExpr(struct, args);\r\n }\r\n return new AST.CallExpr(name, args);\r\n }\r\n if (this._context.constants.has(name)) {\r\n const c = this._context.constants.get(name);\r\n return new AST.ConstExpr(name, c.value);\r\n }\r\n return new AST.VariableExpr(name);\r\n }\r\n\r\n // const_literal\r\n if (this._match(TokenTypes.const_literal)) {\r\n return new AST.LiteralExpr(parseFloat(this._previous().toString()));\r\n }\r\n\r\n // paren_expression\r\n if (this._check(TokenTypes.tokens.paren_left)) {\r\n return this._paren_expression();\r\n }\r\n\r\n // bitcast less_than type_decl greater_than paren_expression\r\n if (this._match(TokenTypes.keywords.bitcast)) {\r\n this._consume(TokenTypes.tokens.less_than, \"Expected '<'.\");\r\n const type = this._type_decl();\r\n this._consume(TokenTypes.tokens.greater_than, \"Expected '>'.\");\r\n const value = this._paren_expression();\r\n return new AST.BitcastExpr(type, value);\r\n }\r\n\r\n // type_decl argument_expression_list\r\n const type = this._type_decl();\r\n const args = this._argument_expression_list();\r\n return new AST.CreateExpr(type, args);\r\n }\r\n\r\n _argument_expression_list(): Array<AST.Expression> | null {\r\n // paren_left ((short_circuit_or_expression comma)* short_circuit_or_expression comma?)? paren_right\r\n if (!this._match(TokenTypes.tokens.paren_left)) {\r\n return null;\r\n }\r\n\r\n const args: Array<AST.Expression> = [];\r\n do {\r\n if (this._check(TokenTypes.tokens.paren_right)) {\r\n break;\r\n }\r\n const arg = this._short_circuit_or_expression();\r\n args.push(arg);\r\n } while (this._match(TokenTypes.tokens.comma));\r\n this._consume(\r\n TokenTypes.tokens.paren_right,\r\n \"Expected ')' for agument list\"\r\n );\r\n\r\n return args;\r\n }\r\n\r\n _optional_paren_expression(): AST.GroupingExpr {\r\n // [paren_left] short_circuit_or_expression [paren_right]\r\n this._match(TokenTypes.tokens.paren_left);\r\n const expr = this._short_circuit_or_expression();\r\n this._match(TokenTypes.tokens.paren_right);\r\n return new AST.GroupingExpr([expr]);\r\n }\r\n\r\n _paren_expression(): AST.GroupingExpr {\r\n // paren_left short_circuit_or_expression paren_right\r\n this._consume(TokenTypes.tokens.paren_left, \"Expected '('.\");\r\n const expr = this._short_circuit_or_expression();\r\n this._consume(TokenTypes.tokens.paren_right, \"Expected ')'.\");\r\n return new AST.GroupingExpr([expr]);\r\n }\r\n\r\n _struct_decl(): AST.Struct | null {\r\n // attribute* struct ident struct_body_decl\r\n if (!this._match(TokenTypes.keywords.struct)) {\r\n return null;\r\n }\r\n\r\n const startLine = this._currentLine;\r\n\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected name for struct.\"\r\n ).toString();\r\n\r\n // struct_body_decl: brace_left (struct_member comma)* struct_member comma? brace_right\r\n this._consume(\r\n TokenTypes.tokens.brace_left,\r\n \"Expected '{' for struct body.\"\r\n );\r\n const members: Array<AST.Member> = [];\r\n while (!this._check(TokenTypes.tokens.brace_right)) {\r\n // struct_member: attribute* variable_ident_decl\r\n const memberAttrs = this._attribute();\r\n\r\n const memberName = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected variable name.\"\r\n ).toString();\r\n\r\n this._consume(\r\n TokenTypes.tokens.colon,\r\n \"Expected ':' for struct member type.\"\r\n );\r\n\r\n const typeAttrs = this._attribute();\r\n const memberType = this._type_decl();\r\n if (memberType != null) {\r\n memberType.attributes = typeAttrs;\r\n }\r\n\r\n if (!this._check(TokenTypes.tokens.brace_right))\r\n this._consume(\r\n TokenTypes.tokens.comma,\r\n \"Expected ',' for struct member.\"\r\n );\r\n else this._match(TokenTypes.tokens.comma); // trailing comma optional.\r\n\r\n members.push(new AST.Member(memberName, memberType, memberAttrs));\r\n }\r\n\r\n this._consume(\r\n TokenTypes.tokens.brace_right,\r\n \"Expected '}' after struct body.\"\r\n );\r\n\r\n const endLine = this._currentLine;\r\n\r\n const structNode = new AST.Struct(name, members, startLine, endLine);\r\n this._context.structs.set(name, structNode);\r\n return structNode;\r\n }\r\n\r\n _global_variable_decl(): AST.Var | null {\r\n // attribute* variable_decl (equal const_expression)?\r\n const _var = this._variable_decl();\r\n if (_var && this._match(TokenTypes.tokens.equal)) {\r\n _var.value = this._const_expression();\r\n }\r\n return _var;\r\n }\r\n\r\n _override_variable_decl(): AST.Override | null {\r\n // attribute* override_decl (equal const_expression)?\r\n const _override = this._override_decl();\r\n if (_override && this._match(TokenTypes.tokens.equal)) {\r\n _override.value = this._const_expression();\r\n }\r\n\r\n return _override;\r\n }\r\n\r\n _global_const_decl(): AST.Let | null {\r\n // attribute* const (ident variable_ident_decl) global_const_initializer?\r\n if (!this._match(TokenTypes.keywords.const)) {\r\n return null;\r\n }\r\n\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected variable name\"\r\n );\r\n let type: AST.Type | null = null;\r\n if (this._match(TokenTypes.tokens.colon)) {\r\n const attrs = this._attribute();\r\n type = this._type_decl();\r\n if (type != null) {\r\n type.attributes = attrs;\r\n }\r\n }\r\n let value: AST.Expression | null = null;\r\n if (this._match(TokenTypes.tokens.equal)) {\r\n const valueExpr = this._short_circuit_or_expression();\r\n if (valueExpr instanceof AST.CreateExpr) {\r\n value = valueExpr;\r\n } else if (\r\n valueExpr instanceof AST.ConstExpr &&\r\n valueExpr.initializer instanceof AST.CreateExpr\r\n ) {\r\n value = valueExpr.initializer;\r\n } else {\r\n try {\r\n const constValue = valueExpr.evaluate(this._context);\r\n value = new AST.LiteralExpr(constValue);\r\n } catch {\r\n value = valueExpr;\r\n }\r\n }\r\n }\r\n const c = new AST.Const(name.toString(), type, \"\", \"\", value);\r\n this._context.constants.set(c.name, c);\r\n return c;\r\n }\r\n\r\n _global_let_decl(): AST.Let | null {\r\n // attribute* let (ident variable_ident_decl) global_const_initializer?\r\n if (!this._match(TokenTypes.keywords.let)) {\r\n return null;\r\n }\r\n\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected variable name\"\r\n );\r\n let type: AST.Type | null = null;\r\n if (this._match(TokenTypes.tokens.colon)) {\r\n const attrs = this._attribute();\r\n type = this._type_decl();\r\n if (type != null) {\r\n type.attributes = attrs;\r\n }\r\n }\r\n let value: AST.Expression | null = null;\r\n if (this._match(TokenTypes.tokens.equal)) {\r\n value = this._const_expression();\r\n }\r\n return new AST.Let(name.toString(), type, \"\", \"\", value);\r\n }\r\n\r\n _const_expression(): AST.Expression {\r\n // type_decl paren_left ((const_expression comma)* const_expression comma?)? paren_right\r\n // const_literal\r\n return this._short_circuit_or_expression();\r\n }\r\n\r\n _variable_decl(): AST.Var | null {\r\n // var variable_qualifier? (ident variable_ident_decl)\r\n if (!this._match(TokenTypes.keywords.var)) {\r\n return null;\r\n }\r\n\r\n // variable_qualifier: less_than storage_class (comma access_mode)? greater_than\r\n let storage: string = \"\";\r\n let access: string = \"\";\r\n if (this._match(TokenTypes.tokens.less_than)) {\r\n storage = this._consume(\r\n TokenTypes.storage_class,\r\n \"Expected storage_class.\"\r\n ).toString();\r\n if (this._match(TokenTypes.tokens.comma))\r\n access = this._consume(\r\n TokenTypes.access_mode,\r\n \"Expected access_mode.\"\r\n ).toString();\r\n this._consume(TokenTypes.tokens.greater_than, \"Expected '>'.\");\r\n }\r\n\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected variable name\"\r\n );\r\n let type: AST.Type | null = null;\r\n if (this._match(TokenTypes.tokens.colon)) {\r\n const attrs = this._attribute();\r\n type = this._type_decl();\r\n if (type != null) {\r\n type.attributes = attrs;\r\n }\r\n }\r\n\r\n return new AST.Var(name.toString(), type, storage, access, null);\r\n }\r\n\r\n _override_decl(): AST.Override | null {\r\n // override (ident variable_ident_decl)\r\n if (!this._match(TokenTypes.keywords.override)) {\r\n return null;\r\n }\r\n\r\n const name = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected variable name\"\r\n );\r\n let type: AST.Type | null = null;\r\n if (this._match(TokenTypes.tokens.colon)) {\r\n const attrs = this._attribute();\r\n type = this._type_decl();\r\n if (type != null) {\r\n type.attributes = attrs;\r\n }\r\n }\r\n\r\n return new AST.Override(name.toString(), type, null);\r\n }\r\n\r\n _diagnostic(): AST.Diagnostic | null {\r\n // diagnostic(severity_control_name, diagnostic_rule_name)\r\n this._consume(TokenTypes.tokens.paren_left, \"Expected '('\");\r\n const severity = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected severity control name.\"\r\n );\r\n this._consume(TokenTypes.tokens.comma, \"Expected ','\");\r\n const rule = this._consume(\r\n TokenTypes.tokens.ident,\r\n \"Expected diagnostic rule name.\"\r\n );\r\n this._consume(TokenTypes.tokens.paren_right, \"Expected ')'\");\r\n return new AST.Diagnostic(severity.toString(), rule.toString());\r\n }\r\n\r\n _enable_directive(): AST.Enable {\r\n // enable ident semicolon\r\n const name = this._consume(TokenTypes.tokens.ident, \"identity expected.\");\r\n return new AST.Enable(name.toString());\r\n }\r\n\r\n _requires_directive(): AST.Requires {\r\n // requires extension [, extension]* semicolon\r\n const extensions: string[] = [this._consume(TokenTypes.tokens.ident, \"identity expected.\").toString()];\r\n while (this._match(TokenTypes.tokens.comma)) {\r\n const name = this._consume(TokenTypes.tokens.ident, \"identity expected.\");\r\n extensions.push(name.toString());\r\n }\r\n return new AST.Requires(extensions);\r\n }\r\n\r\n _type_alias(): AST.Alias {\r\n // type ident equal type_decl\r\n const name = this._consume(TokenTypes.tokens.ident, \"identity expected.\");\r\n this._consume(TokenTypes.tokens.equal, \"Expected '=' for type alias.\");\r\n\r\n let aliasType = this._type_decl();\r\n if (aliasType === null) {\r\n throw this._error(this._peek(), \"Expected Type for Alias.\");\r\n }\r\n if (this._context.aliases.has(aliasType.name)) {\r\n aliasType = this._context.aliases.get(aliasType.name).type;\r\n }\r\n\r\n const aliasNode = new AST.Alias(name.toString(), aliasType);\r\n this._context.aliases.set(aliasNode.name, aliasNode);\r\n\r\n return aliasNode;\r\n }\r\n\r\n _type_decl(): AST.Type | null {\r\n // ident\r\n // bool\r\n // float32\r\n // int32\r\n // uint32\r\n // vec2 less_than type_decl greater_than\r\n // vec3 less_than type_decl greater_than\r\n // vec4 less_than type_decl greater_than\r\n // mat2x2 less_than type_decl greater_than\r\n // mat2x3 less_than type_decl greater_than\r\n // mat2x4 less_than type_decl greater_than\r\n // mat3x2 less_than type_decl greater_than\r\n // mat3x3 less_than type_decl greater_than\r\n // mat3x4 less_than type_decl greater_than\r\n // mat4x2 less_than type_decl greater_than\r\n // mat4x3 less_than type_decl greater_than\r\n // mat4x4 less_than type_decl greater_than\r\n // atomic less_than type_decl greater_than\r\n // pointer less_than storage_class comma type_decl (comma access_mode)? greater_than\r\n // array_type_decl\r\n // texture_sampler_types\r\n\r\n if (\r\n this._check([\r\n TokenTypes.tokens.ident,\r\n ...TokenTypes.texel_format,\r\n TokenTypes.keywords.bool,\r\n TokenTypes.keywords.f32,\r\n TokenTypes.keywords.i32,\r\n TokenTypes.keywords.u32,\r\n ])\r\n ) {\r\n const type = this._advance();\r\n const typeName = type.toString();\r\n if (this._context.structs.has(typeName)) {\r\n return this._context.structs.get(typeName);\r\n }\r\n if (this._context.aliases.has(typeName)) {\r\n return this._context.aliases.get(typeName).type;\r\n }\r\n return new AST.Type(type.toString());\r\n }\r\n\r\n // texture_sampler_types\r\n let type = this._texture_sampler_types();\r\n if (type) {\r\n return type;\r\n }\r\n\r\n if (this._check(TokenTypes.template_types)) {\r\n let type = this._advance().toString();\r\n let format: AST.Type | null = null;\r\n let access: string | null = null;\r\n if (this._match(TokenTypes.tokens.less_than)) {\r\n format = this._type_decl();\r\n access = null;\r\n if (this._match(TokenTypes.tokens.comma)) {\r\n access = this._consume(\r\n TokenTypes.access_mode,\r\n \"Expected access_mode for pointer\"\r\n ).toString();\r\n }\r\n this._consume(TokenTypes.tokens.greater_than, \"Expected '>' for type.\");\r\n }\r\n return new AST.TemplateType(type, format, access);\r\n }\r\n\r\n // pointer less_than storage_class comma type_decl (comma access_mode)? greater_than\r\n if (this._match(TokenTypes.keywords.ptr)) {\r\n let pointer = this._previous().toString();\r\n this._consume(TokenTypes.tokens.less_than, \"Expected '<' for pointer.\");\r\n const storage = this._consume(\r\n TokenTypes.storage_class,\r\n \"Expected storage_class for pointer\"\r\n );\r\n this._consume(TokenTypes.tokens.comma, \"Expected ',' for pointer.\");\r\n const decl = this._type_decl();\r\n let access: string | null = null;\r\n if (this._match(TokenTypes.tokens.comma)) {\r\n access = this._consume(\r\n TokenTypes.access_mode,\r\n \"Expected access_mode for pointer\"\r\n ).toString();\r\n }\r\n this._consume(\r\n TokenTypes.tokens.greater_than,\r\n \"Expected '>' for pointer.\"\r\n );\r\n return new AST.PointerType(pointer, storage.toString(), decl, access);\r\n }\r\n\r\n // The following type_decl's have an optional attribyte_list*\r\n const attrs = this._attribute();\r\n\r\n // attribute* array\r\n // attribute* array less_than type_decl (comma element_count_expression)? greater_than\r\n if (this._match(TokenTypes.keywords.array)) {\r\n let format = null;\r\n let countInt = -1;\r\n const array = this._previous();\r\n let countNode: AST.Expression | null = null;\r\n if (this._match(TokenTypes.tokens.less_than)) {\r\n format = this._type_decl();\r\n if (this._context.aliases.has(format.name)) {\r\n format = this._context.aliases.get(format.name).type;\r\n }\r\n let count: string = \"\";\r\n if (this._match(TokenTypes.tokens.comma)) {\r\n countNode = this._shift_expression();\r\n // If we can't evaluate the node, defer evaluating it until after the shader has\r\n // finished being parsed, because const statements can be declared **after** they\r\n // are used.\r\n try {\r\n count = countNode.evaluate(this._context).toString();\r\n countNode = null;\r\n } catch (e) {\r\n count = \"1\";\r\n }\r\n }\r\n this._consume(\r\n TokenTypes.tokens.greater_than,\r\n \"Expected '>' for array.\"\r\n );\r\n countInt = count ? parseInt(count) : 0;\r\n }\r\n const arrayType = new AST.ArrayType(array.toString(), attrs, format, countInt);\r\n if (countNode) {\r\n this._deferArrayCountEval.push({ arrayType, countNode });\r\n }\r\n return arrayType;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _texture_sampler_types(): AST.SamplerType | null {\r\n // sampler_type\r\n if (this._match(TokenTypes.sampler_type)) {\r\n return new AST.SamplerType(this._previous().toString(), null, null);\r\n }\r\n\r\n // depth_texture_type\r\n if (this._match(TokenTypes.depth_texture_type)) {\r\n return new AST.SamplerType(this._previous().toString(), null, null);\r\n }\r\n\r\n // sampled_texture_type less_than type_decl greater_than\r\n // multisampled_texture_type less_than type_decl greater_than\r\n if (\r\n this._match(TokenTypes.sampled_texture_type) ||\r\n this._match(TokenTypes.multisampled_texture_type)\r\n ) {\r\n const sampler = this._previous();\r\n this._consume(\r\n TokenTypes.tokens.less_than,\r\n \"Expected '<' for sampler type.\"\r\n );\r\n const format = this._type_decl();\r\n this._consume(\r\n TokenTypes.tokens.greater_than,\r\n \"Expected '>' for sampler type.\"\r\n );\r\n return new AST.SamplerType(sampler.toString(), format, null);\r\n }\r\n\r\n // storage_texture_type less_than texel_format comma access_mode greater_than\r\n if (this._match(TokenTypes.storage_texture_type)) {\r\n const sampler = this._previous();\r\n this._consume(\r\n TokenTypes.tokens.less_than,\r\n \"Expected '<' for sampler type.\"\r\n );\r\n const format = this._consume(\r\n TokenTypes.texel_format,\r\n \"Invalid texel format.\"\r\n ).toString();\r\n this._consume(\r\n TokenTypes.tokens.comma,\r\n \"Expected ',' after texel format.\"\r\n );\r\n const access = this._consume(\r\n TokenTypes.access_mode,\r\n \"Expected access mode for storage texture type.\"\r\n ).toString();\r\n this._consume(\r\n TokenTypes.tokens.greater_than,\r\n \"Expected '>' for sampler type.\"\r\n );\r\n return new AST.SamplerType(sampler.toString(), format, access);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _attribute(): Array<AST.Attribute> | null {\r\n // attr ident paren_left (literal_or_ident comma)* literal_or_ident paren_right\r\n // attr ident\r\n\r\n let attributes: Array<AST.Attribute> = [];\r\n\r\n while (this._match(TokenTypes.tokens.attr)) {\r\n const name = this._consume(\r\n TokenTypes.attribute_name,\r\n \"Expected attribute name\"\r\n );\r\n const attr = new AST.Attribute(name.toString(), null);\r\n if (this._match(TokenTypes.tokens.paren_left)) {\r\n // literal_or_ident\r\n attr.value = this._consume(\r\n TokenTypes.literal_or_ident,\r\n \"Expected attribute value\"\r\n ).toString();\r\n if (this._check(TokenTypes.tokens.comma)) {\r\n this._advance();\r\n do {\r\n const v = this._consume(\r\n TokenTypes.literal_or_ident,\r\n \"Expected attribute value\"\r\n ).toString();\r\n if (!(attr.value instanceof Array)) {\r\n attr.value = [attr.value as string];\r\n }\r\n attr.value.push(v);\r\n } while (this._match(TokenTypes.tokens.comma));\r\n }\r\n this._consume(TokenTypes.tokens.paren_right, \"Expected ')'\");\r\n }\r\n attributes.push(attr);\r\n }\r\n\r\n if (attributes.length == 0) {\r\n return null;\r\n }\r\n\r\n return attributes;\r\n }\r\n}\r\n","/**\r\n * @author Brendan Duncan / https://github.com/brendan-duncan\r\n */\r\nimport { WgslParser } from \"./wgsl_parser.js\";\r\nimport { TokenTypes } from \"./wgsl_scanner.js\";\r\nimport * as AST from \"./wgsl_ast.js\";\r\n\r\nexport class TypeInfo {\r\n name: string;\r\n attributes: Array<AST.Attribute> | null;\r\n size: number;\r\n\r\n constructor(name: string, attributes: Array<AST.Attribute> | null) {\r\n this.name = name;\r\n this.attributes = attributes;\r\n this.size = 0;\r\n }\r\n\r\n get isArray(): boolean {\r\n return false;\r\n }\r\n\r\n get isStruct(): boolean {\r\n return false;\r\n }\r\n\r\n get isTemplate(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class MemberInfo {\r\n name: string;\r\n type: TypeInfo;\r\n attributes: Array<AST.Attribute> | null;\r\n offset: number;\r\n size: number;\r\n\r\n constructor(\r\n name: string,\r\n type: TypeInfo,\r\n attributes: Array<AST.Attribute> | null\r\n ) {\r\n this.name = name;\r\n this.type = type;\r\n this.attributes = attributes;\r\n this.offset = 0;\r\n this.size = 0;\r\n }\r\n\r\n get isArray(): boolean {\r\n return this.type.isArray;\r\n }\r\n\r\n get isStruct(): boolean {\r\n return this.type.isStruct;\r\n }\r\n\r\n get isTemplate(): boolean {\r\n return this.type.isTemplate;\r\n }\r\n\r\n get align(): number {\r\n return this.type.isStruct ? (this.type as StructInfo).align : 0;\r\n }\r\n\r\n get members(): Array<MemberInfo> | null {\r\n return this.type.isStruct ? (this.type as StructInfo).members : null;\r\n }\r\n\r\n get format(): TypeInfo | null {\r\n return this.type.isArray\r\n ? (this.type as ArrayInfo).format\r\n : this.type.isTemplate\r\n ? (this.type as TemplateInfo).format\r\n : null;\r\n }\r\n\r\n get count(): number {\r\n return this.type.isArray ? (this.type as ArrayInfo).count : 0;\r\n }\r\n\r\n get stride(): number {\r\n return this.type.isArray ? (this.type as ArrayInfo).stride : this.size;\r\n }\r\n}\r\n\r\nexport class StructInfo extends TypeInfo {\r\n members: Array<MemberInfo> = [];\r\n align: number = 0;\r\n startLine: number = -1;\r\n endLine: number = -1;\r\n inUse: boolean = false;\r\n\r\n constructor(name: string, attributes: Array<AST.Attribute> | null) {\r\n super(name, attributes);\r\n }\r\n\r\n get isStruct(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class ArrayInfo extends TypeInfo {\r\n format: TypeInfo;\r\n count: number;\r\n stride: number;\r\n\r\n constructor(name: string, attributes: Array<AST.Attribute> | null) {\r\n super(name, attributes);\r\n this.count = 0;\r\n this.stride = 0;\r\n }\r\n\r\n get isArray(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class TemplateInfo extends TypeInfo {\r\n format: TypeInfo | null;\r\n access: string;\r\n constructor(\r\n name: string,\r\n format: TypeInfo | null,\r\n attributes: Array<AST.Attribute> | null,\r\n access: string\r\n ) {\r\n super(name, attributes);\r\n this.format = format;\r\n this.access = access;\r\n }\r\n\r\n get isTemplate(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport enum ResourceType {\r\n Uniform,\r\n Storage,\r\n Texture,\r\n Sampler,\r\n StorageTexture,\r\n}\r\n\r\nexport class VariableInfo {\r\n attributes: Array<AST.Attribute> | null;\r\n name: string;\r\n type: TypeInfo;\r\n group: number;\r\n binding: number;\r\n resourceType: ResourceType;\r\n access: string;\r\n\r\n constructor(\r\n name: string,\r\n type: TypeInfo,\r\n group: number,\r\n binding: number,\r\n attributes: Array<AST.Attribute> | null,\r\n resourceType: ResourceType,\r\n access: string\r\n ) {\r\n this.name = name;\r\n this.type = type;\r\n this.group = group;\r\n this.binding = binding;\r\n this.attributes = attributes;\r\n this.resourceType = resourceType;\r\n this.access = access;\r\n }\r\n\r\n get isArray(): boolean {\r\n return this.type.isArray;\r\n }\r\n\r\n get isStruct(): boolean {\r\n return this.type.isStruct;\r\n }\r\n\r\n get isTemplate(): boolean {\r\n return this.type.isTemplate;\r\n }\r\n\r\n get size(): number {\r\n return this.type.size;\r\n }\r\n\r\n get align(): number {\r\n return this.type.isStruct ? (this.type as StructInfo).align : 0;\r\n }\r\n\r\n get members(): Array<MemberInfo> | null {\r\n return this.type.isStruct ? (this.type as StructInfo).members : null;\r\n }\r\n\r\n get format(): TypeInfo | null {\r\n return this.type.isArray\r\n ? (this.type as ArrayInfo).format\r\n : this.type.isTemplate\r\n ? (this.type as TemplateInfo).format\r\n : null;\r\n }\r\n\r\n get count(): number {\r\n return this.type.isArray ? (this.type as ArrayInfo).count : 0;\r\n }\r\n\r\n get stride(): number {\r\n return this.type.isArray ? (this.type as ArrayInfo).stride : this.size;\r\n }\r\n}\r\n\r\nexport class AliasInfo {\r\n name: string;\r\n type: TypeInfo;\r\n\r\n constructor(name: string, type: TypeInfo) {\r\n this.name = name;\r\n this.type = type;\r\n }\r\n}\r\n\r\nclass _TypeSize {\r\n align: number;\r\n size: number;\r\n\r\n constructor(align: number, size: number) {\r\n this.align = align;\r\n this.size = size;\r\n }\r\n}\r\n\r\nexport class InputInfo {\r\n name: string;\r\n type: TypeInfo | null;\r\n locationType: string;\r\n location: number | string;\r\n interpolation: string | null;\r\n\r\n constructor(\r\n name: string,\r\n type: TypeInfo | null,\r\n locationType: string,\r\n location: number | string\r\n ) {\r\n this.name = name;\r\n this.type = type;\r\n this.locationType = locationType;\r\n this.location = location;\r\n this.interpolation = null;\r\n }\r\n}\r\n\r\nexport class OutputInfo {\r\n name: string;\r\n type: TypeInfo | null;\r\n locationType: string;\r\n location: number | string;\r\n\r\n constructor(\r\n name: string,\r\n type: TypeInfo | null,\r\n locationType: string,\r\n location: number | string\r\n ) {\r\n this.name = name;\r\n this.type = type;\r\n this.locationType = locationType;\r\n this.location = location;\r\n }\r\n}\r\n\r\nexport class OverrideInfo {\r\n name: string;\r\n type: TypeInfo | null;\r\n attributes: Array<AST.Attribute> | null;\r\n id: number;\r\n\r\n constructor(\r\n name: string,\r\n type: TypeInfo | null,\r\n attributes: Array<AST.Attribute> | null,\r\n id: number\r\n ) {\r\n this.name = name;\r\n this.type = type;\r\n this.attributes = attributes;\r\n this.id = id;\r\n }\r\n}\r\n\r\nexport class ArgumentInfo {\r\n name: string;\r\n type: TypeInfo;\r\n\r\n constructor(\r\n name: string,\r\n type: TypeInfo,\r\n ) {\r\n this.name = name;\r\n this.type = type;\r\n }\r\n}\r\n\r\nexport class FunctionInfo {\r\n name: string;\r\n stage: string | null = null;\r\n inputs: Array<InputInfo> = [];\r\n outputs: Array<OutputInfo> = [];\r\n arguments: Array<ArgumentInfo> = [];\r\n returnType: TypeInfo | null = null;\r\n resources: Array<VariableInfo> = [];\r\n overrides: Array<OverrideInfo> = [];\r\n startLine: number = -1;\r\n endLine: number = -1;\r\n inUse: boolean = false;\r\n calls: Set<FunctionInfo> = new Set();\r\n\r\n constructor(name: string, stage: string | null = null) {\r\n this.name = name;\r\n this.stage = stage;\r\n }\r\n}\r\n\r\nexport class EntryFunctions {\r\n vertex: Array<FunctionInfo> = [];\r\n fragment: Array<FunctionInfo> = [];\r\n compute: Array<FunctionInfo> = [];\r\n}\r\n\r\nclass _FunctionResources {\r\n node: AST.Function;\r\n resources: Array<VariableInfo> | null = null;\r\n inUse: boolean = false;\r\n info: FunctionInfo | null = null;\r\n constructor(node: AST.Function) {\r\n this.node = node;\r\n }\r\n}\r\n\r\nexport class WgslReflect {\r\n /// All top-level uniform vars in the shader.\r\n uniforms: Array<VariableInfo> = [];\r\n /// All top-level storage vars in the shader.\r\n storage: Array<VariableInfo> = [];\r\n /// All top-level texture vars in the shader;\r\n textures: Array<VariableInfo> = [];\r\n // All top-level sampler vars in the shader.\r\n samplers: Array<VariableInfo> = [];\r\n /// All top-level type aliases in the shader.\r\n aliases: Array<AliasInfo> = [];\r\n /// All top-level overrides in the shader.\r\n overrides: Array<OverrideInfo> = [];\r\n /// All top-level structs in the shader.\r\n structs: Array<StructInfo> = [];\r\n /// All entry functions in the shader: vertex, fragment, and/or compute.\r\n entry: EntryFunctions = new EntryFunctions();\r\n /// All functions in the shader, including entry functions.\r\n functions: Array<FunctionInfo> = [];\r\n\r\n _types: Map<AST.Type, TypeInfo> = new Map();\r\n _functions: Map<string, _FunctionResources> = new Map();\r\n\r\n constructor(code: string | undefined) {\r\n if (code) {\r\n this.update(code);\r\n }\r\n }\r\n\r\n _isStorageTexture(type: TypeInfo): boolean {\r\n return (\r\n type.name == \"texture_storage_1d\" ||\r\n type.name == \"texture_storage_2d\" ||\r\n type.name == \"texture_storage_2d_array\" ||\r\n type.name == \"texture_storage_3d\"\r\n );\r\n }\r\n\r\n update(code: string) {\r\n const parser = new WgslParser();\r\n const ast = parser.parse(code);\r\n\r\n for (const node of ast) {\r\n if (node instanceof AST.Function) {\r\n this._functions.set(node.name, new _FunctionResources(node as AST.Function));\r\n }\r\n }\r\n\r\n for (const node of ast) {\r\n if (node instanceof AST.Struct) {\r\n const info = this._getTypeInfo(node as AST.Struct, null);\r\n if (info instanceof StructInfo) {\r\n this.structs.push(info as StructInfo);\r\n }\r\n }\r\n }\r\n\r\n for (const node of ast) {\r\n if (node instanceof AST.Alias) {\r\n this.aliases.push(this._getAliasInfo(node as AST.Alias));\r\n continue;\r\n }\r\n\r\n if (node instanceof AST.Override) {\r\n const v = node as AST.Override;\r\n const id = this._getAttributeNum(v.attributes, \"id\", 0);\r\n const type =\r\n v.type != null ? this._getTypeInfo(v.type, v.attributes) : null;\r\n this.overrides.push(new OverrideInfo(v.name, type, v.attributes, id));\r\n continue;\r\n }\r\n\r\n if (this._isUniformVar(node)) {\r\n const v = node as AST.Var;\r\n const g = this._getAttributeNum(v.attributes, \"group\", 0);\r\n const b = this._getAttributeNum(v.attributes, \"binding\", 0);\r\n const type = this._getTypeInfo(v.type!, v.attributes);\r\n const varInfo = new VariableInfo(\r\n v.name,\r\n type,\r\n g,\r\n b,\r\n v.attributes,\r\n ResourceType.Uniform,\r\n v.access\r\n );\r\n this.uniforms.push(varInfo);\r\n continue;\r\n }\r\n\r\n if (this._isStorageVar(node)) {\r\n const v = node as AST.Var;\r\n const g = this._getAttributeNum(v.attributes, \"group\", 0);\r\n const b = this._getAttributeNum(v.attributes, \"binding\", 0);\r\n const type = this._getTypeInfo(v.type!, v.attributes);\r\n const isStorageTexture = this._isStorageTexture(type);\r\n const varInfo = new VariableInfo(\r\n v.name,\r\n type,\r\n g,\r\n b,\r\n v.attributes,\r\n isStorageTexture ? ResourceType.StorageTexture : ResourceType.Storage,\r\n v.access\r\n );\r\n this.storage.push(varInfo);\r\n continue;\r\n }\r\n\r\n if (this._isTextureVar(node)) {\r\n const v = node as AST.Var;\r\n const g = this._getAttributeNum(v.attributes, \"group\", 0);\r\n const b = this._getAttributeNum(v.attributes, \"binding\", 0);\r\n const type = this._getTypeInfo(v.type!, v.attributes);\r\n const isStorageTexture = this._isStorageTexture(type);\r\n const varInfo = new VariableInfo(\r\n v.name,\r\n type,\r\n g,\r\n b,\r\n v.attributes,\r\n isStorageTexture ? ResourceType.StorageTexture : ResourceType.Texture,\r\n v.access\r\n );\r\n if (isStorageTexture) {\r\n this.storage.push(varInfo);\r\n } else {\r\n this.textures.push(varInfo);\r\n }\r\n continue;\r\n }\r\n\r\n if (this._isSamplerVar(node)) {\r\n const v = node as AST.Var;\r\n const g = this._getAttributeNum(v.attributes, \"group\", 0);\r\n const b = this._getAttributeNum(v.attributes, \"binding\", 0);\r\n const type = this._getTypeInfo(v.type!, v.attributes);\r\n const varInfo = new VariableInfo(\r\n v.name,\r\n type,\r\n g,\r\n b,\r\n v.attributes,\r\n ResourceType.Sampler,\r\n v.access\r\n );\r\n this.samplers.push(varInfo);\r\n continue;\r\n }\r\n\r\n if (node instanceof AST.Function) {\r\n const vertexStage = this._getAttribute(node, \"vertex\");\r\n const fragmentStage = this._getAttribute(node, \"fragment\");\r\n const computeStage = this._getAttribute(node, \"compute\");\r\n const stage = vertexStage || fragmentStage || computeStage;\r\n\r\n const fn = new FunctionInfo(node.name, stage?.name);\r\n fn.startLine = node.startLine;\r\n fn.endLine = node.endLine;\r\n this.functions.push(fn);\r\n this._functions.get(node.name)!.info = fn;\r\n\r\n if (stage) {\r\n this._functions.get(node.name)!.inUse = true;\r\n fn.inUse = true;\r\n fn.resources = this._findResources(node, !!stage);\r\n fn.inputs = this._getInputs(node.args);\r\n fn.outputs = this._getOutputs(node.returnType);\r\n this.entry[stage.name].push(fn);\r\n } else {\r\n fn.arguments = node.args.map(\r\n (arg) =>\r\n new ArgumentInfo(\r\n arg.name,\r\n this._getTypeInfo(arg.type, arg.attributes)\r\n )\r\n );\r\n fn.returnType = node.returnType\r\n ? this._getTypeInfo(node.returnType, node.attributes)\r\n : null;\r\n }\r\n continue;\r\n }\r\n }\r\n\r\n for (const fn of this._functions.values()) {\r\n if (fn.info) {\r\n fn.info.inUse = fn.inUse;\r\n this._addCalls(fn.node, fn.info.calls);\r\n }\r\n }\r\n\r\n for (const fn of this._functions.values()) {\r\n fn.node.search((node) => {\r\n if (node.astNodeType === \"varExpr\") {\r\n const v = node as AST.VariableExpr;\r\n for (const override of this.overrides) {\r\n if (v.name == override.name) {\r\n fn.info?.overrides.push(override);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n for (const u of this.uniforms) {\r\n this._markStructsInUse(u.type);\r\n }\r\n for (const s of this.storage) {\r\n this._markStructsInUse(s.type);\r\n }\r\n }\r\n\r\n _markStructsInUse(type: TypeInfo) {\r\n if (!type) {\r\n return;\r\n }\r\n if (type.isStruct) {\r\n (type as StructInfo).inUse = true;\r\n if ((type as StructInfo).members) {\r\n for (const m of (type as StructInfo).members) {\r\n this._markStructsInUse(m.type);\r\n }\r\n }\r\n } else if (type.isArray) {\r\n this._markStructsInUse((type as ArrayInfo).format);\r\n } else if (type.isTemplate) {\r\n if ((type as TemplateInfo).format) {\r\n this._markStructsInUse((type as TemplateInfo).format!);\r\n }\r\n } else {\r\n const alias = this._getAlias(type.name);\r\n if (alias) {\r\n this._markStructsInUse(alias);\r\n }\r\n }\r\n }\r\n\r\n _addCalls(fn: AST.Function, calls: Set<FunctionInfo>, ) {\r\n for (const call of fn.calls) {\r\n const info = this._functions.get(call.name)?.info;\r\n if (info) {\r\n calls.add(info);\r\n }\r\n }\r\n }\r\n\r\n /// Find a resource by its group and binding.\r\n findResource(group: number, binding: number) {\r\n for (const u of this.uniforms) {\r\n if (u.group == group && u.binding == binding) {\r\n return u;\r\n }\r\n }\r\n for (const s of this.storage) {\r\n if (s.group == group && s.binding == binding) {\r\n return s;\r\n }\r\n }\r\n for (const t of this.textures) {\r\n if (t.group == group && t.binding == binding) {\r\n return t;\r\n }\r\n }\r\n for (const s of this.samplers) {\r\n if (s.group == group && s.binding == binding) {\r\n return s;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n _findResource(name: string): VariableInfo | null {\r\n for (const u of this.uniforms) {\r\n if (u.name == name) {\r\n return u;\r\n }\r\n }\r\n for (const s of this.storage) {\r\n if (s.name == name) {\r\n return s;\r\n }\r\n }\r\n for (const t of this.textures) {\r\n if (t.name == name) {\r\n return t;\r\n }\r\n }\r\n for (const s of this.samplers) {\r\n if (s.name == name) {\r\n return s;\r\n }\r\n }\r\n return null;\r\n }\r\n \r\n _markStructsFromAST(type: AST.Type) {\r\n const info = this._getTypeInfo(type, null);\r\n this._markStructsInUse(info);\r\n }\r\n\r\n _findResources(fn: AST.Node, isEntry: boolean): Array<VariableInfo> {\r\n const resources = [];\r\n const self = this;\r\n const varStack = [];\r\n fn.search((node) => {\r\n if (node instanceof AST._BlockStart) {\r\n varStack.push({});\r\n } else if (node instanceof AST._BlockEnd) {\r\n varStack.pop();\r\n } else if (node instanceof AST.Var) {\r\n const v = node as AST.Var;\r\n if (isEntry && v.type !== null) {\r\n this._markStructsFromAST(v.type);\r\n }\r\n if (varStack.length > 0) {\r\n varStack[varStack.length - 1][v.name] = v;\r\n }\r\n } else if (node instanceof AST.CreateExpr) {\r\n const c = node as AST.CreateExpr;\r\n if (isEntry && c.type !== null) {\r\n this._markStructsFromAST(c.type);\r\n }\r\n } else if (node instanceof AST.Let) {\r\n const v = node as AST.Let;\r\n if (isEntry && v.type !== null) {\r\n this._markStructsFromAST(v.type);\r\n }\r\n if (varStack.length > 0) {\r\n varStack[varStack.length - 1][v.name] = v;\r\n }\r\n } else if (node instanceof AST.VariableExpr) {\r\n const v = node as AST.VariableExpr;\r\n // Check to see if the variable is a local variable before checking to see if it's\r\n // a resource.\r\n if (varStack.length > 0) {\r\n const varInfo = varStack[varStack.length - 1][v.name];\r\n if (varInfo) {\r\n return;\r\n }\r\n }\r\n const varInfo = self._findResource(v.name);\r\n if (varInfo) {\r\n resources.push(varInfo);\r\n }\r\n } else if (node instanceof AST.CallExpr) {\r\n const c = node as AST.CallExpr;\r\n const callFn = self._functions.get(c.name);\r\n if (callFn) {\r\n if (isEntry) {\r\n callFn.inUse = true;\r\n }\r\n (fn as AST.Function).calls.add(callFn.node);\r\n if (callFn.resources === null) {\r\n callFn.resources = self._findResources(callFn.node, isEntry);\r\n }\r\n resources.push(...callFn.resources);\r\n }\r\n } else if (node instanceof AST.Call) {\r\n const c = node as AST.Call;\r\n const callFn = self._functions.get(c.name);\r\n if (callFn) {\r\n if (isEntry) {\r\n callFn.inUse = true;\r\n }\r\n (fn as AST.Function).calls.add(callFn.node);\r\n if (callFn.resources === null) {\r\n callFn.resources = self._findResources(callFn.node, isEntry);\r\n }\r\n resources.push(...callFn.resources);\r\n }\r\n }\r\n });\r\n return [...new Map(resources.map(r => [r.name, r])).values()];\r\n }\r\n\r\n getBindGroups(): Array<Array<VariableInfo>> {\r\n const groups: Array<Array<VariableInfo>> = [];\r\n\r\n function _makeRoom(group: number, binding: number) {\r\n if (group >= groups.length) {\r\n groups.length = group + 1;\r\n }\r\n\r\n if (groups[group] === undefined) {\r\n groups[group] = [];\r\n }\r\n\r\n if (binding >= groups[group].length) {\r\n groups[group].length = binding + 1;\r\n }\r\n }\r\n\r\n for (const u of this.uniforms) {\r\n _makeRoom(u.group, u.binding);\r\n const group = groups[u.group];\r\n group[u.binding] = u;\r\n }\r\n\r\n for (const u of this.storage) {\r\n _makeRoom(u.group, u.binding);\r\n const group = groups[u.group];\r\n group[u.binding] = u;\r\n }\r\n\r\n for (const t of this.textures) {\r\n _makeRoom(t.group, t.binding);\r\n const group = groups[t.group];\r\n group[t.binding] = t;\r\n }\r\n\r\n for (const t of this.samplers) {\r\n _makeRoom(t.group, t.binding);\r\n const group = groups[t.group];\r\n group[t.binding] = t;\r\n }\r\n\r\n return groups;\r\n }\r\n\r\n _getOutputs(\r\n type: AST.Type,\r\n outputs: Array<OutputInfo> | undefined = undefined\r\n ): Array<OutputInfo> {\r\n if (outputs === undefined) {\r\n outputs = [];\r\n }\r\n\r\n if (type instanceof AST.Struct) {\r\n this._getStructOutputs(type, outputs);\r\n } else {\r\n const output = this._getOutputInfo(type);\r\n if (output !== null) {\r\n outputs.push(output);\r\n }\r\n }\r\n\r\n return outputs;\r\n }\r\n\r\n _getStructOutputs(struct: AST.Struct, outputs: Array<OutputInfo>) {\r\n for (const m of struct.members) {\r\n if (m.type instanceof AST.Struct) {\r\n this._getStructOutputs(m.type, outputs);\r\n } else {\r\n const location =\r\n this._getAttribute(m, \"location\") || this._getAttribute(m, \"builtin\");\r\n if (location !== null) {\r\n const typeInfo = this._getTypeInfo(m.type, m.type.attributes);\r\n const locationValue = this._parseInt(location.value);\r\n const info = new OutputInfo(\r\n m.name,\r\n typeInfo,\r\n location.name,\r\n locationValue\r\n );\r\n outputs.push(info);\r\n }\r\n }\r\n }\r\n }\r\n\r\n _getOutputInfo(type: AST.Type): OutputInfo | null {\r\n const location =\r\n this._getAttribute(type, \"location\") ||\r\n this._getAttribute(type, \"builtin\");\r\n if (location !== null) {\r\n const typeInfo = this._getTypeInfo(type, type.attributes);\r\n const locationValue = this._parseInt(location.value);\r\n const info = new OutputInfo(\"\", typeInfo, location.name, locationValue);\r\n return info;\r\n }\r\n return null;\r\n }\r\n\r\n _getInputs(\r\n args: Array<AST.Argument>,\r\n inputs: Array<InputInfo> | undefined = undefined\r\n ): Array<InputInfo> {\r\n if (inputs === undefined) {\r\n inputs = [];\r\n }\r\n\r\n for (const arg of args) {\r\n if (arg.type instanceof AST.Struct) {\r\n this._getStructInputs(arg.type, inputs);\r\n } else {\r\n const input = this._getInputInfo(arg);\r\n if (input !== null) {\r\n inputs.push(input);\r\n }\r\n }\r\n }\r\n\r\n return inputs;\r\n }\r\n\r\n _getStructInputs(struct: AST.Struct, inputs: Array<InputInfo>) {\r\n for (const m of struct.members) {\r\n if (m.type instanceof AST.Struct) {\r\n this._getStructInputs(m.type, inputs);\r\n } else {\r\n const input = this._getInputInfo(m);\r\n if (input !== null) {\r\n inputs.push(input);\r\n }\r\n }\r\n }\r\n }\r\n\r\n _getInputInfo(node: AST.Member | AST.Argument): InputInfo | null {\r\n const location =\r\n this._getAttribute(node, \"location\") ||\r\n this._getAttribute(node, \"builtin\");\r\n if (location !== null) {\r\n const interpolation = this._getAttribute(node, \"interpolation\");\r\n const type = this._getTypeInfo(node.type, node.attributes);\r\n const locationValue = this._parseInt(location.value);\r\n const info = new InputInfo(node.name, type, location.name, locationValue);\r\n if (interpolation !== null) {\r\n info.interpolation = this._parseString(interpolation.value);\r\n }\r\n return info;\r\n }\r\n return null;\r\n }\r\n\r\n _parseString(s: string | string[]): string {\r\n if (s instanceof Array) {\r\n s = s[0];\r\n }\r\n return s;\r\n }\r\n\r\n _parseInt(s: string | string[]): number | string {\r\n if (s instanceof Array) {\r\n s = s[0];\r\n }\r\n const n = parseInt(s);\r\n return isNaN(n) ? s : n;\r\n }\r\n\r\n _getAlias(name: string): TypeInfo | null {\r\n for (const a of this.aliases) {\r\n if (a.name == name) {\r\n return a.type;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n _getAliasInfo(node: AST.Alias): AliasInfo {\r\n return new AliasInfo(node.name, this._getTypeInfo(node.type!, null));\r\n }\r\n\r\n _getTypeInfo(\r\n type: AST.Type,\r\n attributes: Array<AST.Attribute> | null\r\n ): TypeInfo {\r\n if (this._types.has(type)) {\r\n return this._types.get(type)!;\r\n }\r\n\r\n if (type instanceof AST.ArrayType) {\r\n const a = type as AST.ArrayType;\r\n const t = a.format ? this._getTypeInfo(a.format!, a.attributes) : null;\r\n const info = new ArrayInfo(a.name, attributes);\r\n info.format = t;\r\n info.count = a.count;\r\n this._types.set(type, info);\r\n this._updateTypeInfo(info);\r\n return info;\r\n }\r\n\r\n if (type instanceof AST.Struct) {\r\n const s = type as AST.Struct;\r\n const info = new StructInfo(s.name, attributes);\r\n info.startLine = s.startLine;\r\n info.endLine = s.endLine;\r\n for (const m of s.members) {\r\n const t = this._getTypeInfo(m.type!, m.attributes);\r\n info.members.push(new MemberInfo(m.name, t, m.attributes));\r\n }\r\n this._types.set(type, info);\r\n this._updateTypeInfo(info);\r\n return info;\r\n }\r\n\r\n if (type instanceof AST.SamplerType) {\r\n const s = type as AST.SamplerType;\r\n const formatIsType = s.format instanceof AST.Type;\r\n const format = s.format\r\n ? formatIsType\r\n ? this._getTypeInfo(s.format! as AST.Type, null)\r\n : new TypeInfo(s.format! as string, null)\r\n : null;\r\n const info = new TemplateInfo(s.name, format, attributes, s.access);\r\n this._types.set(type, info);\r\n this._updateTypeInfo(info);\r\n return info;\r\n }\r\n\r\n if (type instanceof AST.TemplateType) {\r\n const t = type as AST.TemplateType;\r\n const format = t.format ? this._getTypeInfo(t.format!, null) : null;\r\n const info = new TemplateInfo(t.name, format, attributes, t.access);\r\n this._types.set(type, info);\r\n this._updateTypeInfo(info);\r\n return info;\r\n }\r\n\r\n const info = new TypeInfo(type.name, attributes);\r\n this._types.set(type, info);\r\n this._updateTypeInfo(info);\r\n return info;\r\n }\r\n\r\n _updateTypeInfo(type: TypeInfo) {\r\n const typeSize = this._getTypeSize(type);\r\n type.size = typeSize?.size ?? 0;\r\n\r\n if (type instanceof ArrayInfo) {\r\n if (type[\"format\"]) {\r\n const formatInfo = this._getTypeSize(type[\"format\"]);\r\n type.stride = formatInfo?.size ?? 0;\r\n this._updateTypeInfo(type[\"format\"]);\r\n }\r\n }\r\n\r\n if (type instanceof StructInfo) {\r\n this._updateStructInfo(type);\r\n }\r\n }\r\n\r\n _updateStructInfo(struct: StructInfo) {\r\n let offset = 0;\r\n let lastSize = 0;\r\n let lastOffset = 0;\r\n let structAlign = 0;\r\n\r\n for (let mi = 0, ml = struct.members.length; mi < ml; ++mi) {\r\n const member = struct.members[mi];\r\n\r\n const sizeInfo = this._getTypeSize(member);\r\n if (!sizeInfo) {\r\n continue;\r\n }\r\n\r\n const type = this._getAlias(member.type.name) ?? member.type;\r\n const align = sizeInfo.align;\r\n const size = sizeInfo.size;\r\n offset = this._roundUp(align, offset + lastSize);\r\n lastSize = size;\r\n lastOffset = offset;\r\n structAlign = Math.max(structAlign, align);\r\n\r\n member.offset = offset;\r\n member.size = size;\r\n\r\n this._updateTypeInfo(member.type);\r\n }\r\n\r\n struct.size = this._roundUp(structAlign, lastOffset + lastSize);\r\n struct.align = structAlign;\r\n }\r\n\r\n _getTypeSize(\r\n type: TypeInfo | MemberInfo | null | undefined\r\n ): _TypeSize | null {\r\n if (type === null || type === undefined) {\r\n return null;\r\n }\r\n\r\n const explicitSize = this._getAttributeNum(type.attributes, \"size\", 0);\r\n const explicitAlign = this._getAttributeNum(type.attributes, \"align\", 0);\r\n\r\n if (type instanceof MemberInfo) {\r\n type = type.type;\r\n }\r\n\r\n if (type instanceof TypeInfo) {\r\n const alias = this._getAlias(type.name);\r\n if (alias !== null) {\r\n type = alias;\r\n }\r\n }\r\n\r\n {\r\n const info = WgslReflect._typeInfo[type.name];\r\n if (info !== undefined) {\r\n const divisor = type[\"format\"]?.name === \"f16\" ? 2 : 1;\r\n return new _TypeSize(\r\n Math.max(explicitAlign, info.align / divisor),\r\n Math.max(explicitSize, info.size / divisor)\r\n );\r\n }\r\n }\r\n\r\n {\r\n const info =\r\n WgslReflect._typeInfo[type.name.substring(0, type.name.length - 1)];\r\n if (info) {\r\n const divisor = type.name[type.name.length - 1] === \"h\" ? 2 : 1;\r\n return new _TypeSize(\r\n Math.max(explicitAlign, info.align / divisor),\r\n Math.max(explicitSize, info.size / divisor)\r\n );\r\n }\r\n }\r\n\r\n if (type instanceof ArrayInfo) {\r\n let arrayType = type as ArrayInfo;\r\n let align = 8;\r\n let size = 8;\r\n // Type AlignOf(T) Sizeof(T)\r\n // array<E, N> AlignOf(E) N * roundUp(AlignOf(E), SizeOf(E))\r\n // array<E> AlignOf(E) N * roundUp(AlignOf(E), SizeOf(E)) (N determined at runtime)\r\n //\r\n // @stride(Q)\r\n // array<E, N> AlignOf(E) N * Q\r\n //\r\n // @stride(Q)\r\n // array<E> AlignOf(E) Nruntime * Q\r\n //const E = type.format.name;\r\n const E = this._getTypeSize(arrayType.format);\r\n if (E !== null) {\r\n size = E.size;\r\n align = E.align;\r\n }\r\n\r\n const N = arrayType.count;\r\n\r\n const stride = this._getAttributeNum(\r\n type?.attributes ?? null,\r\n \"stride\",\r\n this._roundUp(align, size)\r\n );\r\n size = N * stride;\r\n\r\n if (explicitSize) {\r\n size = explicitSize;\r\n }\r\n\r\n return new _TypeSize(\r\n Math.max(explicitAlign, align),\r\n Math.max(explicitSize, size)\r\n );\r\n }\r\n\r\n if (type instanceof StructInfo) {\r\n let align = 0;\r\n let size = 0;\r\n // struct S AlignOf: max(AlignOfMember(S, M1), ... , AlignOfMember(S, MN))\r\n // SizeOf: roundUp(AlignOf(S), OffsetOfMember(S, L) + SizeOfMember(S, L))\r\n // Where L is the last member of the structure\r\n let offset = 0;\r\n let lastSize = 0;\r\n let lastOffset = 0;\r\n for (const m of type.members) {\r\n const mi = this._getTypeSize(m.type);\r\n if (mi !== null) {\r\n align = Math.max(mi.align, align);\r\n offset = this._roundUp(mi.align, offset + lastSize);\r\n lastSize = mi.size;\r\n lastOffset = offset;\r\n }\r\n }\r\n size = this._roundUp(align, lastOffset + lastSize);\r\n\r\n return new _TypeSize(\r\n Math.max(explicitAlign, align),\r\n Math.max(explicitSize, size)\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n _isUniformVar(node: AST.Node): boolean {\r\n return node instanceof AST.Var && node.storage == \"uniform\";\r\n }\r\n\r\n _isStorageVar(node: AST.Node): boolean {\r\n return node instanceof AST.Var && node.storage == \"storage\";\r\n }\r\n\r\n _isTextureVar(node: AST.Node): boolean {\r\n return (\r\n node instanceof AST.Var &&\r\n node.type !== null &&\r\n WgslReflect._textureTypes.indexOf(node.type.name) != -1\r\n );\r\n }\r\n\r\n _isSamplerVar(node: AST.Node): boolean {\r\n return (\r\n node instanceof AST.Var &&\r\n node.type !== null &&\r\n WgslReflect._samplerTypes.indexOf(node.type.name) != -1\r\n );\r\n }\r\n\r\n _getAttribute(node: AST.Node, name: string): AST.Attribute | null {\r\n const obj = node as Object;\r\n if (!obj || !obj[\"attributes\"]) {\r\n return null;\r\n }\r\n const attrs = obj[\"attributes\"];\r\n for (let a of attrs) {\r\n if (a.name == name) {\r\n return a;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n _getAttributeNum(\r\n attributes: Array<AST.Attribute> | null,\r\n name: string,\r\n defaultValue: number\r\n ): number {\r\n if (attributes === null) {\r\n return defaultValue;\r\n }\r\n for (let a of attributes) {\r\n if (a.name == name) {\r\n let v = a !== null && a.value !== null ? a.value : defaultValue;\r\n if (v instanceof Array) {\r\n v = v[0];\r\n }\r\n if (typeof v === \"number\") {\r\n return v;\r\n }\r\n if (typeof v === \"string\") {\r\n return parseInt(v);\r\n }\r\n return defaultValue;\r\n }\r\n }\r\n return defaultValue;\r\n }\r\n\r\n _roundUp(k: number, n: number): number {\r\n return Math.ceil(n / k) * k;\r\n }\r\n\r\n // Type AlignOf(T) Sizeof(T)\r\n // i32, u32, or f32 4 4\r\n // atomic<T> 4 4\r\n // vec2<T> 8 8\r\n // vec3<T> 16 12\r\n // vec4<T> 16 16\r\n // mat2x2<f32> 8 16\r\n // mat3x2<f32> 8 24\r\n // mat4x2<f32> 8 32\r\n // mat2x3<f32> 16 32\r\n // mat3x3<f32> 16 48\r\n // mat4x3<f32> 16 64\r\n // mat2x4<f32> 16 32\r\n // mat3x4<f32> 16 48\r\n // mat4x4<f32> 16 64\r\n static readonly _typeInfo = {\r\n f16: { align: 2, size: 2 },\r\n i32: { align: 4, size: 4 },\r\n u32: { align: 4, size: 4 },\r\n f32: { align: 4, size: 4 },\r\n atomic: { align: 4, size: 4 },\r\n vec2: { align: 8, size: 8 },\r\n vec3: { align: 16, size: 12 },\r\n vec4: { align: 16, size: 16 },\r\n mat2x2: { align: 8, size: 16 },\r\n mat3x2: { align: 8, size: 24 },\r\n mat4x2: { align: 8, size: 32 },\r\n mat2x3: { align: 16, size: 32 },\r\n mat3x3: { align: 16, size: 48 },\r\n mat4x3: { align: 16, size: 64 },\r\n mat2x4: { align: 16, size: 32 },\r\n mat3x4: { align: 16, size: 48 },\r\n mat4x4: { align: 16, size: 64 },\r\n };\r\n\r\n static readonly _textureTypes = TokenTypes.any_texture_type.map((t) => {\r\n return t.name;\r\n });\r\n static readonly _samplerTypes = TokenTypes.sampler_type.map((t) => {\r\n return t.name;\r\n });\r\n}\r\n"],"names":["IncrementOperator","AssignOperator","TokenClass","AST.ParseContext","AST.VariableExpr","AST.Argument","AST.Function","AST.Discard","AST.Break","AST.Continue","AST.StaticAssert","AST.While","AST.Continuing","AST.For","AST.Var","AST.Let","AST.Const","AST.Increment","AST.IncrementOperator","AST.Assign","AST.AssignOperator","AST.Call","AST.Loop","AST.Switch","AST.Case","AST.Default","AST.If","AST.ElseIf","AST.Return","AST.BinaryOperator","AST.UnaryOperator","AST.ArrayIndex","AST.StringExpr","AST.CreateExpr","AST.CallExpr","AST.ConstExpr","AST.LiteralExpr","AST.BitcastExpr","AST.GroupingExpr","AST.Member","AST.Struct","AST.Override","AST.Diagnostic","AST.Enable","AST.Requires","AST.Alias","AST.Type","AST.TemplateType","AST.PointerType","AST.ArrayType","AST.SamplerType","AST.Attribute","ResourceType","AST._BlockStart","AST._BlockEnd"],"mappings":";;;;MAAa,YAAY,CAAA;AAAzB,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,GAAG,EAAE,CAAC;AAC1C,QAAA,IAAA,CAAA,OAAO,GAAuB,IAAI,GAAG,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;KAC1C;AAAA,CAAA;AAED;;;;AAIG;MACU,IAAI,CAAA;AACf,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,IAAI,S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