summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-parser.cpp5
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)