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
6c012583
Commit
6c012583
authored
Feb 28, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks.
parent
a9c41491
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
+9
-1
document.cpp
src/document.cpp
+1
-0
document.hpp
src/document.hpp
+6
-1
unit-test-document.cpp
src/unit-test-document.cpp
+2
-0
No files found.
src/document.cpp
View file @
6c012583
...
@@ -26,6 +26,7 @@ namespace Sass {
...
@@ -26,6 +26,7 @@ namespace Sass {
}
}
position
=
source
;
position
=
source
;
line_number
=
1
;
line_number
=
1
;
last_munch_succeeded
=
false
;
}
}
Document
::~
Document
()
{
Document
::~
Document
()
{
delete
[]
source
;
delete
[]
source
;
...
...
src/document.hpp
View file @
6c012583
...
@@ -11,6 +11,7 @@ namespace Sass {
...
@@ -11,6 +11,7 @@ namespace Sass {
unsigned
int
line_number
;
unsigned
int
line_number
;
vector
<
Node
>
statements
;
vector
<
Node
>
statements
;
Token
top
;
Token
top
;
bool
last_munch_succeeded
;
Document
(
char
*
_path
,
char
*
_source
=
0
);
Document
(
char
*
_path
,
char
*
_source
=
0
);
~
Document
();
~
Document
();
...
@@ -24,9 +25,13 @@ namespace Sass {
...
@@ -24,9 +25,13 @@ namespace Sass {
if
(
after_token
)
{
if
(
after_token
)
{
top
=
Token
(
mx
,
after_whitespace
,
after_token
,
line_number
);
top
=
Token
(
mx
,
after_whitespace
,
after_token
,
line_number
);
position
=
after_token
;
position
=
after_token
;
last_munch_succeeded
=
true
;
return
true
;
return
true
;
}
}
else
return
false
;
else
{
last_munch_succeeded
=
false
;
return
false
;
}
}
}
};
};
...
...
src/unit-test-document.cpp
View file @
6c012583
...
@@ -28,6 +28,8 @@ int main(int argc, char* argv[]) {
...
@@ -28,6 +28,8 @@ int main(int argc, char* argv[]) {
print_slice
(
doc
.
top
.
begin
,
doc
.
top
.
end
);
print_slice
(
doc
.
top
.
begin
,
doc
.
top
.
end
);
doc
.
try_munching
<
Prelexer
::
identifier
>
();
doc
.
try_munching
<
Prelexer
::
identifier
>
();
print_slice
(
doc
.
top
.
begin
,
doc
.
top
.
end
);
print_slice
(
doc
.
top
.
begin
,
doc
.
top
.
end
);
doc
.
try_munching
<
Prelexer
::
dash_match
>
();
print_slice
(
doc
.
top
.
begin
,
doc
.
top
.
end
);
}
}
return
0
;
return
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