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
d5012b2d
Commit
d5012b2d
authored
Sep 17, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating the boolean functions
parent
907773ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
functions.cpp
functions.cpp
+3
-7
No files found.
functions.cpp
View file @
d5012b2d
...
@@ -1079,12 +1079,8 @@ namespace Sass {
...
@@ -1079,12 +1079,8 @@ namespace Sass {
extern
Signature
not_sig
=
"not($value)"
;
extern
Signature
not_sig
=
"not($value)"
;
Node
not_impl
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
Node
not_impl
(
const
Node
parameter_names
,
Environment
&
bindings
,
Node_Factory
&
new_Node
,
string
&
path
,
size_t
line
)
{
Node
val
(
bindings
[
parameter_names
[
0
].
token
()]);
Node
val
(
bindings
[
parameter_names
[
0
].
token
()]);
if
(
val
.
type
()
==
Node
::
boolean
&&
val
.
boolean_value
()
==
false
)
{
if
(
val
.
is_false
())
return
new_Node
(
Node
::
boolean
,
path
,
line
,
true
);
return
new_Node
(
Node
::
boolean
,
path
,
line
,
true
);
return
new_Node
(
Node
::
boolean
,
path
,
line
,
false
);
}
else
{
return
new_Node
(
Node
::
boolean
,
path
,
line
,
false
);
}
}
}
extern
Signature
if_sig
=
"if($condition, $if-true, $if-false)"
;
extern
Signature
if_sig
=
"if($condition, $if-true, $if-false)"
;
...
@@ -1093,7 +1089,7 @@ namespace Sass {
...
@@ -1093,7 +1089,7 @@ namespace Sass {
Node
consequent
(
bindings
[
parameter_names
[
1
].
token
()]);
Node
consequent
(
bindings
[
parameter_names
[
1
].
token
()]);
Node
alternative
(
bindings
[
parameter_names
[
2
].
token
()]);
Node
alternative
(
bindings
[
parameter_names
[
2
].
token
()]);
if
(
predicate
.
type
()
==
Node
::
boolean
&&
predicate
.
boolean_value
()
==
false
)
return
alternative
;
if
(
predicate
.
is_false
()
)
return
alternative
;
return
consequent
;
return
consequent
;
}
}
...
...
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