59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
================================================================================
|
|
Simple As
|
|
================================================================================
|
|
|
|
1 as int
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(as
|
|
(expression
|
|
(value
|
|
(integer)))
|
|
(type))))))
|
|
|
|
================================================================================
|
|
As Function
|
|
================================================================================
|
|
|
|
foo as (int) -> int
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(as
|
|
(expression
|
|
(identifier))
|
|
(type
|
|
(type)
|
|
(type)))))))
|
|
|
|
================================================================================
|
|
As List in For Loop
|
|
================================================================================
|
|
|
|
for i in foobar as [string] {}
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(for
|
|
(identifier)
|
|
(expression
|
|
(as
|
|
(expression
|
|
(identifier))
|
|
(type
|
|
(type
|
|
(identifier)))))
|
|
(block)))))
|