comments
This commit is contained in:
parent
9268e2725e
commit
c8bbabdeb8
@ -12,10 +12,9 @@ from lesscpy.lessc import utility
|
|||||||
|
|
||||||
class Deferred(Node):
|
class Deferred(Node):
|
||||||
def __init__(self, mixin, args, lineno=0):
|
def __init__(self, mixin, args, lineno=0):
|
||||||
"""This node represents mixin calls
|
"""This node represents mixin calls. The calls
|
||||||
within the body of other mixins. The calls
|
to these mixins are deferred until the second
|
||||||
to these mixins are deferred until the parent
|
parse cycle.
|
||||||
mixin is called.
|
|
||||||
args:
|
args:
|
||||||
mixin (Mixin): Mixin object
|
mixin (Mixin): Mixin object
|
||||||
args (list): Call arguments
|
args (list): Call arguments
|
||||||
@ -24,7 +23,11 @@ class Deferred(Node):
|
|||||||
self.lineno = lineno
|
self.lineno = lineno
|
||||||
|
|
||||||
def parse(self, scope, error=False):
|
def parse(self, scope, error=False):
|
||||||
""" Parse function.
|
""" Parse function. We search for mixins
|
||||||
|
first within current scope then fallback
|
||||||
|
to global scope. The special scope.deferred
|
||||||
|
is used when local scope mixins are called
|
||||||
|
within parent mixins.
|
||||||
args:
|
args:
|
||||||
scope (Scope): Current scope
|
scope (Scope): Current scope
|
||||||
returns:
|
returns:
|
||||||
@ -32,8 +35,6 @@ class Deferred(Node):
|
|||||||
"""
|
"""
|
||||||
res = False
|
res = False
|
||||||
ident, args = self.tokens
|
ident, args = self.tokens
|
||||||
# if hasattr(mixin, 'call'):
|
|
||||||
# return mixin.call(scope, args)
|
|
||||||
ident.parse(scope)
|
ident.parse(scope)
|
||||||
mixins = scope.mixins(ident.raw())
|
mixins = scope.mixins(ident.raw())
|
||||||
if not mixins:
|
if not mixins:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user