diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2010-11-13 20:32:59 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2010-11-15 13:33:57 -0800 |
commit | 285036fbb03d7f10a8b93774d0290a33ea2e5e13 (patch) | |
tree | ebc407a100939b4297977829447cdb953a0e4162 /src/glsl/tests | |
parent | 5dc74e9c77de7d30ac08c25f224ffa93006d8d7c (diff) |
glsl: Rework reserved word/keyword handling in the lexer.
This consolidates the TOKEN_OR_IDENTIFIER and RESERVED_WORD macros into
a single KEYWORD macro.
The old TOKEN_OR_IDENTIFIER macros handled the case of a word going from
an identifier to a keyword; the RESERVED_WORD macro handled a word going
from a reserved word to a language keyword. However, neither could
properly handle samplerBuffer (for example), which is an identifier in
1.10 and 1.20, a reserved word in 1.30, and a keyword in 1.40 and on.
Furthermore, the existing macros didn't properly handle reserved words
in GLSL ES 1.00. The best they could do was return a token (rather than
an identifier), resulting in an obtuse parser error, rather than a
user-friendly "you used a reserved word" error message.
Diffstat (limited to 'src/glsl/tests')
0 files changed, 0 insertions, 0 deletions