class BlockStatement(Rule): grammar = '{', _, Keyword( 'block'), _, Expression, _, '}', BlockContent, '{/', Keyword( 'block'), '}'
class IncludeStatement(UnaryRule): grammar = '{', _, Keyword('include'), _, Literal( 'file='), Expression, _, '}'
class ExtendsStatement(UnaryRule): grammar = '{', _, Keyword('extends'), _, Expression, _, '}'
class TranslationStatement(Rule): grammar = ('{', _, Keyword('t'), _, Literal('id='), Expression, optional(_, IsLink), _, '}')
class AssignStatement(Rule): grammar = ('{', _, Keyword('assign'), _, Literal('var='), Identifier, _, Literal('value='), Expression, _, '}')
class IfStatement(Rule): grammar = ('{', _, Keyword('if'), _, [IfConditionList, IfCondition], _, '}', SmartyLanguage, optional(IfMoreStatement), '{/', Keyword('if'), '}')
class ForStatement(Rule): grammar = ('{', _, Keyword('foreach'), [ForeachParameters, ForeachArray], _, '}', ForContent, optional(ForeachelseStatement), '{/', Keyword('foreach'), '}')
class ForKey(UnaryRule): grammar = Keyword('key'), '=', omit(optional(['"', '\''])), Symbol, omit( optional(['"', '\'']))
class ElseifStatement(Rule): grammar = ('{', Keyword('elseif'), _, [IfConditionList, IfCondition], _, '}', SmartyLanguage)
class ForName(UnaryRule): grammar = Keyword('name'), '=', omit(optional(['"', '\''])), Symbol, omit( optional(['"', '\'']))
class ForItem(UnaryRule): grammar = Keyword('item'), '=', omit(optional(['"', '\''])), Symbol, omit( optional(['"', '\'']))
class ForFrom(UnaryRule): grammar = Keyword('from'), '=', omit(optional(['"', '\''])), Expression, omit( optional(['"', '\'']))
class ForeachelseStatement(UnaryRule): grammar = '{', Keyword('foreachelse'), '}', SmartyLanguage
class ElseStatement(UnaryRule): grammar = '{', Keyword('else'), '}', SmartyLanguage