Skip to content

Commit

Permalink
Fix parsing edge case with numbers and trailing escapes
Browse files Browse the repository at this point in the history
Fixes #1219
  • Loading branch information
mgreter committed Jun 13, 2015
1 parent 72fb851 commit 7ccfaca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,8 +1333,7 @@ namespace Sass {
if (lex< kwd_important >())
{ return new (ctx.mem) String_Constant(pstate, "!important"); }

const char* stop;
if ((stop = peek< value_schema >()))
if (const char* stop = peek< value_schema >())
{ return parse_value_schema(stop); }

// string may be interpolated
Expand Down Expand Up @@ -1365,6 +1364,9 @@ namespace Sass {
if (lex< sequence< dimension, optional< sequence< exactly<'-'>, negate< digit > > > > >())
{ return new (ctx.mem) Textual(pstate, Textual::DIMENSION, lexed); }

if (lex< sequence< static_component, one_plus< identifier > > >())
{ return new (ctx.mem) String_Constant(pstate, lexed); }

if (lex< number >())
{ return new (ctx.mem) Textual(pstate, Textual::NUMBER, lexed); }

Expand Down

0 comments on commit 7ccfaca

Please sign in to comment.