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
93dbb680
Commit
93dbb680
authored
Jun 05, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Interpolation tweaks.
parent
ee2824ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
document_parser.cpp
document_parser.cpp
+2
-1
node_emitters.cpp
node_emitters.cpp
+8
-1
prelexer.cpp
prelexer.cpp
+1
-1
No files found.
document_parser.cpp
View file @
93dbb680
...
...
@@ -952,7 +952,7 @@ namespace Sass {
}
else
{
// throw an error if the interpolant is unterminated
throw_syntax_error
(
"unterminated interpolant inside
string constant
"
+
id
.
to_string
());
throw_syntax_error
(
"unterminated interpolant inside
interpolated identifier
"
+
id
.
to_string
());
}
}
else
{
// no interpolants left; add the last segment if nonempty
...
...
@@ -960,6 +960,7 @@ namespace Sass {
break
;
}
}
schema
.
should_eval
()
=
true
;
return
schema
;
}
...
...
node_emitters.cpp
View file @
93dbb680
...
...
@@ -302,7 +302,14 @@ namespace Sass {
case
value_schema
:
case
identifier_schema
:
{
string
result
;
for
(
size_t
i
=
0
,
S
=
size
();
i
<
S
;
++
i
)
result
+=
at
(
i
).
to_string
();
for
(
size_t
i
=
0
,
S
=
size
();
i
<
S
;
++
i
)
{
if
(
at
(
i
).
type
()
==
string_constant
)
{
result
+=
at
(
i
).
token
().
unquote
();
}
else
{
result
+=
at
(
i
).
to_string
();
}
}
return
result
;
}
break
;
...
...
prelexer.cpp
View file @
93dbb680
...
...
@@ -84,7 +84,7 @@ namespace Sass {
// Match interpolant schemas
const
char
*
identifier_schema
(
const
char
*
src
)
{
// follows this pattern: (x*ix*)+ ... well, not quite
return
one_plus
<
sequence
<
zero_plus
<
identifier
>
,
return
one_plus
<
sequence
<
zero_plus
<
alternatives
<
identifier
,
exactly
<
'-'
>
>
>
,
interpolant
,
zero_plus
<
alternatives
<
identifier
,
number
,
exactly
<
'-'
>
>
>
>
>
(
src
);
}
...
...
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