diff options
Diffstat (limited to 'source/compiler-core/slang-lexer.cpp')
| -rw-r--r-- | source/compiler-core/slang-lexer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/compiler-core/slang-lexer.cpp b/source/compiler-core/slang-lexer.cpp index bf109e7fb..84a4df93b 100644 --- a/source/compiler-core/slang-lexer.cpp +++ b/source/compiler-core/slang-lexer.cpp @@ -673,7 +673,10 @@ static int _readOptionalBase(char const** ioCursor) } -IntegerLiteralValue getIntegerLiteralValue(Token const& token, UnownedStringSlice* outSuffix) +IntegerLiteralValue getIntegerLiteralValue( + Token const& token, + UnownedStringSlice* outSuffix, + bool* outIsDecimalBase) { IntegerLiteralValue value = 0; @@ -698,6 +701,11 @@ IntegerLiteralValue getIntegerLiteralValue(Token const& token, UnownedStringSlic *outSuffix = UnownedStringSlice(cursor, end); } + if (outIsDecimalBase) + { + *outIsDecimalBase = (base == 10); + } + return value; } |
