178 lines
4.7 KiB
Plaintext
178 lines
4.7 KiB
Plaintext
================================================================================
|
|
Simple Indexes
|
|
================================================================================
|
|
|
|
dust_data:1:name
|
|
|
|
creature:total_clams
|
|
|
|
foobar:1:42
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(expression
|
|
(index
|
|
(index_expression
|
|
(index
|
|
(index_expression
|
|
(identifier))
|
|
(index_expression
|
|
(value
|
|
(integer)))))
|
|
(index_expression
|
|
(identifier)))))
|
|
(statement
|
|
(expression
|
|
(index
|
|
(index_expression
|
|
(identifier))
|
|
(index_expression
|
|
(identifier)))))
|
|
(statement
|
|
(expression
|
|
(index
|
|
(index_expression
|
|
(index
|
|
(index_expression
|
|
(identifier))
|
|
(index_expression
|
|
(value
|
|
(integer)))))
|
|
(index_expression
|
|
(value
|
|
(integer)))))))
|
|
|
|
================================================================================
|
|
Nested Indexes
|
|
================================================================================
|
|
|
|
[['answers' 'foobar'], 42, 666]:0:1:0..2
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(expression
|
|
(index
|
|
(index_expression
|
|
(index
|
|
(index_expression
|
|
(index
|
|
(index_expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(string))))))
|
|
(expression
|
|
(value
|
|
(integer)))
|
|
(expression
|
|
(value
|
|
(integer))))))
|
|
(index_expression
|
|
(value
|
|
(integer)))))
|
|
(index_expression
|
|
(value
|
|
(integer)))))
|
|
(index_expression
|
|
(value
|
|
(integer)))
|
|
(expression
|
|
(value
|
|
(integer)))))))
|
|
|
|
================================================================================
|
|
Function Call Index
|
|
================================================================================
|
|
|
|
x:(y()):0
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(expression
|
|
(index
|
|
(index_expression
|
|
(index
|
|
(index_expression
|
|
(identifier))
|
|
(index_expression
|
|
(function_call
|
|
(function_expression
|
|
(identifier))))))
|
|
(index_expression
|
|
(value
|
|
(integer)))))))
|
|
|
|
================================================================================
|
|
Structure Definition Index
|
|
================================================================================
|
|
|
|
struct {
|
|
bar = 1
|
|
}:bar
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(expression
|
|
(index
|
|
(index_expression
|
|
(value
|
|
(structure_definition
|
|
(structure_instantiator
|
|
(identifier)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(integer))))))))
|
|
(index_expression
|
|
(identifier))))))
|
|
|
|
================================================================================
|
|
Structure Definition Index Function Call
|
|
================================================================================
|
|
|
|
struct {
|
|
bar = () <str> { 'bar' }
|
|
}:bar()
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(expression
|
|
(function_call
|
|
(function_expression
|
|
(index
|
|
(index_expression
|
|
(value
|
|
(structure_definition
|
|
(structure_instantiator
|
|
(identifier)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(function
|
|
(type_definition
|
|
(type))
|
|
(block
|
|
(statement
|
|
(expression
|
|
(value
|
|
(string)))))))))))))
|
|
(index_expression
|
|
(identifier))))))))
|