2024-02-13 14:19:23 +00:00
|
|
|
================================================================================
|
|
|
|
Simple As
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
1 as int
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(root
|
|
|
|
(statement
|
2024-02-16 15:55:15 +00:00
|
|
|
(statement_kind
|
|
|
|
(expression
|
2024-02-19 20:24:44 +00:00
|
|
|
(as_node
|
2024-02-16 15:55:15 +00:00
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(type))))))
|
2024-02-13 14:19:23 +00:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
As Function
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo as (int) -> int
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(root
|
|
|
|
(statement
|
2024-02-16 15:55:15 +00:00
|
|
|
(statement_kind
|
|
|
|
(expression
|
2024-02-19 20:24:44 +00:00
|
|
|
(as_node
|
2024-02-16 15:55:15 +00:00
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(type
|
|
|
|
(type)
|
|
|
|
(type)))))))
|
2024-02-13 14:19:23 +00:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
As List in For Loop
|
|
|
|
================================================================================
|
|
|
|
|
2024-02-13 15:26:26 +00:00
|
|
|
for i in foobar as [string] {}
|
2024-02-13 14:19:23 +00:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(root
|
|
|
|
(statement
|
2024-02-16 15:55:15 +00:00
|
|
|
(statement_kind
|
|
|
|
(for
|
|
|
|
(identifier)
|
|
|
|
(expression
|
2024-02-19 20:24:44 +00:00
|
|
|
(as_node
|
2024-02-16 15:55:15 +00:00
|
|
|
(expression
|
|
|
|
(identifier))
|
2024-02-13 15:26:26 +00:00
|
|
|
(type
|
2024-02-16 15:55:15 +00:00
|
|
|
(type
|
|
|
|
(identifier)))))
|
|
|
|
(block)))))
|