Fix uninitialized variable error
This commit is contained in:
parent
22a4c5213d
commit
074a7884aa
3 changed files with 4 additions and 0 deletions
|
|
@ -85,6 +85,7 @@ class LexTableBuilder {
|
|||
LexItemSet item_set = build_lex_item_set(parse_table->symbols);
|
||||
add_accept_token_actions(item_set, LexTable::ERROR_STATE_ID);
|
||||
add_advance_actions(item_set, LexTable::ERROR_STATE_ID);
|
||||
add_token_start(item_set, LexTable::ERROR_STATE_ID);
|
||||
}
|
||||
|
||||
void add_advance_actions(const LexItemSet &item_set, LexStateId state_id) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ std::ostream &operator<<(std::ostream &stream, const LexAction &action) {
|
|||
}
|
||||
}
|
||||
|
||||
LexState::LexState() : is_token_start(false) {}
|
||||
|
||||
set<CharacterSet> LexState::expected_inputs() const {
|
||||
set<CharacterSet> result;
|
||||
for (auto &pair : actions)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ namespace tree_sitter {
|
|||
|
||||
class LexState {
|
||||
public:
|
||||
LexState();
|
||||
std::map<rules::CharacterSet, LexAction> actions;
|
||||
LexAction default_action;
|
||||
std::set<rules::CharacterSet> expected_inputs() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue