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
ddbc68b5
Commit
ddbc68b5
authored
Apr 13, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Should be catching all syntax errors now.
parent
1b886695
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
document_parser.cpp
document_parser.cpp
+5
-7
exceptional.scss
exceptional.scss
+2
-1
No files found.
document_parser.cpp
View file @
ddbc68b5
...
@@ -459,10 +459,9 @@ namespace Sass {
...
@@ -459,10 +459,9 @@ namespace Sass {
Node
Document
::
parse_rule
()
{
Node
Document
::
parse_rule
()
{
Node
rule
(
Node
::
rule
,
line_number
,
2
);
Node
rule
(
Node
::
rule
,
line_number
,
2
);
lex
<
identifier
>
(
);
if
(
!
lex
<
identifier
>
())
syntax_error
(
"invalid property name"
);
rule
<<
Node
(
Node
::
property
,
line_number
,
lexed
);
rule
<<
Node
(
Node
::
property
,
line_number
,
lexed
);
lex
<
exactly
<
':'
>
>
();
if
(
!
lex
<
exactly
<
':'
>
>
())
syntax_error
(
"property
\"
"
+
lexed
.
to_string
()
+
"
\"
must be followed by a ':'"
);
// rule << parse_values();
rule
<<
parse_list
();
rule
<<
parse_list
();
return
rule
;
return
rule
;
}
}
...
@@ -477,9 +476,8 @@ namespace Sass {
...
@@ -477,9 +476,8 @@ namespace Sass {
if
(
peek
<
exactly
<
';'
>
>
(
position
)
||
if
(
peek
<
exactly
<
';'
>
>
(
position
)
||
peek
<
exactly
<
'}'
>
>
(
position
)
||
peek
<
exactly
<
'}'
>
>
(
position
)
||
peek
<
exactly
<
'{'
>
>
(
position
)
||
peek
<
exactly
<
'{'
>
>
(
position
)
||
peek
<
exactly
<
')'
>
>
(
position
))
{
peek
<
exactly
<
')'
>
>
(
position
))
return
Node
(
Node
::
nil
,
line_number
);
// TO DO: maybe use Node::none?
{
return
Node
(
Node
::
nil
,
line_number
);
}
}
Node
list1
(
parse_space_list
());
Node
list1
(
parse_space_list
());
// if it's a singleton, return it directly; don't wrap it
// if it's a singleton, return it directly; don't wrap it
if
(
!
peek
<
exactly
<
','
>
>
(
position
))
return
list1
;
if
(
!
peek
<
exactly
<
','
>
>
(
position
))
return
list1
;
...
@@ -649,7 +647,7 @@ namespace Sass {
...
@@ -649,7 +647,7 @@ namespace Sass {
if
(
value
.
type
==
Node
::
comma_list
||
value
.
type
==
Node
::
space_list
)
{
if
(
value
.
type
==
Node
::
comma_list
||
value
.
type
==
Node
::
space_list
)
{
value
[
0
].
eval_me
=
true
;
value
[
0
].
eval_me
=
true
;
}
}
lex
<
exactly
<
')'
>
>
(
);
if
(
!
lex
<
exactly
<
')'
>
>
())
syntax_error
(
"unclosed parenthesis"
);
return
value
;
return
value
;
}
}
else
{
else
{
...
...
exceptional.scss
View file @
ddbc68b5
...
@@ -20,5 +20,6 @@ div[hux ~= "hello"] {
...
@@ -20,5 +20,6 @@ div[hux ~= "hello"] {
hux
:
blux
;
hux
:
blux
;
foo
:
boo
;
foo
:
boo
;
@include
moogoo
;
@include
moogoo
;
dux
:
mux
dux
:
mux
;
color
:
foo
(
$x
:
);
}
}
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