Class TemplateParser.TemplateParserListener
- All Implemented Interfaces:
RockerParserListener,org.antlr.v4.runtime.tree.ParseTreeListener
- Enclosing class:
TemplateParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.antlr.v4.runtime.ANTLRInputStreamprivate final TemplateModelprivate final Stringprivate final Stack<WithStatement> -
Constructor Summary
ConstructorsConstructorDescriptionTemplateParserListener(org.antlr.v4.runtime.ANTLRInputStream input, TemplateModel model, String templatePath) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleancreateSourceRef(org.antlr.v4.runtime.ParserRuleContext rule) createSourceRef(org.antlr.v4.runtime.ParserRuleContext rule, org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token stop) voidEnter a parse tree produced byRockerParser.argumentsStatement().voidEnter a parse tree produced byRockerParser.comment().voidEnter a parse tree produced byRockerParser.contentClosure().voidEnter a parse tree produced byRockerParser.eval().voidenterEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx) voidEnter a parse tree produced byRockerParser.forBlock().voidEnter a parse tree produced byRockerParser.ifBlock().voidEnter a parse tree produced byRockerParser.ifElseBlock().voidEnter a parse tree produced byRockerParser.ifElseIfBlock().voidEnter a parse tree produced byRockerParser.importDeclaration().voidEnter a parse tree produced byRockerParser.nullTernary().voidEnter a parse tree produced byRockerParser.optionDeclaration().voidEnter a parse tree produced byRockerParser.plain().voidEnter a parse tree produced byRockerParser.plainBlock().voidEnter a parse tree produced byRockerParser.plainElseBlock().voidEnter a parse tree produced byRockerParser.plainElseIfBlock().voidEnter a parse tree produced byRockerParser.switchBlock().voidEnter a parse tree produced byRockerParser.switchCase().voidEnter a parse tree produced byRockerParser.switchDefault().voidEnter a parse tree produced byRockerParser.switchExpressionBlock().voidEnter a parse tree produced byRockerParser.switchExpressionCase().voidEnter a parse tree produced byRockerParser.switchExpressionDefault().voidEnter a parse tree produced byRockerParser.value().voidEnter a parse tree produced byRockerParser.valueClosure().voidEnter a parse tree produced byRockerParser.withBlock().voidEnter a parse tree produced byRockerParser.withElseBlock().voidExit a parse tree produced byRockerParser.argumentsDeclaration().voidExit a parse tree produced byRockerParser.contentClosure().voidexitEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx) voidExit a parse tree produced byRockerParser.forBlock().voidExit a parse tree produced byRockerParser.ifBlock().voidExit a parse tree produced byRockerParser.plainBlock().voidExit a parse tree produced byRockerParser.plainElseBlock().voidExit a parse tree produced byRockerParser.switchBlock().voidExit a parse tree produced byRockerParser.switchCase().voidExit a parse tree produced byRockerParser.switchDefault().voidExit a parse tree produced byRockerParser.switchExpressionBlock().voidExit a parse tree produced byRockerParser.switchExpressionCase().voidExit a parse tree produced byRockerParser.switchExpressionDefault().voidExit a parse tree produced byRockerParser.valueClosure().voidExit a parse tree produced byRockerParser.withBlock().private booleaninSwitchButNotCaseOrDefault(int i) private booleanprivate voidprivate voidvoidMethods inherited from class com.fizzed.rocker.antlr4.RockerParserBaseListener
enterArgumentsDeclaration, enterBlock, enterContentClosureExpression, enterEvalExpression, enterImportStatement, enterNullTernaryExpression, enterOptionStatement, enterTemplate, enterTemplateContent, enterValueClosureExpression, enterValueExpression, exitArgumentsStatement, exitBlock, exitComment, exitContentClosureExpression, exitEval, exitEvalExpression, exitIfElseBlock, exitIfElseIfBlock, exitImportDeclaration, exitImportStatement, exitNullTernary, exitNullTernaryExpression, exitOptionDeclaration, exitOptionStatement, exitPlain, exitPlainElseIfBlock, exitTemplate, exitTemplateContent, exitValue, exitValueClosureExpression, exitValueExpression, exitWithElseBlock, visitErrorNode, visitTerminal
-
Field Details
-
input
private final org.antlr.v4.runtime.ANTLRInputStream input -
model
-
templatePath
-
withStatements
-
-
Constructor Details
-
TemplateParserListener
public TemplateParserListener(org.antlr.v4.runtime.ANTLRInputStream input, TemplateModel model, String templatePath)
-
-
Method Details
-
createSourceRef
-
createSourceRef
public SourceRef createSourceRef(org.antlr.v4.runtime.ParserRuleContext rule, org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token stop) -
enterEveryRule
public void enterEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx) Description copied from class:RockerParserBaseListenerThe default implementation does nothing.
- Specified by:
enterEveryRulein interfaceorg.antlr.v4.runtime.tree.ParseTreeListener- Overrides:
enterEveryRulein classRockerParserBaseListener
-
exitEveryRule
public void exitEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx) Description copied from class:RockerParserBaseListenerThe default implementation does nothing.
- Specified by:
exitEveryRulein interfaceorg.antlr.v4.runtime.tree.ParseTreeListener- Overrides:
exitEveryRulein classRockerParserBaseListener
-
verifyTemplateHeaderElementOK
public void verifyTemplateHeaderElementOK() -
areWeCurrentlyInAForLoop
public boolean areWeCurrentlyInAForLoop() -
areWeCurrentlyInASwitchBlock
public boolean areWeCurrentlyInASwitchBlock() -
areWeCurrentlyInACase
public boolean areWeCurrentlyInACase() -
areWeCurrentlyInADefault
public boolean areWeCurrentlyInADefault() -
enterComment
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.comment().The default implementation does nothing.
- Specified by:
enterCommentin interfaceRockerParserListener- Overrides:
enterCommentin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterImportDeclaration
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.importDeclaration().The default implementation does nothing.
- Specified by:
enterImportDeclarationin interfaceRockerParserListener- Overrides:
enterImportDeclarationin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterOptionDeclaration
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.optionDeclaration().The default implementation does nothing.
- Specified by:
enterOptionDeclarationin interfaceRockerParserListener- Overrides:
enterOptionDeclarationin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitArgumentsDeclaration
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.argumentsDeclaration().The default implementation does nothing.
- Specified by:
exitArgumentsDeclarationin interfaceRockerParserListener- Overrides:
exitArgumentsDeclarationin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterArgumentsStatement
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.argumentsStatement().The default implementation does nothing.
- Specified by:
enterArgumentsStatementin interfaceRockerParserListener- Overrides:
enterArgumentsStatementin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterPlain
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.plain().The default implementation does nothing.
- Specified by:
enterPlainin interfaceRockerParserListener- Overrides:
enterPlainin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterPlainBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.plainBlock().The default implementation does nothing.
- Specified by:
enterPlainBlockin interfaceRockerParserListener- Overrides:
enterPlainBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitPlainBlock
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.plainBlock().The default implementation does nothing.
- Specified by:
exitPlainBlockin interfaceRockerParserListener- Overrides:
exitPlainBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterPlainElseIfBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.plainElseIfBlock().The default implementation does nothing.
- Specified by:
enterPlainElseIfBlockin interfaceRockerParserListener- Overrides:
enterPlainElseIfBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterPlainElseBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.plainElseBlock().The default implementation does nothing.
- Specified by:
enterPlainElseBlockin interfaceRockerParserListener- Overrides:
enterPlainElseBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitPlainElseBlock
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.plainElseBlock().The default implementation does nothing.
- Specified by:
exitPlainElseBlockin interfaceRockerParserListener- Overrides:
exitPlainElseBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterValueClosure
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.valueClosure().The default implementation does nothing.
- Specified by:
enterValueClosurein interfaceRockerParserListener- Overrides:
enterValueClosurein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitValueClosure
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.valueClosure().The default implementation does nothing.
- Specified by:
exitValueClosurein interfaceRockerParserListener- Overrides:
exitValueClosurein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterContentClosure
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.contentClosure().The default implementation does nothing.
- Specified by:
enterContentClosurein interfaceRockerParserListener- Overrides:
enterContentClosurein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitContentClosure
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.contentClosure().The default implementation does nothing.
- Specified by:
exitContentClosurein interfaceRockerParserListener- Overrides:
exitContentClosurein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterValue
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.value().The default implementation does nothing.
- Specified by:
enterValuein interfaceRockerParserListener- Overrides:
enterValuein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterNullTernary
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.nullTernary().The default implementation does nothing.
- Specified by:
enterNullTernaryin interfaceRockerParserListener- Overrides:
enterNullTernaryin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterEval
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.eval().The default implementation does nothing.
- Specified by:
enterEvalin interfaceRockerParserListener- Overrides:
enterEvalin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterForBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.forBlock().The default implementation does nothing.
- Specified by:
enterForBlockin interfaceRockerParserListener- Overrides:
enterForBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitForBlock
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.forBlock().The default implementation does nothing.
- Specified by:
exitForBlockin interfaceRockerParserListener- Overrides:
exitForBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterWithBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.withBlock().The default implementation does nothing.
- Specified by:
enterWithBlockin interfaceRockerParserListener- Overrides:
enterWithBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterWithElseBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.withElseBlock().The default implementation does nothing.
- Specified by:
enterWithElseBlockin interfaceRockerParserListener- Overrides:
enterWithElseBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitWithBlock
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.withBlock().The default implementation does nothing.
- Specified by:
exitWithBlockin interfaceRockerParserListener- Overrides:
exitWithBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterIfBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.ifBlock().The default implementation does nothing.
- Specified by:
enterIfBlockin interfaceRockerParserListener- Overrides:
enterIfBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitIfBlock
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.ifBlock().The default implementation does nothing.
- Specified by:
exitIfBlockin interfaceRockerParserListener- Overrides:
exitIfBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterIfElseIfBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.ifElseIfBlock().The default implementation does nothing.
- Specified by:
enterIfElseIfBlockin interfaceRockerParserListener- Overrides:
enterIfElseIfBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterIfElseBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.ifElseBlock().The default implementation does nothing.
- Specified by:
enterIfElseBlockin interfaceRockerParserListener- Overrides:
enterIfElseBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterSwitchBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.switchBlock().The default implementation does nothing.
- Specified by:
enterSwitchBlockin interfaceRockerParserListener- Overrides:
enterSwitchBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitSwitchBlock
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.switchBlock().The default implementation does nothing.
- Specified by:
exitSwitchBlockin interfaceRockerParserListener- Overrides:
exitSwitchBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterSwitchExpressionBlock
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.switchExpressionBlock().The default implementation does nothing.
- Specified by:
enterSwitchExpressionBlockin interfaceRockerParserListener- Overrides:
enterSwitchExpressionBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitSwitchExpressionBlock
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.switchExpressionBlock().The default implementation does nothing.
- Specified by:
exitSwitchExpressionBlockin interfaceRockerParserListener- Overrides:
exitSwitchExpressionBlockin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterSwitchExpressionCase
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.switchExpressionCase().The default implementation does nothing.
- Specified by:
enterSwitchExpressionCasein interfaceRockerParserListener- Overrides:
enterSwitchExpressionCasein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitSwitchExpressionCase
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.switchExpressionCase().The default implementation does nothing.
- Specified by:
exitSwitchExpressionCasein interfaceRockerParserListener- Overrides:
exitSwitchExpressionCasein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterSwitchExpressionDefault
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.switchExpressionDefault().The default implementation does nothing.
- Specified by:
enterSwitchExpressionDefaultin interfaceRockerParserListener- Overrides:
enterSwitchExpressionDefaultin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitSwitchExpressionDefault
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.switchExpressionDefault().The default implementation does nothing.
- Specified by:
exitSwitchExpressionDefaultin interfaceRockerParserListener- Overrides:
exitSwitchExpressionDefaultin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
verifySwitchBlock
private void verifySwitchBlock() -
verifySwitchExpressionBlock
private void verifySwitchExpressionBlock() -
inSwitchButNotCaseOrDefault
private boolean inSwitchButNotCaseOrDefault(int i) -
inSwitchExpressionButNotCaseOrDefault
private boolean inSwitchExpressionButNotCaseOrDefault(int i) -
enterSwitchCase
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.switchCase().The default implementation does nothing.
- Specified by:
enterSwitchCasein interfaceRockerParserListener- Overrides:
enterSwitchCasein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitSwitchCase
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.switchCase().The default implementation does nothing.
- Specified by:
exitSwitchCasein interfaceRockerParserListener- Overrides:
exitSwitchCasein classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
enterSwitchDefault
Description copied from class:RockerParserBaseListenerEnter a parse tree produced byRockerParser.switchDefault().The default implementation does nothing.
- Specified by:
enterSwitchDefaultin interfaceRockerParserListener- Overrides:
enterSwitchDefaultin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-
exitSwitchDefault
Description copied from class:RockerParserBaseListenerExit a parse tree produced byRockerParser.switchDefault().The default implementation does nothing.
- Specified by:
exitSwitchDefaultin interfaceRockerParserListener- Overrides:
exitSwitchDefaultin classRockerParserBaseListener- Parameters:
ctx- the parse tree
-