summaryrefslogtreecommitdiff
path: root/scss/grammar
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2014-09-04 15:36:59 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2014-09-04 15:36:59 -0700
commitb975fe23d42b8e5b334c273dbddba5744a501a26 (patch)
tree329cf71da704172ee546f7dfc4122cee2eec0de9 /scss/grammar
parent87739f1f586b3ad690cc658654c48bc3b24e1db1 (diff)
downloadpyscss-b975fe23d42b8e5b334c273dbddba5744a501a26.tar.gz
Fix interactions between interpolation and function literals.
Diffstat (limited to 'scss/grammar')
-rw-r--r--scss/grammar/expression.g3
-rw-r--r--scss/grammar/expression.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/scss/grammar/expression.g b/scss/grammar/expression.g
index b4dd9cb..772f3cd 100644
--- a/scss/grammar/expression.g
+++ b/scss/grammar/expression.g
@@ -24,6 +24,7 @@ from scss.ast import Variable
from scss.ast import ListLiteral
from scss.ast import MapLiteral
from scss.ast import ArgspecLiteral
+from scss.ast import FunctionLiteral
from scss.cssdefs import unescape
from scss.types import Color
from scss.types import Function
@@ -279,7 +280,7 @@ parser SassExpression:
interpolated_bare_url
{{ return Interpolation.maybe(interpolated_bare_url, type=Url, quotes=None) }}
| expr_lst
- {{ return Interpolation(['', expr_lst], type=Url, quotes=None) }}
+ {{ return FunctionLiteral(expr_lst, "url") }}
rule interpolated_bare_url:
(
diff --git a/scss/grammar/expression.py b/scss/grammar/expression.py
index fa08678..8a718c5 100644
--- a/scss/grammar/expression.py
+++ b/scss/grammar/expression.py
@@ -24,6 +24,7 @@ from scss.ast import Variable
from scss.ast import ListLiteral
from scss.ast import MapLiteral
from scss.ast import ArgspecLiteral
+from scss.ast import FunctionLiteral
from scss.cssdefs import unescape
from scss.types import Color
from scss.types import Function
@@ -387,7 +388,7 @@ class SassExpression(Parser):
return Interpolation.maybe(interpolated_bare_url, type=Url, quotes=None)
else: # in self.argspec_item_chks
expr_lst = self.expr_lst()
- return Interpolation(['', expr_lst], type=Url, quotes=None)
+ return FunctionLiteral(expr_lst, "url")
def interpolated_bare_url(self):
_token_ = self._peek(self.interpolated_url_chks)