Rez: accept "binary" radix declaration for fields

This commit is contained in:
Wolfgang Thaller 2018-01-07 12:58:25 +01:00
parent c517558e5b
commit f52121964c
3 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public:
enum class Attrs
{
none = 0, hex = 1, key = 2, unsigned_ = 4, literal = 8
none = 0, hex = 1, key = 2, unsigned_ = 4, literal = 8, binary = 16
};
Type type;

View File

@ -186,6 +186,7 @@ RezSymbol RezLexer::nextToken()
KEYWORD(KEY, "key"),
KEYWORD(WIDE,"wide"),
KEYWORD(UNSIGNED, "unsigned"),
KEYWORD(BINARY, "binary"),
KEYWORD(LITERAL, "literal"),
KEYWORD(BOOLEAN, "boolean"),
KEYWORD(BIT, "bit"),

View File

@ -61,6 +61,7 @@
%token WIDE "wide";
%token LITERAL "literal";
%token UNSIGNED "unsigned";
%token BINARY "binary";
%token BOOLEAN "boolean";
%token BIT "bit";
@ -303,6 +304,7 @@ field_attribute : "hex" { $$ = SimpleField::Attrs::hex; }
| "key" { $$ = SimpleField::Attrs::key; }
| "unsigned" { $$ = SimpleField::Attrs::unsigned_; }
| "literal" { $$ = SimpleField::Attrs::literal; }
| "binary" { $$ = SimpleField::Attrs::binary; }
;
%type <FieldPtr> switch_definition;