Check ketwords against active keyword subset mask.
The begin_keywords directives manage a mask of keyword sets that are active at a given moment. This patch makes the lexor actually test the given keyword against the mask. If it matches, return the keyword id, if it is disabled then it is an IDENTIFIER.
This commit is contained in:
parent
1a8be6d28c
commit
0c29e540ea
|
|
@ -130,6 +130,8 @@ int lexor_keyword_code(const char*str, unsigned nstr)
|
|||
const struct lexor_keyword*rc = check_identifier(str, nstr);
|
||||
if (rc == 0)
|
||||
return IDENTIFIER;
|
||||
else if ((rc->mask & lexor_keyword_mask) == 0)
|
||||
return IDENTIFIER;
|
||||
else
|
||||
return rc->tokenType;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue