diff options
author | Mike Buland <eichlan@xagasoft.com> | 2016-12-01 15:51:52 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2016-12-01 15:51:52 -0700 |
commit | 5d59aa3e9dffe2912215335ce0b76c67ebbe5a4e (patch) | |
tree | fa4f7b73f912b0b5ff87280c0bc4dc118a82392d /src/parser.cpp | |
parent | 17a39c19e5bff97c3b3d2bc888a3bb5ded7c1b96 (diff) | |
download | clic-5d59aa3e9dffe2912215335ce0b76c67ebbe5a4e.tar.gz clic-5d59aa3e9dffe2912215335ce0b76c67ebbe5a4e.tar.bz2 clic-5d59aa3e9dffe2912215335ce0b76c67ebbe5a4e.tar.xz clic-5d59aa3e9dffe2912215335ce0b76c67ebbe5a4e.zip |
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.
Diffstat (limited to 'src/parser.cpp')
-rw-r--r-- | src/parser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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() | |||
199 | if( lex[0].eType == Token::tCommand ) | 199 | if( lex[0].eType == Token::tCommand ) |
200 | { | 200 | { |
201 | lex.setMode( Lexer::modeCommand ); | 201 | lex.setMode( Lexer::modeCommand ); |
202 | output( lex[0] ); | ||
203 | for(;;) | ||
204 | { | ||
205 | lex.nextToken(); | ||
206 | if( lex[0].eType == Token::tEndOfLine || | ||
207 | lex[0].eType == Token::tEndOfInput ) | ||
208 | break; | ||
209 | output( lex[0] ); | ||
210 | } | ||
202 | lex.setMode( Lexer::modeNormal ); | 211 | lex.setMode( Lexer::modeNormal ); |
203 | } | 212 | } |
204 | else | 213 | else |