From ef4e8c20719822eebd6318a878cc37902c2b85a5 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Mon, 31 Mar 2025 19:27:55 +0300 Subject: pc thing --- the_e_programming_language/ast.json | 79 +++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 the_e_programming_language/ast.json (limited to 'the_e_programming_language/ast.json') diff --git a/the_e_programming_language/ast.json b/the_e_programming_language/ast.json new file mode 100644 index 0000000..faf9b67 --- /dev/null +++ b/the_e_programming_language/ast.json @@ -0,0 +1,79 @@ +[ + { + "type": "VariableDeclaration", + "identifier": "buff", + "value": { + "type": "Number", + "value": 0 + }, + "vtype": "int", + "length": 4 + }, + { + "type": "VariableDeclaration", + "identifier": "counter", + "value": { + "type": "Number", + "value": 0 + }, + "vtype": "int", + "length": 1 + }, + { + "type": "FunctionDeclaration", + "name": "_start", + "body": [ + { + "type": "While", + "condition": { + "type": "BinaryExpression", + "operator": "<", + "left": { + "type": "Identifier", + "name": "counter" + }, + "right": { + "type": "Number", + "value": 4 + } + }, + "branch": [ + { + "type": "Assignment", + "identifier": { + "type": "Identifier", + "name": "buff", + "offset": { + "type": "Identifier", + "name": "counter" + } + }, + "value": { + "type": "Identifier", + "name": "counter" + } + }, + { + "type": "Assignment", + "identifier": { + "type": "Identifier", + "name": "counter" + }, + "value": { + "type": "BinaryExpression", + "operator": "+", + "left": { + "type": "Identifier", + "name": "counter" + }, + "right": { + "type": "Number", + "value": 1 + } + } + } + ] + } + ] + } +] \ No newline at end of file -- cgit 1.4.1-2-gfad0