2024-04-07 22:37:52 +02:00
|
|
|
================================================================================
|
|
|
|
Empty file
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file)
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Integer assignment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo = 42
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Variable assignment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo = bar
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(identifier)))
|
|
|
|
|
2024-04-07 22:40:17 +02:00
|
|
|
================================================================================
|
|
|
|
Addition assignement
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo += 12
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal)))
|
|
|
|
|
2024-04-07 22:37:52 +02:00
|
|
|
================================================================================
|
|
|
|
Multiple assignments
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo = 12
|
|
|
|
bar = 27
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal)))
|
2024-04-07 22:40:17 +02:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Various assignements
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo = 0
|
|
|
|
foo += 12
|
|
|
|
bar = 27
|
|
|
|
baz = 42
|
|
|
|
qux = 1
|
|
|
|
qux += 1
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(integer_literal)))
|