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