Skip to content

Commit

Permalink
Correctly parse default and global flags in assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Dec 26, 2014
1 parent c5d37fa commit 7c9f657
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,12 @@ namespace Sass {
if (!lex< exactly<':'> >()) error("expected ':' after " + name + " in assignment statement");
Expression* val = parse_list();
val->is_delayed(false);
bool is_guarded = lex< default_flag >() != NULL;
bool is_global = lex< global_flag >() != NULL;
bool is_guarded = false;
bool is_global = false;
while (peek< default_flag >() || peek< global_flag >()) {
is_guarded = lex< default_flag >() || is_guarded;
is_global = lex< global_flag >() || is_global;
}
Assignment* var = new (ctx.mem) Assignment(path, var_source_position, name, val, is_guarded, is_global);
return var;
}
Expand Down

0 comments on commit 7c9f657

Please sign in to comment.