summaryrefslogtreecommitdiff
path: root/cli/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-08-22 11:30:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-08-22 11:30:55 +0200
commit3820d1b1bc4fdd3e5516f27807c3e58ee72e4c20 (patch)
tree36f4eaa125f3d8031f6f881e5bc60323da889232 /cli/parser.cxx
parente9c9434bcd25dd555e93d09a22d90b88346e6b10 (diff)
Allow string literals for option names
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 ();