diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-06-22 16:23:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-22 16:23:58 -0400 |
| commit | b3a883d2c873a39e1ece232de78ea6b43b493f0c (patch) | |
| tree | 638c98f2e1bbfe377687c19187d994a48278ebbf /source/slang | |
| parent | 769c7fdd19ea579770baac7b6d5e16d6406a8013 (diff) | |
Allow multiple attributes to not require separating comma (#2939)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Small fixes and improvements around reflection tool.
* Make PrettyWriter printing a class.
* Allow attributes without comma separation.
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/slang-parser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index 5022a9fdd..fdc5c19b5 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -966,6 +966,7 @@ namespace Slang if (AdvanceIfMatch(parser, MatchedTokenType::Parentheses)) break; + parser->ReadToken(TokenType::Comma); } } @@ -975,8 +976,8 @@ namespace Slang if (AdvanceIfMatch(parser, MatchedTokenType::SquareBrackets)) break; - parser->ReadToken(TokenType::Comma); - + // If there is a comma consume it. It appears that the comma is optional. + AdvanceIf(parser, TokenType::Comma); } if (hasDoubleBracket) |
