From 5d59aa3e9dffe2912215335ce0b76c67ebbe5a4e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 1 Dec 2016 15:51:52 -0700 Subject: Signals solve many problems. The command structures will be changed, I think. I want the lexer to actually lex the command names into tokens, then the parser and the engine can both use them to update their state when necesarry. It will be less ambiguous and easier for both sides to stay synchronized. --- src/parser.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index e9388c8..982c342 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -199,6 +199,15 @@ void Parser::statement() if( lex[0].eType == Token::tCommand ) { lex.setMode( Lexer::modeCommand ); + output( lex[0] ); + for(;;) + { + lex.nextToken(); + if( lex[0].eType == Token::tEndOfLine || + lex[0].eType == Token::tEndOfInput ) + break; + output( lex[0] ); + } lex.setMode( Lexer::modeNormal ); } else -- cgit v1.2.3