Commit ea5aa3e8 by Aaron Leung

Fixed ordering of the matchers for relational operators.

parent 5da2cd2e
...@@ -95,7 +95,9 @@ div { ...@@ -95,7 +95,9 @@ div {
a: hello == hello; a: hello == hello;
b: (1 2 3) == (1 2 3); b: (1 2 3) == (1 2 3);
c: "hello" == hello; c: "hello" == hello;
d: 1 + 2 < 3 + 4 d: 1 + 2 > 3; //false
e: 1 + 2 < 4; //true
f: 1+2*3 >= 6; //true
/* e: 1 < 3 and 3 < 5; /* e: 1 < 3 and 3 < 5;
f: (1 2 3) and (4 5 6);*/ f: (1 2 3) and (4 5 6);*/
......
...@@ -459,14 +459,14 @@ namespace Sass { ...@@ -459,14 +459,14 @@ namespace Sass {
Node relation(Node::relation, line_number, 2); Node relation(Node::relation, line_number, 2);
expr1.eval_me = true; expr1.eval_me = true;
relation << expr1; relation << expr1;
if (lex< eq_op >()) relation << Node(Node::eq, line_number, lexed); if (lex< eq_op >()) relation << Node(Node::eq, line_number, lexed);
else if (lex< neq_op>()) relation << Node(Node::neq, line_number, lexed); else if (lex< neq_op>()) relation << Node(Node::neq, line_number, lexed);
else if (lex< gt_op >()) relation << Node(Node::gt, line_number, lexed);
else if (lex< gte_op>()) relation << Node(Node::gte, line_number, lexed); else if (lex< gte_op>()) relation << Node(Node::gte, line_number, lexed);
else if (lex< lt_op >()) relation << Node(Node::lt, line_number, lexed);
else if (lex< lte_op>()) relation << Node(Node::lte, line_number, lexed); else if (lex< lte_op>()) relation << Node(Node::lte, line_number, lexed);
else if (lex< gt_op >()) relation << Node(Node::gt, line_number, lexed);
else if (lex< lt_op >()) relation << Node(Node::lt, line_number, lexed);
Node expr2(parse_expression()); Node expr2(parse_expression());
expr2.eval_me = true; expr2.eval_me = true;
relation << expr2; relation << expr2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment