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 sass#1219
  • Loading branch information
mgreter committed Jun 30, 2015
1 parent 7a5abb8 commit c23b76a
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 @@ -1381,8 +1381,7 @@ namespace Sass {
if (lex< 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); }

if (lex< kwd_true >())
Expand Down Expand Up @@ -1412,6 +1411,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 c23b76a

Please sign in to comment.