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
1878317b
Commit
1878317b
authored
Jun 04, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling more interpolation cases. Don't try to compile this.
parent
7f2d9ae4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
document_parser.cpp
document_parser.cpp
+21
-4
prelexer.cpp
prelexer.cpp
+2
-2
No files found.
document_parser.cpp
View file @
1878317b
...
...
@@ -568,16 +568,20 @@ namespace Sass {
Node
Document
::
parse_rule
()
{
Node
rule
(
context
.
new_Node
(
Node
::
rule
,
path
,
line
,
2
));
if
(
!
lex
<
sequence
<
optional
<
exactly
<
'*'
>
>
,
identifier
>
>
())
{
lex
<
spaces_and_comments
>
();
// get the line number right
if
(
lex
<
sequence
<
optional
<
exactly
<
'*'
>
>
,
identifier
>
>
())
{
rule
<<
context
.
new_Node
(
node
::
property
,
path
,
line
,
lexed
);
}
else
if
(
peek
<
sequence
<
optional
<
exactly
<
'*'
>
>
,
identifier_schema
>
>
())
{
rule
<<
parse_identifier_schema
();
}
else
{
throw_syntax_error
(
"invalid property name"
);
}
rule
<<
context
.
new_Node
(
Node
::
property
,
path
,
line
,
lexed
);
if
(
!
lex
<
exactly
<
':'
>
>
())
throw_syntax_error
(
"property
\"
"
+
lexed
.
to_string
()
+
"
\"
must be followed by a ':'"
);
rule
<<
parse_list
();
return
rule
;
}
Node
Document
::
parse_list
()
{
return
parse_comma_list
();
...
...
@@ -919,6 +923,19 @@ namespace Sass {
schema
.
should_eval
()
=
true
;
return
schema
;
}
Node
Document
::
parse_identifier_schema
()
{
Node
schema
(
context
.
new_Node
(
Node
::
identifier_schema
,
path
,
line
,
1
));
Token
stok
(
lexed
);
while
(
position
<
stok
.
end
)
{
}
schema
.
should_eval
()
=
true
;
return
schema
;
}
Node
Document
::
parse_function_call
()
{
...
...
prelexer.cpp
View file @
1878317b
...
...
@@ -83,10 +83,10 @@ namespace Sass {
// Match interpolant schemas
const
char
*
identifier_schema
(
const
char
*
src
)
{
// follows this pattern: (x*ix*)+
// follows this pattern: (x*ix*)+
... well, not quite
return
one_plus
<
sequence
<
zero_plus
<
identifier
>
,
interpolant
,
zero_plus
<
identifier
>
>
>
(
src
);
zero_plus
<
alternatives
<
identifier
,
number
,
exactly
<
'-'
>
>
>
>
>
(
src
);
}
const
char
*
value_schema
(
const
char
*
src
)
{
// follows this pattern: ([xyz]*i[xyz]*)+
...
...
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