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
e2f54e2f
Commit
e2f54e2f
authored
Jul 16, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working out more image_url stuff. Have a reasonably simple solution.
parent
6cffdb9f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
4 deletions
+11
-4
context.cpp
context.cpp
+1
-1
context.hpp
context.hpp
+1
-1
document_parser.cpp
document_parser.cpp
+1
-0
eval_apply.cpp
eval_apply.cpp
+5
-2
sass_interface.cpp
sass_interface.cpp
+2
-0
sass_interface.h
sass_interface.h
+1
-0
No files found.
context.cpp
View file @
e2f54e2f
...
...
@@ -51,7 +51,7 @@ namespace Sass {
color_names_to_values
(
map
<
string
,
Node
>
()),
color_values_to_names
(
map
<
Node
,
string
>
()),
new_Node
(
Node_Factory
()),
image_path
(
""
),
image_path
(
0
),
ref_count
(
0
),
has_extensions
(
false
)
{
...
...
context.hpp
View file @
e2f54e2f
...
...
@@ -50,7 +50,7 @@ namespace Sass {
map
<
string
,
Node
>
color_names_to_values
;
map
<
Node
,
string
>
color_values_to_names
;
Node_Factory
new_Node
;
string
image_path
;
char
*
image_path
;
size_t
ref_count
;
// string sass_path;
// string css_path;
...
...
document_parser.cpp
View file @
e2f54e2f
...
...
@@ -827,6 +827,7 @@ namespace Sass {
if
(
!
lex
<
exactly
<
')'
>
>
())
throw_syntax_error
(
"call to image-url is missing ')'"
);
Node
the_call
(
context
.
new_Node
(
Node
::
image_url
,
path
,
line
,
1
));
the_call
<<
url
;
the_call
.
should_eval
()
=
true
;
return
the_call
;
}
...
...
eval_apply.cpp
View file @
e2f54e2f
...
...
@@ -290,8 +290,11 @@ namespace Sass {
}
break
;
case
Node
:
:
image_url
:
{
expr
[
0
]
=
eval
(
expr
[
0
],
prefix
,
env
,
f_env
,
new_Node
,
ctx
);
return
expr
;
Node
base
(
eval
(
expr
[
0
],
prefix
,
env
,
f_env
,
new_Node
,
ctx
));
Node
prefix
(
new_Node
(
Node
::
identifier
,
base
.
path
(),
base
.
line
(),
Token
::
make
(
ctx
.
image_path
)));
Node
fullpath
(
new_Node
(
Node
::
concatenation
,
base
.
path
(),
base
.
line
(),
2
));
fullpath
<<
prefix
<<
base
;
return
fullpath
;
}
break
;
case
Node
:
:
function_call
:
{
...
...
sass_interface.cpp
View file @
e2f54e2f
...
...
@@ -59,6 +59,7 @@ extern "C" {
using
namespace
Sass
;
try
{
Context
cpp_ctx
(
c_ctx
->
options
.
include_paths
);
cpp_ctx
.
image_path
=
c_ctx
->
options
.
image_path
;
// Document doc(0, c_ctx->input_string, cpp_ctx);
Document
doc
(
Document
::
make_from_source_chars
(
cpp_ctx
,
c_ctx
->
source_string
));
c_ctx
->
output_string
=
process_document
(
doc
,
c_ctx
->
options
.
output_style
);
...
...
@@ -95,6 +96,7 @@ extern "C" {
try
{
Context
cpp_ctx
(
c_ctx
->
options
.
include_paths
);
// Document doc(c_ctx->input_path, 0, cpp_ctx);
cpp_ctx
.
image_path
=
c_ctx
->
options
.
image_path
;
Document
doc
(
Document
::
make_from_file
(
cpp_ctx
,
string
(
c_ctx
->
input_path
)));
// cerr << "MADE A DOC AND CONTEXT OBJ" << endl;
// cerr << "REGISTRY: " << doc.context.registry.size() << endl;
...
...
sass_interface.h
View file @
e2f54e2f
...
...
@@ -10,6 +10,7 @@ extern "C" {
struct
sass_options
{
int
output_style
;
char
*
include_paths
;
char
*
image_path
;
};
struct
sass_context
{
...
...
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