-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathnode-types.yml
More file actions
73 lines (57 loc) · 1.4 KB
/
node-types.yml
File metadata and controls
73 lines (57 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Output node types for yeast test rules.
# Inspired by tree-sitter-ruby, but with all children in named fields
# (no unnamed children). This represents the desugared output schema.
named:
program:
stmt*: [assignment, call, identifier, for, first_node, second_node]
assignment:
left: [identifier, left_assignment_list]
right: [identifier, integer, call, element_reference]
left_assignment_list:
item*: identifier
element_reference:
object: identifier
index: [integer, identifier]
for:
pattern: [identifier, left_assignment_list]
value: in
body: do
in:
value: [identifier, call]
do:
stmt*: [assignment, identifier, call]
call:
receiver: [identifier, call]
method: identifier
arguments?: argument_list
block?: block
argument_list:
argument*: [identifier, integer, call]
block:
parameters: block_parameters
body: block_body
block_parameters:
parameter*: identifier
block_body:
stmt*: [assignment, identifier, call]
identifier:
integer:
# Output-only kinds, used by tests of chained desugaring rules.
# Neither exists in the input tree-sitter-ruby grammar.
first_node:
left: [identifier, integer]
right: [identifier, integer]
second_node:
left: [identifier, integer]
right: [identifier, integer]
unnamed:
- "="
- ","
- "("
- ")"
- "for"
- "in"
- "do"
- "end"
- "|"
- "."