@@ -106,41 +106,41 @@ The parser generates a tree of nodes. Here is the specification for each node ty
106106<summary >Click to expand AST Specification</summary >
107107
108108#### ** Literals & Identifiers**
109- * ` { TYPE = "Variable", Name = <string>, VariableType = <"Local" | "Global" | "Upvalue"> } `
110- * ` { TYPE = "StringLiteral", Value = <string> } `
111- * ` { TYPE = "NumericLiteral", Value = <number> } `
112- * ` { TYPE = "BooleanLiteral", Value = <bool> } `
113- * ` { TYPE = "NilLiteral" } `
114- * ` { TYPE = "VarargExpression" } `
109+ * ` { kind = "Variable", name = <string>, variableType = <"Local" | "Global" | "Upvalue"> } `
110+ * ` { kind = "StringLiteral", value = <string> } `
111+ * ` { kind = "NumericLiteral", value = <number> } `
112+ * ` { kind = "BooleanLiteral", value = <bool> } `
113+ * ` { kind = "NilLiteral" } `
114+ * ` { kind = "VarargExpression" } `
115115
116116#### ** Expressions**
117- * ` { TYPE = "FunctionExpression", Body = <Block>, Parameters = <list_of_strings>, IsVarArg = <bool> } `
118- * ` { TYPE = "UnaryOperator", Operator = <string>, Operand = <node> } `
119- * ` { TYPE = "BinaryOperator", Operator = <string>, Left = <node>, Right = <node> } `
120- * ` { TYPE = "FunctionCall", Callee = <node>, Arguments = <list_of_nodes>, IsMethodCall = <bool> } `
121- * ` { TYPE = "IndexExpression", Base = <node>, Index = <node>, IsPrecomputed = <bool>? } `
122- * ` { TYPE = "TableConstructor", Elements = <list_of_TableElement> } `
123- * ` { TYPE = "TableElement", Key = <node>, Value = <node>, IsImplicitKey = <bool> } `
124- * ` { TYPE = "ParenthesizedExpression", Expression = <node> } `
117+ * ` { kind = "FunctionExpression", body = <Block>, parameters = <list_of_strings>, isVarArg = <bool> } `
118+ * ` { kind = "UnaryOperator", operator = <string>, operand = <node> } `
119+ * ` { kind = "BinaryOperator", operator = <string>, left = <node>, right = <node> } `
120+ * ` { kind = "FunctionCall", callee = <node>, arguments = <list_of_nodes>, isMethodCall = <bool> } `
121+ * ` { kind = "IndexExpression", base = <node>, index = <node>, isPrecomputed = <bool>? } `
122+ * ` { kind = "TableConstructor", elements = <list_of_TableElement> } `
123+ * ` { kind = "TableElement", key = <node>, value = <node>, isImplicitKey = <bool> } `
124+ * ` { kind = "ParenthesizedExpression", expression = <node> } `
125125
126126#### ** Statements**
127- * ` { TYPE = "LocalDeclarationStatement", Variables = <list_of_strings>, Initializers = <list_of_nodes> } `
128- * ` { TYPE = "LocalFunctionDeclaration", Name = <string>, Body = <FunctionExpression> } `
129- * ` { TYPE = "AssignmentStatement", LValues = <list_of_nodes>, Expressions = <list_of_nodes> } `
130- * ` { TYPE = "CallStatement", Expression = <FunctionCall> } `
131- * ` { TYPE = "IfClause", Condition = <node>, Body = <Block> } `
132- * ` { TYPE = "IfStatement", Clauses = <list_of_IfClauses>, ElseClause = <Block>? } `
133- * ` { TYPE = "WhileStatement", Condition = <node>, Body = <Block> } `
134- * ` { TYPE = "RepeatStatement", Body = <Block>, Condition = <node> } `
135- * ` { TYPE = "ForNumericStatement", Variable = <Identifier>, Start = <node>, End = <node>, Step = <node>?, Body = <Block> } `
136- * ` { TYPE = "ForGenericStatement", Iterators = <list_of_strings>, Expressions = <list_of_nodes>, Body = <Block> } `
137- * ` { TYPE = "DoStatement", Body = <Block> } `
138- * ` { TYPE = "ReturnStatement", Expressions = <list_of_nodes> } `
139- * ` { TYPE = "BreakStatement" } `
127+ * ` { kind = "LocalDeclarationStatement", variables = <list_of_strings>, initializers = <list_of_nodes> } `
128+ * ` { kind = "LocalFunctionDeclaration", name = <string>, body = <FunctionExpression> } `
129+ * ` { kind = "AssignmentStatement", lvalues = <list_of_nodes>, expressions = <list_of_nodes> } `
130+ * ` { kind = "CallStatement", expression = <FunctionCall> } `
131+ * ` { kind = "IfClause", condition = <node>, body = <Block> } `
132+ * ` { kind = "IfStatement", clauses = <list_of_IfClauses>, elseClause = <Block>? } `
133+ * ` { kind = "WhileStatement", condition = <node>, body = <Block> } `
134+ * ` { kind = "RepeatStatement", body = <Block>, condition = <node> } `
135+ * ` { kind = "ForNumericStatement", variable = <Identifier>, start = <node>, limit = <node>, step = <node>?, body = <Block> } `
136+ * ` { kind = "ForGenericStatement", iterators = <list_of_strings>, expressions = <list_of_nodes>, body = <Block> } `
137+ * ` { kind = "DoStatement", body = <Block> } `
138+ * ` { kind = "ReturnStatement", expressions = <list_of_nodes> } `
139+ * ` { kind = "BreakStatement" } `
140140
141141#### ** Program Structure**
142- * ` { TYPE = "Block", Statements = <list_of_statement> } `
143- * ` { TYPE = "Program", Body = <Block> } `
142+ * ` { kind = "Block", statements = <list_of_statement> } `
143+ * ` { kind = "Program", body = <Block> } `
144144
145145</details >
146146
0 commit comments