2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-03-07 05:23:02 +00:00

Correctly parse binary operations that can be interpreted as sign prefixes for numbers

This commit is contained in:
Jan
2021-11-28 15:16:43 +01:00
parent c3a44f60d3
commit e7eb43a955
12 changed files with 211 additions and 12 deletions

View File

@@ -33,6 +33,7 @@ public:
TokenPos m_pos;
SimpleParserValueType m_type;
size_t m_hash;
bool m_has_sign_prefix;
union ValueType
{
char char_value;
@@ -48,7 +49,9 @@ public:
static SimpleParserValue Character(TokenPos pos, char c);
static SimpleParserValue MultiCharacter(TokenPos pos, int multiCharacterSequenceId);
static SimpleParserValue Integer(TokenPos pos, int value);
static SimpleParserValue Integer(TokenPos pos, int value, bool hasSignPrefix);
static SimpleParserValue FloatingPoint(TokenPos pos, double value);
static SimpleParserValue FloatingPoint(TokenPos pos, double value, bool hasSignPrefix);
static SimpleParserValue String(TokenPos pos, std::string* stringValue);
static SimpleParserValue Identifier(TokenPos pos, std::string* identifier);