Skip to content

Commit b0ee12d

Browse files
committed
Последовательный вызов функций
1 parent 5f71e9a commit b0ee12d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/annimon/ownlang/parser/Parser.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,11 @@ private Statement statementBody() {
298298
}
299299

300300
private Expression functionChain(Expression qualifiedNameExpr) {
301-
// f1().f2().f3() || f1().key
301+
// f1()()() || f1().f2().f3() || f1().key
302302
final Expression expr = function(qualifiedNameExpr);
303+
if (lookMatch(0, TokenType.LPAREN)) {
304+
return functionChain(expr);
305+
}
303306
if (lookMatch(0, TokenType.DOT)) {
304307
final List<Expression> indices = variableSuffix();
305308
if (indices == null | indices.isEmpty()) return expr;

0 commit comments

Comments
 (0)