tree-sitter-rhai/corpus/assignment.txt

53 lines
1.5 KiB
Plaintext
Raw Normal View History

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