From de7d8995d5a2e2d69b3a73a21090f391511df198 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 2 Nov 2017 14:45:35 +0200 Subject: [PATCH] Added string representation of 'static const' token No more 'Unknown(-141)' in 'Expecting ...' error message --- src/sc_man_tokens.h | 1 + src/scripting/zscript/zcc_parser.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/sc_man_tokens.h b/src/sc_man_tokens.h index b24cb369d5..33be1c6ae6 100644 --- a/src/sc_man_tokens.h +++ b/src/sc_man_tokens.h @@ -147,4 +147,5 @@ xx(TK_Offset, "'offset'") xx(TK_Slow, "'slow'") xx(TK_Bright, "'bright'") xx(TK_Let, "'let'") +xx(TK_StaticConst, "'static const'") #undef xx diff --git a/src/scripting/zscript/zcc_parser.cpp b/src/scripting/zscript/zcc_parser.cpp index e843b70de8..a0af21c14a 100644 --- a/src/scripting/zscript/zcc_parser.cpp +++ b/src/scripting/zscript/zcc_parser.cpp @@ -211,6 +211,7 @@ static void InitTokenMap() TOKENDEF2(TK_Color, ZCC_COLOR, NAME_Color); TOKENDEF2(TK_Sound, ZCC_SOUND, NAME_Sound); TOKENDEF2(TK_Let, ZCC_LET, NAME_let); + TOKENDEF2(TK_StaticConst, ZCC_STATICCONST,NAME_Staticconst); TOKENDEF (TK_Identifier, ZCC_IDENTIFIER); TOKENDEF (TK_StringConst, ZCC_STRCONST);