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
89c05b3e
Commit
89c05b3e
authored
Sep 26, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting the @warn directive to work properly again.
parent
1fdd95f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
eval_apply.cpp
eval_apply.cpp
+27
-3
No files found.
eval_apply.cpp
View file @
89c05b3e
...
@@ -461,8 +461,21 @@ namespace Sass {
...
@@ -461,8 +461,21 @@ namespace Sass {
}
break
;
}
break
;
case
Node
:
:
warning
:
{
case
Node
:
:
warning
:
{
expr
[
0
]
=
eval
(
expr
[
0
],
prefix
,
env
,
f_env
,
new_Node
,
ctx
);
expr
=
new_Node
(
expr
);
cerr
<<
"WARNING:"
<<
expr
.
path
()
<<
":"
<<
expr
.
line
()
<<
" -- "
<<
expr
[
0
].
to_string
()
<<
endl
;
expr
[
0
]
=
eval
(
expr
[
0
],
Node
(),
env
,
f_env
,
new_Node
,
ctx
);
string
prefix
(
"WARNING: "
);
string
indent
(
" "
);
Node
contents
(
expr
[
0
]);
string
result
(
contents
.
to_string
());
if
(
contents
.
type
()
==
Node
::
string_constant
||
contents
.
type
()
==
Node
::
string_schema
)
{
result
=
result
.
substr
(
1
,
result
.
size
()
-
2
);
// unquote if it's a single string
}
// These cerrs aren't log lines! They're supposed to be here!
cerr
<<
prefix
<<
result
<<
endl
;
cerr
<<
indent
<<
"on line "
<<
expr
.
line
()
<<
" of "
<<
expr
.
path
();
cerr
<<
endl
<<
endl
;
return
expr
;
return
expr
;
}
break
;
}
break
;
...
@@ -862,7 +875,18 @@ namespace Sass {
...
@@ -862,7 +875,18 @@ namespace Sass {
case
Node
:
:
warning
:
{
case
Node
:
:
warning
:
{
stm
=
new_Node
(
stm
);
stm
=
new_Node
(
stm
);
stm
[
0
]
=
eval
(
stm
[
0
],
Node
(),
bindings
,
ctx
.
function_env
,
new_Node
,
ctx
);
stm
[
0
]
=
eval
(
stm
[
0
],
Node
(),
bindings
,
ctx
.
function_env
,
new_Node
,
ctx
);
cerr
<<
"WARNING:"
<<
stm
.
path
()
<<
":"
<<
stm
.
line
()
<<
" -- "
<<
stm
[
0
].
to_string
()
<<
endl
;
string
prefix
(
"WARNING: "
);
string
indent
(
" "
);
Node
contents
(
stm
[
0
]);
string
result
(
contents
.
to_string
());
if
(
contents
.
type
()
==
Node
::
string_constant
||
contents
.
type
()
==
Node
::
string_schema
)
{
result
=
result
.
substr
(
1
,
result
.
size
()
-
2
);
// unquote if it's a single string
}
// These cerrs aren't log lines! They're supposed to be here!
cerr
<<
prefix
<<
result
<<
endl
;
cerr
<<
indent
<<
"on line "
<<
stm
.
line
()
<<
" of "
<<
stm
.
path
();
cerr
<<
endl
<<
endl
;
}
break
;
}
break
;
case
Node
:
:
return_directive
:
{
case
Node
:
:
return_directive
:
{
...
...
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