Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
6ba9d8cb
Commit
6ba9d8cb
authored
Oct 04, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fully evaluating the arguments to the comparison operators.
parent
9c16b179
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
eval_apply.cpp
eval_apply.cpp
+15
-4
eval_apply.hpp
eval_apply.hpp
+1
-0
No files found.
eval_apply.cpp
View file @
6ba9d8cb
...
@@ -302,14 +302,25 @@ namespace Sass {
...
@@ -302,14 +302,25 @@ namespace Sass {
}
break
;
}
break
;
case
Node
:
:
relation
:
{
case
Node
:
:
relation
:
{
Node
lhs
(
eval
(
expr
[
0
],
prefix
,
env
,
f_env
,
new_Node
,
ctx
));
// Node lhs(eval(expr[0], prefix, env, f_env, new_Node, ctx));
Node
op
(
expr
[
1
]);
// Node op(expr[1]);
Node
rhs
(
eval
(
expr
[
2
],
prefix
,
env
,
f_env
,
new_Node
,
ctx
));
// Node rhs(eval(expr[2], prefix, env, f_env, new_Node, ctx));
Node
lhs
(
new_Node
(
Node
::
arguments
,
expr
[
0
].
path
(),
expr
[
0
].
line
(),
1
));
Node
rhs
(
new_Node
(
Node
::
arguments
,
expr
[
2
].
path
(),
expr
[
2
].
line
(),
1
));
Node
rel
(
expr
[
1
]);
lhs
<<
expr
[
0
];
rhs
<<
expr
[
2
];
lhs
=
eval_arguments
(
lhs
,
prefix
,
env
,
f_env
,
new_Node
,
ctx
);
rhs
=
eval_arguments
(
rhs
,
prefix
,
env
,
f_env
,
new_Node
,
ctx
);
lhs
=
lhs
[
0
];
rhs
=
rhs
[
0
];
Node
T
(
new_Node
(
Node
::
boolean
,
lhs
.
path
(),
lhs
.
line
(),
true
));
Node
T
(
new_Node
(
Node
::
boolean
,
lhs
.
path
(),
lhs
.
line
(),
true
));
Node
F
(
new_Node
(
Node
::
boolean
,
lhs
.
path
(),
lhs
.
line
(),
false
));
Node
F
(
new_Node
(
Node
::
boolean
,
lhs
.
path
(),
lhs
.
line
(),
false
));
switch
(
op
.
type
())
switch
(
rel
.
type
())
{
{
case
Node
:
:
eq
:
result
=
((
lhs
==
rhs
)
?
T
:
F
);
break
;
case
Node
:
:
eq
:
result
=
((
lhs
==
rhs
)
?
T
:
F
);
break
;
case
Node
:
:
neq
:
result
=
((
lhs
!=
rhs
)
?
T
:
F
);
break
;
case
Node
:
:
neq
:
result
=
((
lhs
!=
rhs
)
?
T
:
F
);
break
;
...
...
eval_apply.hpp
View file @
6ba9d8cb
...
@@ -15,6 +15,7 @@ namespace Sass {
...
@@ -15,6 +15,7 @@ namespace Sass {
void
expand
(
Node
expr
,
Node
prefix
,
Environment
&
env
,
map
<
string
,
Function
>&
f_env
,
Node_Factory
&
new_Node
,
Context
&
ctx
,
bool
function_name
=
false
);
void
expand
(
Node
expr
,
Node
prefix
,
Environment
&
env
,
map
<
string
,
Function
>&
f_env
,
Node_Factory
&
new_Node
,
Context
&
ctx
,
bool
function_name
=
false
);
Node
eval
(
Node
expr
,
Node
prefix
,
Environment
&
env
,
map
<
string
,
Function
>&
f_env
,
Node_Factory
&
new_Node
,
Context
&
ctx
,
bool
function_name
=
false
);
Node
eval
(
Node
expr
,
Node
prefix
,
Environment
&
env
,
map
<
string
,
Function
>&
f_env
,
Node_Factory
&
new_Node
,
Context
&
ctx
,
bool
function_name
=
false
);
Node
eval_arguments
(
Node
args
,
Node
prefix
,
Environment
&
env
,
map
<
string
,
Function
>&
f_env
,
Node_Factory
&
new_Node
,
Context
&
ctx
);
Node
eval_function
(
string
name
,
Node
stm
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
Context
&
ctx
,
bool
toplevel
=
false
);
Node
eval_function
(
string
name
,
Node
stm
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
Context
&
ctx
,
bool
toplevel
=
false
);
Node
reduce
(
Node
list
,
size_t
head
,
Node
acc
,
Node_Factory
&
new_Node
);
Node
reduce
(
Node
list
,
size_t
head
,
Node
acc
,
Node_Factory
&
new_Node
);
Node
accumulate
(
Node
::
Type
op
,
Node
acc
,
Node
rhs
,
Node_Factory
&
new_Node
);
Node
accumulate
(
Node
::
Type
op
,
Node
acc
,
Node
rhs
,
Node_Factory
&
new_Node
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment