feat: add base parser

Signed-off-by: kjuulh <contact@kjuulh.io>

feat: with basic assignment

Signed-off-by: kjuulh <contact@kjuulh.io>

feat: remove target

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-07-03 20:16:09 +02:00
commit 67e3f73ab4
18 changed files with 4113 additions and 0 deletions

52
corpus/assignment.txt Normal file
View File

@@ -0,0 +1,52 @@
================================================================================
let assignment integer
================================================================================
let a = 42;
--------------------------------------------------------------------------------
(source_file
(let_declaration
(identifier)
(integer_literal)))
================================================================================
let assignment string
================================================================================
let some_value = "string";
--------------------------------------------------------------------------------
(source_file
(let_declaration
(identifier)
(string_literal)))
================================================================================
let assignment object
================================================================================
let some_value = some_other_value;
--------------------------------------------------------------------------------
(source_file
(let_declaration
(identifier)
(identifier)))
================================================================================
naked assignment integer
================================================================================
some_value = some_other_value;
--------------------------------------------------------------------------------
(source_file
(expression_statement
(assignment_expression
left: (identifier)
right: (identifier))))