Ejemplo n.º 1
0
def media(rule):
    rule | (no_ignore('@', 'media'), commas(cssid,
                                            False), '{', star(ruleset), '}')
    rule.astAttrs = {
        'media': [cssid],
        'rulesets': [ruleset],
    }
Ejemplo n.º 2
0
def declare(rule):
    rule | ('@', CSSID, '(', [commas(expression)], ')', _or(NEWLINE, EOF))
    rule.astAttrs = {
        'name': {
            'type': CSSID,
            'single': True
        },
        'args': expression
    }
Ejemplo n.º 3
0
def post_call(rule):
    rule | ('(', [commas(expression)], ')')
    rule.astAttrs = {'args': expression}
Ejemplo n.º 4
0
def declare_args(rule):
    rule | ('(', [commas(arg)], ')')
    rule.astAttrs = {'args': arg}
Ejemplo n.º 5
0
def declare_args(rule):
    rule | ('(', [commas(arg)], ')')
    rule.astAttrs = {'args': arg}
Ejemplo n.º 6
0
def enumDeclaration(rule):
	rule | (ENUM, Identifier, ['implements', commas(_type)], enumBody)
Ejemplo n.º 7
0
def interfaceMethodDeclaratorRest(rule):
	rule | (formalParameters, star('[' ']'), ['throws', commas(qualifiedName)], ';')
Ejemplo n.º 8
0
def media(rule):
    rule | (no_ignore('@', 'media'), commas(cssid, False), '{', star(ruleset), '}')
    rule.astAttrs = {
            'media':[cssid],
            'rulesets':[ruleset],
        }
Ejemplo n.º 9
0
def methodDeclaratorRest(rule):
	rule | (formalParameters, star('[' ']'), ['throws', commas(qualifiedName)], _or(methodBody, ';'))
Ejemplo n.º 10
0
def voidMethodDeclaratorRest(rule):
	rule | (formalParameters, ['throws', commas(qualifiedName)], _or(methodBody, ';'))
	rule.astAttrs = { 'parameters' : formalParameters, 'methodBody' : methodBody } 
Ejemplo n.º 11
0
def fieldDeclaration(rule):
	rule | (commas(variableDeclarator), ';')
	rule.astAttrs = { 'variables' : variableDeclarator }
Ejemplo n.º 12
0
def selectors(rule):
    rule | commas(selector, False)
    rule.astAttrs = {'selectors': selector}
Ejemplo n.º 13
0
def ruleset(rule):
    rule | (commas(selector, False), block) | (plus(_not('}')), '}')
    rule.astAttrs = {
        'selectors': [selector],
        'rules':[declaration],
    }
Ejemplo n.º 14
0
def list_(rule):
    rule | ('[', [commas(value)], ']')
    rule.astAttrs = {'values': [value]}
Ejemplo n.º 15
0
def voidInterfaceMethodDeclaratorRest(rule):
	rule | (formalParameters, ['throws', commas(qualifiedName)], ';')
Ejemplo n.º 16
0
def dict_(rule):
    rule | ("{", [commas((STRING, ":", value))], "}")
    rule.astAttrs = {"keys": [STRING], "values": [value]}
Ejemplo n.º 17
0
def constructorDeclaratorRest(rule):
	rule | (formalParameters, ['throws', commas(qualifiedName)], constructorBody)
Ejemplo n.º 18
0
def arguments(rule):
	rule | ('(', [commas(expression)], ')')
Ejemplo n.º 19
0
def arrayInitializer(rule):
	rule | ('{', [ commas(variableInitializer) ], '}')
	rule.astAttrs = { 'variableInitializer' : variableInitializer }
Ejemplo n.º 20
0
def normalInterfaceDeclaration(rule):
	rule | ('interface', Identifier, [typeParameters], ['extends', commas(_type)], interfaceBody)
Ejemplo n.º 21
0
def typeArguments(rule):
	rule | ('<', typeArgument, star(commas(typeArgument)), '>')
	rule.astAttrs = { 'args' : [typeArgument] }
Ejemplo n.º 22
0
def post_call(rule):
    rule | ('(', [commas(expression)], ')')
    rule.astAttrs = {'args': expression}
Ejemplo n.º 23
0
def formalParameters(rule):
	rule | ('(', [commas(formalParameterDecls)], ')')
	rule.astAttrs = { 'parameters' : formalParameterDecls }
Ejemplo n.º 24
0
def import_(rule):
    rule | (no_ignore('@', 'import'), import_from, [commas(cssid, False)], ';')
    rule.astAttrs = {
        'source': import_from,
        'media': [cssid],
    }
Ejemplo n.º 25
0
def elementValuePairs(rule):
	rule | commas(elementValuePair)
Ejemplo n.º 26
0
def ruleset(rule):
    rule | (commas(selector, False), block) | (plus(_not('}')), '}')
    rule.astAttrs = {
        'selectors': [selector],
        'rules': [declaration],
    }
Ejemplo n.º 27
0
def forInit(rule):
	rule | localVariableDeclaration \
    |   commas(expression)
Ejemplo n.º 28
0
def declare(rule):
    rule | ('@', CSSID, '(', [commas(expression)], ')', _or(NEWLINE, EOF))
    rule.astAttrs = {'name': {'type':CSSID, 'single':True}, 'args': expression}
Ejemplo n.º 29
0
def forUpdate(rule):
	rule | commas(expression)
Ejemplo n.º 30
0
def dict_(rule):
    rule | ('{', [commas((STRING, ':', value))], '}')
    rule.astAttrs = {'keys': [STRING], 'values': [value]}
Ejemplo n.º 31
0
def normalClassDeclaration(rule):
	rule | ('class', Identifier, [typeParameters], ['extends', _type], ['implements' , commas(_type)], classBody)
	rule.astAttrs = { 'className' : Identifier, 'extends' : _type, 'body' : classBody }
Ejemplo n.º 32
0
def expressionList(rule):
    rule | [commas(subExpression)]
    rule.astAttrs = {
        'expressions': [subExpression]
    }
Ejemplo n.º 33
0
def nonWildcardTypeArguments(rule):
	rule | ('<', commas(_type), '>')
Ejemplo n.º 34
0
def list_(rule):
    rule | ("[", [commas(value)], "]")
    rule.astAttrs = {"values": [value]}
Ejemplo n.º 35
0
def import_(rule):
    rule | (no_ignore('@', 'import'), import_from, [commas(cssid, False)], ';')
    rule.astAttrs = {
        'source':import_from,
        'media':[cssid],
    }