Esempio n. 1
0
class BlockStatement(Rule):
    grammar = '{', _, Keyword(
        'block'), _, Expression, _, '}', BlockContent, '{/', Keyword(
            'block'), '}'
Esempio n. 2
0
class IncludeStatement(UnaryRule):
    grammar = '{', _, Keyword('include'), _, Literal(
        'file='), Expression, _, '}'
Esempio n. 3
0
class ExtendsStatement(UnaryRule):
    grammar = '{', _, Keyword('extends'), _, Expression, _, '}'
Esempio n. 4
0
class TranslationStatement(Rule):
    grammar = ('{', _, Keyword('t'), _, Literal('id='), Expression,
               optional(_, IsLink), _, '}')
Esempio n. 5
0
class AssignStatement(Rule):
    grammar = ('{', _, Keyword('assign'), _, Literal('var='), Identifier, _,
               Literal('value='), Expression, _, '}')
Esempio n. 6
0
class IfStatement(Rule):
    grammar = ('{', _, Keyword('if'), _, [IfConditionList,
                                          IfCondition], _, '}', SmartyLanguage,
               optional(IfMoreStatement), '{/', Keyword('if'), '}')
Esempio n. 7
0
class ForStatement(Rule):
    grammar = ('{', _, Keyword('foreach'), [ForeachParameters,
                                            ForeachArray], _, '}', ForContent,
               optional(ForeachelseStatement), '{/', Keyword('foreach'), '}')
Esempio n. 8
0
class ForKey(UnaryRule):
    grammar = Keyword('key'), '=', omit(optional(['"', '\''])), Symbol, omit(
        optional(['"', '\'']))
Esempio n. 9
0
class ElseifStatement(Rule):
    grammar = ('{', Keyword('elseif'), _, [IfConditionList, IfCondition], _,
               '}', SmartyLanguage)
Esempio n. 10
0
class ForName(UnaryRule):
    grammar = Keyword('name'), '=', omit(optional(['"', '\''])), Symbol, omit(
        optional(['"', '\'']))
Esempio n. 11
0
class ForItem(UnaryRule):
    grammar = Keyword('item'), '=', omit(optional(['"', '\''])), Symbol, omit(
        optional(['"', '\'']))
Esempio n. 12
0
class ForFrom(UnaryRule):
    grammar = Keyword('from'), '=', omit(optional(['"',
                                                   '\''])), Expression, omit(
                                                       optional(['"', '\'']))
Esempio n. 13
0
class ForeachelseStatement(UnaryRule):
    grammar = '{', Keyword('foreachelse'), '}', SmartyLanguage
Esempio n. 14
0
class ElseStatement(UnaryRule):
    grammar = '{', Keyword('else'), '}', SmartyLanguage