From ca1404ba53bb0bd8efd19eeba583fbc07aacee53 Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Sun, 20 Oct 2019 13:06:57 +0800 Subject: [PATCH] Add lambda --- version1.1/nasal_parser.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/version1.1/nasal_parser.h b/version1.1/nasal_parser.h index 492be1f..2a9aacd 100644 --- a/version1.1/nasal_parser.h +++ b/version1.1/nasal_parser.h @@ -1132,7 +1132,32 @@ void nasal_parser::calculation_expr() else if(this_token.type==__number || this_token.type==__string) ; else if(this_token.type==__left_curve) + { + get_token(); + if(this_token.type==__func)// lambda + { + function_generate_expr(); + get_token(); + if(this_token.type!=__right_curve) + { + ++error; + std::cout<<">>[Error] line "<>[Error] line "<