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:
Stephen Williams 2008-05-02 15:29:09 -07:00
parent 1a8be6d28c
commit 0c29e540ea
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}