Documentation ¶
Index ¶
Constants ¶
View Source
const ( ILLEGAL = "Illegal" EOF = "Eof" EOL = '\n' LITERAL = "LITERAL" ARG = "@arg" // Literal will be the remainder of the line CONTEXT = "@context" // Context variable expected ATDisplayBool = "@bool=" // write integer ATDisplayInt = "@int=" // write integer ATDisplayInt64 = "@int64=" // write integer ATDisplay = "@=" // Literal will be up to the eol/eof or next @ @= name @ ATDisplayUnsafe = "@==" // Literal will be up to the eol/eof or next @ @= name @ IMPORT = "@import" // Placed at the begging for go imports INCLUDE = "@include" // includes another template but no embedded content EXTEND = "@extend" // includes another template CONTENT = "@content" // The content to embed YIELD = "@yield" // provide content to the included template STARTBLOCK = "@code" // Start of a code block. embedded in the code FUNCTS = "@func" // functions. embedded in the code TEXT = "@text" // text block written to the output stream IF = "@if" // The if statement convert to if <content> { ELSE = "@else" // converts to } else { END = "@end" // converts to } and ends the block (returns from nesting) FOR = "@for" // convert for for range loop )
View Source
const ( NODE_ROOT = iota NODE_TOKEN NODE_INCLUDE_SIMPLE NODE_INCLUDE NODE_CONTENT NODE_FUNC NODE_CODEBLOCK NODE_TEXT NODE_DISPLAY NODE_DISPLAY_RAW NODE_DISPLAY_BOOL NODE_DISPLAY_INT NODE_DISPLAY_INT64 NODE_TOKEN_RAW NODE_YIELD NODE_IF NODE_FOR NODE_ELSE NODE_ENDIF NODE_END )
Variables ¶
View Source
var Name = "Blip Template Compiler"
View Source
var Version = "0.8.10"
Functions ¶
func GteProcess ¶
func GteProcess(opt *BlipOptions)
Types ¶
type BlipOptions ¶
type Lexer ¶
type Lexer struct { FName string // contains filtered or unexported fields }
func (*Lexer) NextToken ¶
NextToken On input l.ch is the current character On output should be at next character after token required characters. peekChar will be looking at the next character
func (*Lexer) PriorToken ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) IsLiteralWhiteSpace ¶
type Render ¶
type Render struct {
// contains filtered or unexported fields
}
func (*Render) RenderOutput ¶
func (r *Render) RenderOutput(o io.Writer, packageName string, templateName string, langType string, sourcefile string, opt *BlipOptions)
RenderOutput -- Writes the parse treee out as a golang file
func (*Render) WriteNodeForStatement ¶
Click to show internal directories.
Click to hide internal directories.