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
707e3b75
Commit
707e3b75
authored
May 25, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting things to build.
parent
3deff56c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
document.hpp
document.hpp
+1
-1
error.hpp
error.hpp
+1
-1
sass_interface.cpp
sass_interface.cpp
+3
-3
sass_interface.h
sass_interface.h
+1
-1
No files found.
document.hpp
View file @
707e3b75
...
@@ -31,9 +31,9 @@ namespace Sass {
...
@@ -31,9 +31,9 @@ namespace Sass {
private
:
private
:
// force the use of the "make_from_..." factory funtions
// force the use of the "make_from_..." factory funtions
Document
(
Context
&
ctx
);
Document
(
Context
&
ctx
);
~
Document
();
public
:
public
:
Document
(
const
Document
&
doc
);
Document
(
const
Document
&
doc
);
~
Document
();
static
Document
make_from_file
(
Context
&
ctx
,
string
path
);
static
Document
make_from_file
(
Context
&
ctx
,
string
path
);
static
Document
make_from_source_chars
(
Context
&
ctx
,
char
*
src
,
string
path
=
""
);
static
Document
make_from_source_chars
(
Context
&
ctx
,
char
*
src
,
string
path
=
""
);
...
...
error.hpp
View file @
707e3b75
...
@@ -4,8 +4,8 @@ namespace Sass {
...
@@ -4,8 +4,8 @@ namespace Sass {
enum
Type
{
read
,
write
,
syntax
,
evaluation
};
enum
Type
{
read
,
write
,
syntax
,
evaluation
};
Type
type
;
Type
type
;
size_t
line
;
string
path
;
string
path
;
size_t
line
;
string
message
;
string
message
;
Error
(
Type
type
,
string
path
,
size_t
line
,
string
message
)
Error
(
Type
type
,
string
path
,
size_t
line
,
string
message
)
...
...
sass_interface.cpp
View file @
707e3b75
...
@@ -72,7 +72,7 @@ extern "C" {
...
@@ -72,7 +72,7 @@ extern "C" {
}
}
catch
(
Error
&
e
)
{
catch
(
Error
&
e
)
{
stringstream
msg_stream
;
stringstream
msg_stream
;
msg_stream
<<
"ERROR -- "
<<
e
.
file_name
<<
", line "
<<
e
.
line_number
<<
": "
<<
e
.
message
<<
endl
;
msg_stream
<<
"ERROR -- "
<<
e
.
path
<<
", line "
<<
e
.
line
<<
": "
<<
e
.
message
<<
endl
;
string
msg
(
msg_stream
.
str
());
string
msg
(
msg_stream
.
str
());
char
*
msg_str
=
(
char
*
)
malloc
(
msg
.
size
()
+
1
);
char
*
msg_str
=
(
char
*
)
malloc
(
msg
.
size
()
+
1
);
strcpy
(
msg_str
,
msg
.
c_str
());
strcpy
(
msg_str
,
msg
.
c_str
());
...
@@ -100,7 +100,7 @@ extern "C" {
...
@@ -100,7 +100,7 @@ extern "C" {
try
{
try
{
Context
cpp_ctx
(
c_ctx
->
options
.
include_paths
);
Context
cpp_ctx
(
c_ctx
->
options
.
include_paths
);
// Document doc(c_ctx->input_path, 0, cpp_ctx);
// Document doc(c_ctx->input_path, 0, cpp_ctx);
Document
doc
(
Document
::
make_from_file
(
cpp_ctx
,
string
(
c_ctx
->
input_path
));
Document
doc
(
Document
::
make_from_file
(
cpp_ctx
,
string
(
c_ctx
->
input_path
))
)
;
// cerr << "MADE A DOC AND CONTEXT OBJ" << endl;
// cerr << "MADE A DOC AND CONTEXT OBJ" << endl;
// cerr << "REGISTRY: " << doc.context.registry.size() << endl;
// cerr << "REGISTRY: " << doc.context.registry.size() << endl;
c_ctx
->
output_string
=
process_document
(
doc
,
c_ctx
->
options
.
output_style
);
c_ctx
->
output_string
=
process_document
(
doc
,
c_ctx
->
options
.
output_style
);
...
@@ -109,7 +109,7 @@ extern "C" {
...
@@ -109,7 +109,7 @@ extern "C" {
}
}
catch
(
Error
&
e
)
{
catch
(
Error
&
e
)
{
stringstream
msg_stream
;
stringstream
msg_stream
;
msg_stream
<<
"ERROR -- "
<<
e
.
file_name
<<
", line "
<<
e
.
line_number
<<
": "
<<
e
.
message
<<
endl
;
msg_stream
<<
"ERROR -- "
<<
e
.
path
<<
", line "
<<
e
.
line
<<
": "
<<
e
.
message
<<
endl
;
string
msg
(
msg_stream
.
str
());
string
msg
(
msg_stream
.
str
());
char
*
msg_str
=
(
char
*
)
malloc
(
msg
.
size
()
+
1
);
char
*
msg_str
=
(
char
*
)
malloc
(
msg
.
size
()
+
1
);
strcpy
(
msg_str
,
msg
.
c_str
());
strcpy
(
msg_str
,
msg
.
c_str
());
...
...
sass_interface.h
View file @
707e3b75
...
@@ -13,7 +13,7 @@ struct sass_options {
...
@@ -13,7 +13,7 @@ struct sass_options {
};
};
struct
sass_context
{
struct
sass_context
{
char
*
input
_string
;
char
*
source
_string
;
char
*
output_string
;
char
*
output_string
;
struct
sass_options
options
;
struct
sass_options
options
;
int
error_status
;
int
error_status
;
...
...
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