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