From ac73a47f9b222d8c9311b38e1430af3fa22108d5 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 7 Sep 2014 13:40:29 -0400 Subject: [PATCH] Parser - Added the beginnings of the lex-only arg classification. --- src/Parser.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Parser.cpp b/src/Parser.cpp index 12174284c..44c7ee771 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -144,10 +144,12 @@ void Parser::initialize (int argc, const char** argv) Tree* sub = branch->addBranch (new Tree ("argSub")); sub->attribute ("raw", l->first); - if (l->second == Lexer::typeOperator) - sub->tag ("OP"); - else - sub->tag ("?"); + switch (l->second) + { + case Lexer::typeOperator: sub->tag ("OP"); break; + case Lexer::typeTag: sub->tag ("TAG"); break; + default: sub->tag ("?"); break; + } // TODO More types needed. Perhaps. }