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:
52
corpus/assignment.txt
Normal file
52
corpus/assignment.txt
Normal 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))))
|
Reference in New Issue
Block a user