Fix logic for identifying keyword capture token

This commit is contained in:
Max Brunsfeld 2018-03-12 07:52:57 -07:00
parent 84b15d2c78
commit 72849787b1

View file

@ -174,7 +174,7 @@ class LexTableBuilderImpl : public LexTableBuilder {
Symbol symbol = Symbol::terminal(i);
bool matches_all_keywords = true;
keyword_symbols.for_each([&](Symbol keyword_symbol) {
if (!shadowed_tokens_by_token[keyword_symbol.index].count(symbol)) {
if (!conflict_manager.possible_homonyms[symbol.index].count(keyword_symbol.index)) {
matches_all_keywords = false;
}
});