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
c165e7df
Commit
c165e7df
authored
Mar 12, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating the emitter to handle combinators. All tests pass again.
parent
c800eab4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
node.cpp
node.cpp
+3
-2
node.hpp
node.hpp
+17
-0
No files found.
node.cpp
View file @
c165e7df
...
...
@@ -80,7 +80,8 @@ namespace Sass {
if
(
prefixes
.
empty
())
{
new_prefixes
.
reserve
(
sel_group
.
children
->
size
());
for
(
int
i
=
0
;
i
<
sel_group
.
children
->
size
();
++
i
)
{
new_prefixes
.
push_back
(
string
(
sel_group
.
children
->
at
(
i
).
token
));
// new_prefixes.push_back(string(sel_group.children->at(i).token));
new_prefixes
.
push_back
(
string
(
sel_group
.
children
->
at
(
i
)));
}
}
else
{
...
...
@@ -89,7 +90,7 @@ namespace Sass {
for
(
int
j
=
0
;
j
<
sel_group
.
children
->
size
();
++
j
)
{
new_prefixes
.
push_back
(
prefixes
[
i
]
+
' '
+
string
(
sel_group
.
children
->
at
(
j
)
.
token
));
string
(
sel_group
.
children
->
at
(
j
)));
}
}
}
...
...
node.hpp
View file @
c165e7df
...
...
@@ -119,6 +119,23 @@ namespace Sass {
return
*
this
;
}
operator
string
()
{
if
(
type
==
selector
)
{
string
result
(
string
(
children
->
at
(
0
)));
for
(
int
i
=
1
;
i
<
children
->
size
();
++
i
)
{
result
+=
string
(
children
->
at
(
i
));
}
return
result
;
}
else
if
(
type
==
selector_combinator
)
{
if
(
std
::
isspace
(
token
.
begin
[
0
]))
return
string
(
" "
);
else
return
string
(
" "
)
+=
string
(
token
)
+=
string
(
" "
);
}
else
{
return
string
(
token
);
}
}
void
release
()
const
{
children
=
0
;
}
void
echo
(
stringstream
&
buf
,
size_t
depth
=
0
);
...
...
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