summaryrefslogtreecommitdiffstats
path: root/src/parse.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-04-18 16:55:06 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-04-18 16:55:06 +0200
commit4ed7d5a1b214101efadbff4b808dbc782ef97dee (patch)
tree42618b55179f24d0a7e7db0c8443e5e5a1bbae9b /src/parse.y
parent6597de68e459eb5f6f02d2b0662637b04d2baea1 (diff)
downloadsolar-4ed7d5a1b214101efadbff4b808dbc782ef97dee.tar
solar-4ed7d5a1b214101efadbff4b808dbc782ef97dee.zip
parse: minor code simplification
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y
index 0d9bb05..cacf898 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -91,8 +91,7 @@ directive |= SYMBOL(lhs) "|=" rhs(rhs) action(action) {
}
directive |= SYMBOL(lhs) "|=" '(' CHAR(c1) "..." CHAR(c2) ')' ';' {
- vars_t vars;
- vars.emplace_back();
+ vars_t vars(1);
for (unsigned int c = c1; c <= c2; c++)
grammar->add_rule({item_t(*lhs, {symbol_t::make_char(c)}), vars, std::string()});