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