Allow lexer to accept tokens that ended at previous positions
* Track lookahead in each tree * Add 'mark_end' API that external scanners can use
This commit is contained in:
parent
12d2a9d93f
commit
d222dbb9fd
12 changed files with 96 additions and 71 deletions
|
|
@ -42,12 +42,9 @@ bool AcceptTokenAction::operator==(const AcceptTokenAction &other) const {
|
|||
(is_string == other.is_string);
|
||||
}
|
||||
|
||||
LexState::LexState() : is_token_start(false) {}
|
||||
|
||||
bool LexState::operator==(const LexState &other) const {
|
||||
return advance_actions == other.advance_actions &&
|
||||
accept_action == other.accept_action &&
|
||||
is_token_start == other.is_token_start;
|
||||
accept_action == other.accept_action;
|
||||
}
|
||||
|
||||
} // namespace tree_sitter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue