Package com.fizzed.rocker.compiler
Class TemplateParser
- java.lang.Object
-
- com.fizzed.rocker.compiler.TemplateParser
-
public class TemplateParser extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTemplateParser.TemplateIdentitystatic classTemplateParser.TemplateParserListener
-
Field Summary
Fields Modifier and Type Field Description private RockerConfigurationconfigurationprivate static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description TemplateParser(RockerConfiguration configuration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParserExceptionbuildParserException(SourceRef sourceRef, java.lang.String templatePath, java.lang.String msg)static ParserExceptionbuildParserException(SourceRef sourceRef, java.lang.String templatePath, java.lang.String msg, java.lang.Throwable cause)voidcombineAdjacentPlain(TemplateModel model)voiddiscardLogicWhitespace(TemplateModel model)RockerConfigurationgetConfiguration()TemplateModelparse(java.io.File f)TemplateModelparse(java.io.File f, java.lang.String packageName)TemplateModelparse(java.lang.String source, java.lang.String qualifiedName)private TemplateModelparse(org.antlr.v4.runtime.ANTLRInputStream input, java.lang.String packageName, java.lang.String templateName, long modifiedAt)(package private) static TemplateParser.TemplateIdentityparseIdentity(java.io.File baseDirectory, java.io.File templateFile)static ParserExceptionunwrapParserRuntimeException(java.lang.String templatePath, ParserRuntimeException e)
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
configuration
private final RockerConfiguration configuration
-
-
Constructor Detail
-
TemplateParser
public TemplateParser(RockerConfiguration configuration)
-
-
Method Detail
-
getConfiguration
public RockerConfiguration getConfiguration()
-
parseIdentity
static TemplateParser.TemplateIdentity parseIdentity(java.io.File baseDirectory, java.io.File templateFile) throws java.io.IOException
- Throws:
java.io.IOException
-
parse
public TemplateModel parse(java.io.File f) throws java.io.IOException, ParserException
- Throws:
java.io.IOExceptionParserException
-
parse
public TemplateModel parse(java.io.File f, java.lang.String packageName) throws java.io.IOException, ParserException
- Throws:
java.io.IOExceptionParserException
-
parse
public TemplateModel parse(java.lang.String source, java.lang.String qualifiedName) throws java.io.IOException, ParserException
- Throws:
java.io.IOExceptionParserException
-
buildParserException
public static ParserException buildParserException(SourceRef sourceRef, java.lang.String templatePath, java.lang.String msg)
-
buildParserException
public static ParserException buildParserException(SourceRef sourceRef, java.lang.String templatePath, java.lang.String msg, java.lang.Throwable cause)
-
parse
private TemplateModel parse(org.antlr.v4.runtime.ANTLRInputStream input, java.lang.String packageName, java.lang.String templateName, long modifiedAt) throws ParserException
- Throws:
ParserException
-
unwrapParserRuntimeException
public static ParserException unwrapParserRuntimeException(java.lang.String templatePath, ParserRuntimeException e)
-
combineAdjacentPlain
public void combineAdjacentPlain(TemplateModel model) throws ParserRuntimeException
- Throws:
ParserRuntimeException
-
discardLogicWhitespace
public void discardLogicWhitespace(TemplateModel model)
-
-