Add variable declarations

This commit is contained in:
Bruno BELANYI 2022-06-01 20:41:25 +02:00
parent 3cf701dbb1
commit 3eb6b0a0d0
5 changed files with 2280 additions and 1721 deletions

View file

@ -6,6 +6,50 @@ Empty declarations
(source_file)
================================================================================
Variable declaration
================================================================================
var a := 12
--------------------------------------------------------------------------------
(source_file
(variable_declaration
name: (identifier)
value: (integer_literal)))
================================================================================
Variable declaration with type
================================================================================
var a : int := 27
--------------------------------------------------------------------------------
(source_file
(variable_declaration
name: (identifier)
type: (identifier)
value: (integer_literal)))
================================================================================
Multiple variable declarations
================================================================================
var a := 12
var b := 27
--------------------------------------------------------------------------------
(source_file
(variable_declaration
name: (identifier)
value: (integer_literal))
(variable_declaration
name: (identifier)
value: (integer_literal)))
================================================================================
Import
================================================================================