From 3b94999e55df35d19616e87d7f3b6fddf5b8a30b Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 26 Feb 2020 11:46:27 +0800 Subject: add fat arrow support for backcall statement. --- src/MoonP/moon_parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/MoonP/moon_parser.cpp') diff --git a/src/MoonP/moon_parser.cpp b/src/MoonP/moon_parser.cpp index 1502f3c..fecf869 100644 --- a/src/MoonP/moon_parser.cpp +++ b/src/MoonP/moon_parser.cpp @@ -434,7 +434,8 @@ MoonParser::MoonParser() { NameOrDestructure = Space >> Variable | TableLit; AssignableNameList = Seperator >> NameOrDestructure >> *(sym(',') >> White >> NameOrDestructure); - Backcall = -FnArgsDef >> Space >> symx("<-") >> Space >> ChainValue; + fn_arrow_back = expr('<') >> set("-="); + Backcall = -FnArgsDef >> Space >> fn_arrow_back >> Space >> ChainValue; ExpList = Seperator >> Exp >> *(sym(',') >> White >> Exp); ExpListLow = Seperator >> Exp >> *((sym(',') | sym(';')) >> White >> Exp); -- cgit v1.2.3-55-g6feb