1
0
dust/tree-sitter-dust/corpus/as.txt

59 lines
1.4 KiB
Plaintext
Raw Normal View History

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
(as
(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
(as
(expression
(identifier))
(type
(type)
(type)))))))
2024-02-13 14:19:23 +00:00
================================================================================
As List in For Loop
================================================================================
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
(as
(expression
(identifier))
(type
2024-02-16 15:55:15 +00:00
(type
(identifier)))))
(block)))))