2024-04-07 22:37:52 +02:00
|
|
|
================================================================================
|
|
|
|
Empty file
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file)
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Integer assignment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo = 42
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:37:52 +02:00
|
|
|
(integer_literal)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Variable assignment
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo = bar
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:37:52 +02:00
|
|
|
(identifier)))
|
|
|
|
|
2024-04-07 22:40:17 +02:00
|
|
|
================================================================================
|
|
|
|
Addition assignement
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo += 12
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:40:17 +02:00
|
|
|
(integer_literal)))
|
|
|
|
|
2024-04-07 22:37:52 +02:00
|
|
|
================================================================================
|
|
|
|
Multiple assignments
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo = 12
|
|
|
|
bar = 27
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:37:52 +02:00
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:37:52 +02:00
|
|
|
(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)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:40:17 +02:00
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:40:17 +02:00
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:40:17 +02:00
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:40:17 +02:00
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:40:17 +02:00
|
|
|
(integer_literal))
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2024-04-08 03:13:43 +02:00
|
|
|
(operator)
|
2024-04-07 22:40:17 +02:00
|
|
|
(integer_literal)))
|