Constants are now variables. Constant compile time constants are typeless and act as #define and are now also correctly parsed. Enums are also correctly lowered. And expressions are copied when inlining constants. Compile time ints can no longer be bitnegated.

This commit is contained in:
Christoffer Lerno
2020-07-29 22:06:50 +02:00
committed by Christoffer Lerno
parent d0ed16e60e
commit 8586bf3f8d
13 changed files with 97 additions and 61 deletions

View File

@@ -909,6 +909,7 @@ ParseRule rules[TOKEN_EOF + 1] = {
[TOKEN_CT_IDENT] = { parse_identifier, NULL, PREC_NONE },
[TOKEN_AT] = { parse_macro_ident, NULL, PREC_NONE },
[TOKEN_CONST_IDENT] = { parse_identifier, NULL, PREC_NONE },
[TOKEN_CT_CONST_IDENT] = { parse_identifier, NULL, PREC_NONE },
[TOKEN_STRING] = { parse_string_literal, NULL, PREC_NONE },
[TOKEN_REAL] = { parse_double, NULL, PREC_NONE },
[TOKEN_OR] = { NULL, parse_binary, PREC_LOGICAL },