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
61423540
Commit
61423540
authored
May 25, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up some comments and stuff.
parent
5419343a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
document_parser.cpp
document_parser.cpp
+0
-9
No files found.
document_parser.cpp
View file @
61423540
...
...
@@ -5,8 +5,6 @@
namespace
Sass
{
using
namespace
std
;
// extern const char plus_equal[] = "+=";
void
Document
::
parse_scss
()
{
lex
<
optional_spaces
>
();
...
...
@@ -71,16 +69,13 @@ namespace Sass {
}
if
(
!
lex
<
string_constant
>
())
throw_syntax_error
(
"@import directive requires a url or quoted path"
);
// TO DO: BETTER PATH HANDLING
// cerr << "Importing " << lexed.to_string() << endl;
string
import_path
(
lexed
.
unquote
());
const
char
*
curr_path_start
=
path
.
c_str
();
const
char
*
curr_path_end
=
folders
(
curr_path_start
);
string
current_path
(
curr_path_start
,
curr_path_end
-
curr_path_start
);
try
{
// Document importee(current_path + import_path, context);
Document
importee
(
Document
::
make_from_file
(
context
,
current_path
+
import_path
));
importee
.
parse_scss
();
// cerr << "Finished parsing import " << lexed.to_string() << endl;
return
importee
.
root
;
}
catch
(
string
&
path
)
{
...
...
@@ -452,11 +447,9 @@ namespace Sass {
Node
propset
(
context
.
new_Node
(
Node
::
propset
,
path
,
line
,
2
));
propset
<<
rule
[
0
];
rule
[
0
]
=
context
.
new_Node
(
Node
::
property
,
path
,
line
,
Token
::
make
());
// inner[0] = rule;
inner
.
push_front
(
rule
);
propset
<<
inner
;
block
<<
propset
;
// cerr << block[block.size()-1][0].content.token.to_string() << endl;
}
else
{
block
<<
rule
;
...
...
@@ -794,8 +787,6 @@ namespace Sass {
while
(
position
<
end
)
{
if
(
lex
<
interpolant
>
())
{
Token
insides
(
Token
::
make
(
lexed
.
begin
+
2
,
lexed
.
end
-
1
));
// Document interp_doc(path, line, insides, context);
// Node interp_node(interp_doc.parse_list());
Node
interp_node
(
Document
::
make_from_token
(
context
,
insides
,
path
,
line
).
parse_list
());
schema
<<
interp_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