From 60f37e769a0077d2d258299dd06b0912cb0ae562 Mon Sep 17 00:00:00 2001 From: Fabien Fleutot Date: Sat, 28 Feb 2009 13:21:36 +0100 Subject: [PATCH] use simplified defaults for multisequences in mlp --- src/compiler/mlp_expr.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/mlp_expr.lua b/src/compiler/mlp_expr.lua index 091f92e..213ccde 100644 --- a/src/compiler/mlp_expr.lua +++ b/src/compiler/mlp_expr.lua @@ -80,7 +80,8 @@ method_args = gg.multisequence{ name = "function argument(s)", { "{", table_content, "}" }, { "(", func_args_content, ")", builder = fget(1) }, - default = function(lx) local r = opt_string(lx); return r and {r} or { } end } + { "+{", quote_content, "}" }, + function(lx) local r = opt_string(lx); return r and {r} or { } end } -------------------------------------------------------------------------------- -- [func_val] parses a function, from opening parameters parenthese to @@ -92,7 +93,7 @@ method_args = gg.multisequence{ -- definitions. -------------------------------------------------------------------------------- func_params_content = gg.list{ name="function parameters", - gg.multisequence{ { "...", builder = "Dots" }, default = id }, + gg.multisequence{ { "...", builder = "Dots" }, id }, separators = ",", terminators = {")", "|"} } local _func_params_content = function (lx) return func_params_content(lx) end @@ -163,7 +164,7 @@ expr = gg.expr { name = "expression", { "false", builder = "False" }, { "...", builder = "Dots" }, table, - default = id_or_literal }, + id_or_literal }, infix = { name="expr infix op", { "+", prec = 60, builder = opf2 "add" }, -- 2.44.0