tree-sitter-rhai/corpus/assignment.txt
kjuulh 67e3f73ab4
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>
2023-07-03 22:45:50 +02:00

53 lines
1.5 KiB
Plaintext

================================================================================
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))))