1
0

120 lines
3.3 KiB
Plaintext
Raw Normal View History

2023-11-10 20:44:03 -05:00
================================================================================
Simple Map
2023-11-10 20:44:03 -05:00
================================================================================
2023-11-28 11:01:38 -05:00
{ answer = 42 }
2023-11-10 20:44:03 -05:00
--------------------------------------------------------------------------------
(root
2023-11-10 20:44:03 -05:00
(statement
2024-02-16 10:55:15 -05:00
(statement_kind
(expression
(value
(map
(identifier)
(statement
(statement_kind
(expression
(value
(integer)))))))))))
2023-12-20 18:29:18 -05:00
================================================================================
Map with Types
================================================================================
{
answer <num> = 42
stuff <[str]> = [ "some" "stuff" ]
}
--------------------------------------------------------------------------------
(root
(statement
2024-02-16 10:55:15 -05:00
(statement_kind
(expression
(value
(map
(identifier)
(type_specification
(type))
(statement
(statement_kind
(expression
(value
(integer)))))
(identifier)
(type_specification
(type
(type)))
(statement
(statement_kind
(expression
(value
(list
(expression
(value
(string)))
(expression
(value
(string))))))))))))))
2023-12-20 18:29:18 -05:00
2023-11-10 20:44:03 -05:00
================================================================================
2023-10-31 05:51:37 -04:00
Nested Maps
2023-11-10 20:44:03 -05:00
================================================================================
2023-11-28 11:01:38 -05:00
x = {
y = {
2023-10-31 05:51:37 -04:00
foo = 'bar'
2023-11-28 11:01:38 -05:00
z = {
2023-10-31 05:51:37 -04:00
message = 'hiya'
2023-11-28 11:01:38 -05:00
}
}
2023-10-31 05:51:37 -04:00
f = 12
2023-11-28 11:01:38 -05:00
}
2023-11-10 20:44:03 -05:00
--------------------------------------------------------------------------------
(root
2023-11-10 20:44:03 -05:00
(statement
2024-02-16 10:55:15 -05:00
(statement_kind
(assignment
(identifier)
(assignment_operator)
(statement
(statement_kind
(expression
(value
(map
(identifier)
(statement
(statement_kind
(expression
(value
(map
(identifier)
(statement
(statement_kind
2023-11-10 20:44:03 -05:00
(expression
(value
2024-02-16 10:55:15 -05:00
(string)))))
(identifier)
(statement
(statement_kind
(expression
(value
(map
(identifier)
(statement
(statement_kind
(expression
(value
(string)))))))))))))))
(identifier)
(statement
(statement_kind
(expression
(value
(integer))))))))))))))