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
291beeff
Commit
291beeff
authored
Apr 12, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More checks for syntax errors.
parent
bb2f9333
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
document_parser.cpp
document_parser.cpp
+4
-3
exceptional.scss
exceptional.scss
+5
-1
No files found.
document_parser.cpp
View file @
291beeff
...
...
@@ -54,7 +54,7 @@ namespace Sass {
Node
Document
::
parse_mixin_definition
()
{
lex
<
mixin
>
();
if
(
!
lex
<
identifier
>
())
syntax_error
(
"invalid name
for
@mixin directive"
);
if
(
!
lex
<
identifier
>
())
syntax_error
(
"invalid name
in
@mixin directive"
);
Node
name
(
Node
::
identifier
,
line_number
,
lexed
);
Node
params
(
parse_mixin_parameters
());
if
(
!
peek
<
exactly
<
'{'
>
>
())
syntax_error
(
"body for mixin "
+
name
.
content
.
token
.
to_string
()
+
" must begin with a '{'"
);
...
...
@@ -99,7 +99,7 @@ namespace Sass {
Node
Document
::
parse_mixin_call
()
{
lex
<
include
>
();
lex
<
identifier
>
(
);
if
(
!
lex
<
identifier
>
())
syntax_error
(
"invalid name in @include directive"
);
Node
name
(
Node
::
identifier
,
line_number
,
lexed
);
Node
args
(
parse_arguments
());
Node
call
(
Node
::
expansion
,
line_number
,
3
);
...
...
@@ -109,6 +109,7 @@ namespace Sass {
Node
Document
::
parse_arguments
()
{
Token
name
(
lexed
);
Node
args
(
Node
::
arguments
,
line_number
);
if
(
lex
<
exactly
<
'('
>
>
())
{
if
(
!
peek
<
exactly
<
')'
>
>
(
position
))
{
...
...
@@ -119,7 +120,7 @@ namespace Sass {
args
.
content
.
children
->
back
().
eval_me
=
true
;
}
}
lex
<
exactly
<
')'
>
>
(
);
if
(
!
lex
<
exactly
<
')'
>
>
())
syntax_error
(
"argument list for "
+
name
.
to_string
()
+
" requires a ')'"
);
}
return
args
;
}
...
...
exceptional.scss
View file @
291beeff
...
...
@@ -3,6 +3,9 @@
bux
:
$x
$y
;
}
div
{
@include
mux
(
hey
,
ho
);
@include
mux
(
a
,
b
;
color
:
red
;
width
:
10px
;
}
\ No newline at end of file
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