From b3a883d2c873a39e1ece232de78ea6b43b493f0c Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 22 Jun 2023 16:23:58 -0400 Subject: 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. --- source/slang/slang-parser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source') 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) -- cgit v1.2.3