From 46c8b4ca58e24507a424ccb1b34b20b35bb068a9 Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Fri, 20 Sep 2019 12:23:51 -0500 Subject: [PATCH] Update --- version1.0/nasal_parser.h | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/version1.0/nasal_parser.h b/version1.0/nasal_parser.h index c1f6b95..c7ff7d1 100644 --- a/version1.0/nasal_parser.h +++ b/version1.0/nasal_parser.h @@ -11,10 +11,12 @@ class nasal_parser std::stack node_cache; token this_token; int error; + int warning; public: nasal_parser() { error=0; + warning=0; this_token.type=0; } void get_token() @@ -135,12 +137,18 @@ void nasal_parser::definition_expr() return; } get_token(); - if(this_token.type!=__equal) + if(this_token.type!=__equal && this_token.type!=__semi) { ++error; std::cout<<">>[Error] line "<>[Warning] line "<>[Error] line "<>[Error] line "<>[Error] line "<>[Error] line "<>[Error] line "<>[Parse] complete generation."<>[Parse] complete generation."<