Add iteration over names
This commit is contained in:
parent
1f52f2f1dc
commit
672d38803e
4 changed files with 51 additions and 2 deletions
|
|
@ -181,7 +181,7 @@ bool ts_lookahead_iterator_reset_state(TSLookaheadIterator * self, TSStateId sta
|
|||
}
|
||||
|
||||
const TSLanguage * ts_lookahead_iterator_language(const TSLookaheadIterator *self) {
|
||||
LookaheadIterator *iterator = (LookaheadIterator *)self;
|
||||
const LookaheadIterator *iterator = (const LookaheadIterator *)self;
|
||||
return iterator->language;
|
||||
}
|
||||
|
||||
|
|
@ -198,6 +198,11 @@ bool ts_lookahead_iterator_advance(TSLookaheadIterator *self) {
|
|||
}
|
||||
|
||||
TSSymbol ts_lookahead_iterator_current_symbol(const TSLookaheadIterator *self) {
|
||||
LookaheadIterator *iterator = (LookaheadIterator *)self;
|
||||
const LookaheadIterator *iterator = (const LookaheadIterator *)self;
|
||||
return iterator->symbol;
|
||||
}
|
||||
|
||||
const char *ts_lookahead_iterator_current_symbol_name(const TSLookaheadIterator *self) {
|
||||
const LookaheadIterator *iterator = (const LookaheadIterator *)self;
|
||||
return ts_language_symbol_name(iterator->language, iterator->symbol);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue