diff options
| author | Yong He <yonghe@outlook.com> | 2023-01-30 20:03:46 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-30 20:03:46 -0800 |
| commit | 77cdbb2101f4e27bf1800d4bc1077c0510668c25 (patch) | |
| tree | 418ea6776aaa6a65364ba6de9ec3e6c63d1c4c5a /source/slang/slang-parser.cpp | |
| parent | 499b0253c224e68ceed6e5b6b1ee9cd7d65aad0f (diff) | |
Add transposition logic for constructor opcodes. (#2618)
* Add transposition logic for constructor opcodes.
* Fix.
* Add language server regression test.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-parser.cpp')
| -rw-r--r-- | source/slang/slang-parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index fd0810214..1bddfb9cf 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -5613,7 +5613,7 @@ namespace Slang if(unknownCount) { parser->sink->diagnose(token, Diagnostics::invalidIntegerLiteralSuffix, suffix); - suffixBaseType = BaseType::Void; + suffixBaseType = BaseType::Int; } // `u` or `ul` suffix -> `uint` else if(uCount == 1 && (lCount <= 1) && zCount == 0) @@ -5647,7 +5647,7 @@ namespace Slang else { parser->sink->diagnose(token, Diagnostics::invalidIntegerLiteralSuffix, suffix); - suffixBaseType = BaseType::Void; + suffixBaseType = BaseType::Int; } } @@ -5711,7 +5711,7 @@ namespace Slang if (unknownCount) { parser->sink->diagnose(token, Diagnostics::invalidFloatingPointLiteralSuffix, suffix); - suffixBaseType = BaseType::Void; + suffixBaseType = BaseType::Float; } // `f` suffix -> `float` if(fCount == 1 && !lCount && !hCount) @@ -5732,7 +5732,7 @@ namespace Slang else { parser->sink->diagnose(token, Diagnostics::invalidFloatingPointLiteralSuffix, suffix); - suffixBaseType = BaseType::Void; + suffixBaseType = BaseType::Float; } } |
