| Modifier and Type | Class and Description |
|---|---|
static class |
TemplateParser.ComplexExpressionException |
static class |
TemplateParser.ExitInstruction |
static class |
TemplateParser.NoFreeLoopException |
static class |
TemplateParser.ScriptingDisabledException |
static class |
TemplateParser.TypeDeclarationException |
IContext.Break, IContext.Continue| Constructor and Description |
|---|
TemplateParser(CodeBuilder cb) |
public TemplateParser(CodeBuilder cb)
public TemplateClass getTemplateClass()
getTemplateClass in interface IContextpublic CodeBuilder getCodeBuilder()
IContextReturn the root source code builder
getCodeBuilder in interface IContextpublic IDialect getDialect()
getDialect in interface IContextpublic void setDialect(IDialect dialect)
setDialect in interface IContextpublic String getRemain()
IContextReturn the remaining template string that has not parsed yet
public boolean hasRemain()
IContextDo have have remain template content to be parsed
public char peek()
public char pop()
public void step(int i)
IContextMove the current cursor i steps ahead
public String getTemplateSource(int start, int end)
IContextReturn any segment of template source
getTemplateSource in interface IContextpublic void openBlock(IBlockHandler bh)
IContextNotify context to enter a block
public IBlockHandler currentBlock()
IContextReturn current block handler
currentBlock in interface IContextpublic String closeBlock() throws ParseException
IContextNotify context to close current block and return the block close carets
closeBlock in interface IContextParseExceptionpublic String currentSection()
IContextReturns the current section name
currentSection in interface IContextpublic int currentLine()
IContextReturn current line number
currentLine in interface IContextpublic RythmEngine getEngine()
public boolean compactMode()
compactMode in interface IContextpublic void pushCompact(Boolean compact)
pushCompact in interface IContextpublic Boolean peekCompact()
peekCompact in interface IContextpublic Boolean popCompact()
popCompact in interface IContextpublic void pushBreak(IContext.Break b)
public IContext.Break peekBreak()
public IContext.Break popBreak()
public void pushContinue(IContext.Continue b)
pushContinue in interface IContextpublic IContext.Continue peekContinue()
peekContinue in interface IContextpublic IContext.Continue popContinue()
popContinue in interface IContextpublic boolean insideBody()
insideBody in interface IContextpublic void pushInsideBody(Boolean b)
pushInsideBody in interface IContextpublic Boolean peekInsideBody()
peekInsideBody in interface IContextpublic Boolean popInsideBody()
popInsideBody in interface IContextpublic boolean insideBody2()
insideBody2 in interface IContextpublic void pushInsideBody2(Boolean b)
pushInsideBody2 in interface IContextpublic Boolean peekInsideBody2()
peekInsideBody2 in interface IContextpublic Boolean popInsideBody2()
popInsideBody2 in interface IContextpublic boolean insideDirectiveComment()
insideDirectiveComment in interface IContextpublic void enterDirectiveComment()
enterDirectiveComment in interface IContextpublic void leaveDirectiveComment()
leaveDirectiveComment in interface IContextpublic ICodeType peekCodeType()
peekCodeType in interface IContextpublic void pushCodeType(ICodeType type)
pushCodeType in interface IContextpublic ICodeType popCodeType()
popCodeType in interface IContextpublic Locale peekLocale()
peekLocale in interface IContextpublic void pushLocale(Locale locale)
pushLocale in interface IContextpublic void shutdown()
Copyright © 2017–2021 OSGL (Open Source General Library). All rights reserved.