Add comma parsing to func call
This commit is contained in:
@@ -467,7 +467,10 @@ public class Parser
|
|||||||
var parameters = new List<NodeExpression>();
|
var parameters = new List<NodeExpression>();
|
||||||
|
|
||||||
while (!TryExpectSymbol(Symbol.CloseParen))
|
while (!TryExpectSymbol(Symbol.CloseParen))
|
||||||
|
{
|
||||||
parameters.Add(ParseExpression());
|
parameters.Add(ParseExpression());
|
||||||
|
TryExpectSymbol(Symbol.Comma);
|
||||||
|
}
|
||||||
|
|
||||||
expr = new NodeExpressionFuncCall(TokensFrom(startIndex), expr, parameters);
|
expr = new NodeExpressionFuncCall(TokensFrom(startIndex), expr, parameters);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module core
|
module core
|
||||||
|
|
||||||
export func print(text: string) {
|
export func print(text: string) {
|
||||||
sys::write(0 text.ptr text.length)
|
sys::write(0, text.ptr, text.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
export func println(text: string) {
|
export func println(text: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user