tree-sitter grammar update
This commit is contained in:
@@ -643,3 +643,86 @@ ops func(value u8, count u8) u8 {
|
||||
(identifier))
|
||||
(expression
|
||||
(integer)))))))))))))
|
||||
|
||||
==================
|
||||
Struct field defaults and grouped types
|
||||
==================
|
||||
|
||||
Config :: struct {
|
||||
capacity usize = 8
|
||||
}
|
||||
|
||||
work func() void ! (Config | errors.Full) {}
|
||||
|
||||
clear func($K, $V type) void {
|
||||
for 0..entries.len |i| {
|
||||
entries[i].hash = 0
|
||||
}
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(type_declaration
|
||||
(identifier)
|
||||
(struct_type
|
||||
(record_body
|
||||
(record_field
|
||||
(identifier)
|
||||
(type
|
||||
(builtin_type))
|
||||
(expression
|
||||
(integer))))))
|
||||
(function_declaration
|
||||
(identifier)
|
||||
(parameter_list)
|
||||
(type
|
||||
(builtin_type))
|
||||
(type
|
||||
(parenthesized_type
|
||||
(type
|
||||
(named_type
|
||||
(qualified_identifier
|
||||
(identifier)))
|
||||
(named_type
|
||||
(qualified_identifier
|
||||
(identifier)
|
||||
(identifier))))))
|
||||
(block))
|
||||
(function_declaration
|
||||
(identifier)
|
||||
(parameter_list
|
||||
(parameter
|
||||
(identifier)
|
||||
(identifier)
|
||||
(type
|
||||
(builtin_type))))
|
||||
(type
|
||||
(builtin_type))
|
||||
(block
|
||||
(statement
|
||||
(for_statement
|
||||
(expression
|
||||
(binary_expression
|
||||
(expression
|
||||
(integer))
|
||||
(expression
|
||||
(field_expression
|
||||
(expression
|
||||
(identifier))
|
||||
(identifier)))))
|
||||
(identifier)
|
||||
(block
|
||||
(statement
|
||||
(assignment_statement
|
||||
(expression
|
||||
(field_expression
|
||||
(expression
|
||||
(index_expression
|
||||
(expression
|
||||
(identifier))
|
||||
(expression
|
||||
(identifier))))
|
||||
(identifier)))
|
||||
(expression
|
||||
(integer))))))))))
|
||||
|
||||
Reference in New Issue
Block a user