diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-21 13:59:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-21 13:59:30 -0800 |
| commit | 0b46715bff7f047fefed303ae149d3de8eb6be4f (patch) | |
| tree | 3254b6d8fb97926f2c8831e344606a5f6dcfa97e /source/slang/slang-parser.cpp | |
| parent | 255ecf7993cc69d38525af7e711c24fae6f94ba5 (diff) | |
Fix parsing of literals in stdlib. (#3610)
* Fix parsing of literals in stdlib.
* Fix double lit limits.
Diffstat (limited to 'source/slang/slang-parser.cpp')
| -rw-r--r-- | source/slang/slang-parser.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index ad4e65bf2..f2aff32ea 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -6590,11 +6590,9 @@ namespace Slang value = _fixIntegerLiteral(suffixBaseType, value, &token, parser->sink); - ASTBuilder* astBuilder = parser->astBuilder; - Type* suffixType = (suffixBaseType == BaseType::Void) ? astBuilder->getErrorType() : astBuilder->getBuiltinType(suffixBaseType); constExpr->value = value; - constExpr->type = QualType(suffixType); + constExpr->suffixType = suffixBaseType; return constExpr; } @@ -6704,12 +6702,9 @@ namespace Slang } } - ASTBuilder* astBuilder = parser->astBuilder; - - Type* suffixType = (suffixBaseType == BaseType::Void) ? astBuilder->getErrorType() : astBuilder->getBuiltinType(suffixBaseType); constExpr->value = fixedValue; - constExpr->type = QualType(suffixType); + constExpr->suffixType = suffixBaseType; return constExpr; } |
