summaryrefslogtreecommitdiff
path: root/cli/parser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cli/parser.cxx')
-rw-r--r--cli/parser.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/cli/parser.cxx b/cli/parser.cxx
index 937bf34..e63a7b6 100644
--- a/cli/parser.cxx
+++ b/cli/parser.cxx
@@ -335,11 +335,19 @@ option_def (Token& t)
//
while (true)
{
- if (t.type () != Token::t_identifier)
+ switch (t.type ())
{
- cerr << *id_ << ':' << t.line () << ':' << t.column () << ": error: "
- << "option name expected instead of " << t << endl;
- throw Error ();
+ case Token::t_identifier:
+ case Token::t_string_lit:
+ {
+ break;
+ }
+ default:
+ {
+ cerr << *id_ << ':' << t.line () << ':' << t.column () << ": error: "
+ << "option name expected instead of " << t << endl;
+ throw Error ();
+ }
}
t = lexer_->next ();