Browse Source

Allow empty ()

Required for lambdas
kindlich 4 years ago
parent
commit
e11d51a9a9
No known key found for this signature in database

+ 3
- 0
Parser/src/main/java/org/openzen/zenscript/parser/expression/ParsedExpression.java View File

@@ -508,6 +508,9 @@ public abstract class ParsedExpression {
508 508
 				parser.next();
509 509
 				List<ParsedExpression> expressions = new ArrayList<>();
510 510
 				do {
511
+					if(parser.peek().type == T_BRCLOSE) {
512
+						break;
513
+					}
511 514
 					expressions.add(readAssignExpression(parser, options));
512 515
 				} while (parser.optional(ZSTokenType.T_COMMA) != null);
513 516
 				parser.required(T_BRCLOSE, ") expected");

Loading…
Cancel
Save