Symbols without aliases should be used for lookahead
This commit is contained in:
parent
7267384970
commit
1f52f2f1dc
9 changed files with 115 additions and 7 deletions
|
|
@ -209,10 +209,19 @@ class Node {
|
|||
return C._ts_node_symbol_wasm(this.tree[0]);
|
||||
}
|
||||
|
||||
get grammarId() {
|
||||
marshalNode(this);
|
||||
return C._ts_node_grammar_symbol_wasm(this.tree[0]);
|
||||
}
|
||||
|
||||
get type() {
|
||||
return this.tree.language.types[this.typeId] || 'ERROR';
|
||||
}
|
||||
|
||||
get grammarType() {
|
||||
return this.tree.language.types[this.grammarId] || 'ERROR';
|
||||
}
|
||||
|
||||
get endPosition() {
|
||||
marshalNode(this);
|
||||
C._ts_node_end_point_wasm(this.tree[0]);
|
||||
|
|
@ -233,6 +242,11 @@ class Node {
|
|||
return C._ts_node_parse_state_wasm(this.tree[0]);
|
||||
}
|
||||
|
||||
get nextParseState() {
|
||||
marshalNode(this);
|
||||
return C._ts_node_next_parse_state_wasm(this.tree[0]);
|
||||
}
|
||||
|
||||
isNamed() {
|
||||
marshalNode(this);
|
||||
return C._ts_node_is_named_wasm(this.tree[0]) === 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue