On Sun Mar 10 21:53:18 2024 +0000, Zebediah Figura wrote:
Unfortunately this doesn't quite work, because "precise" can also be a type. But changing var_identifier to any_identifier is going to run into shift/reduce conflicts. (There's no actual conflicts in the language, but there's not enough lookahead to know how to parse the first "precise" in e.g. "precise foobar". This may need to be handled on the lexer side, probably by keeping KW_PRECISE but only returning it if it's not defined as a specific identifier.
What would be a test case for this? A test like this:
``` precise float4 var; typedef float4 precise;
precise main() : sv_target { return var; } ```
is already working for me. Once 'precise' is defined as a type, it can't be used as a modifier.