diff --git a/compiler/Parser.cs b/compiler/Parser.cs index c9adcea..d1507ed 100644 --- a/compiler/Parser.cs +++ b/compiler/Parser.cs @@ -467,7 +467,10 @@ public class Parser var parameters = new List(); while (!TryExpectSymbol(Symbol.CloseParen)) + { parameters.Add(ParseExpression()); + TryExpectSymbol(Symbol.Comma); + } expr = new NodeExpressionFuncCall(TokensFrom(startIndex), expr, parameters); } diff --git a/examples/core/print.nub b/examples/core/print.nub index 8409a87..a5716fc 100644 --- a/examples/core/print.nub +++ b/examples/core/print.nub @@ -1,7 +1,7 @@ module core export func print(text: string) { - sys::write(0 text.ptr text.length) + sys::write(0, text.ptr, text.length) } export func println(text: string) {