Index
Modules:
tim
,
tim/engine/ast
,
tim/engine/compilers/html
,
tim/engine/compilers/tim
,
tim/engine/logging
,
tim/engine/meta
,
tim/engine/parser
,
tim/engine/std
,
tim/engine/tokens
.
API symbols
`$`:
ast: proc `$`(x: Ast): string
`&*`:
tim: template `&*`(n: untyped): untyped
add:
tokens: proc add(lex`gensym0: var Lexer)
addDep:
meta: proc addDep(t: TimTemplate; path: string)
addPlaceholder:
meta: proc addPlaceholder(engine: TimEngine; k: string; snippetTree: Ast)
Arg:
std: tuple Arg
ArraysModule:
std: object ArraysModule
Ast:
ast: type Ast
badIndentation:
logging: Message.badIndentation
call:
std: proc call(lib, fnName: string; args: seq[Arg]): Node
clearTemplateByPath:
meta: proc clearTemplateByPath(engine: TimEngine; path: string)
cmdBreak:
ast: CommandType.cmdBreak
cmdDiscard:
ast: CommandType.cmdDiscard
cmdEcho:
ast: CommandType.cmdEcho
cmdReturn:
ast: CommandType.cmdReturn
ColorsModule:
std: object ColorsModule
CommandType:
ast: enum CommandType
compileErrorWithArgs:
logging: template compileErrorWithArgs(msg: Message)
logging: template compileErrorWithArgs(msg: Message; meta: Meta; args: openArray[string])
logging: template compileErrorWithArgs(msg: Message; args: openArray[string])
logging: template compileErrorWithArgs(msg: Message; args: openArray[string]; meta: Meta)
ConditionBranch:
ast: tuple ConditionBranch
current:
tokens: proc current(lex`gensym0: var Lexer): char
deleteSnippet:
meta: proc deleteSnippet(engine: TimEngine; k: string; i: int)
dumpHook:
html: proc dumpHook(s: var string; v: Node)
html: proc dumpHook(s: var string; v: OrderedTableRef[string, Node])
html: proc dumpHook(s: var string; v: seq[Node])
duplicateAttribute:
logging: Message.duplicateAttribute
duplicateField:
logging: Message.duplicateField
duplicateViewLoader:
logging: Message.duplicateViewLoader
eof:
logging: Message.eof
error:
logging: proc error(logger: Logger; msg: Message; line, col: int; args: openArray[string])
logging: template error(msg: Message; meta: Meta; args: varargs[string])
logging: template error(msg: Message; tk: TokenTuple)
logging: template error(msg: Message; tk: TokenTuple; strFmt: bool; extraLines: seq[string]; extraLabel: string; args: varargs[string])
logging: template error(msg: Message; tk: TokenTuple; args: openArray[string])
errors:
logging: iterator errors(logger: Logger): Row
errorWithArgs:
logging: template errorWithArgs(msg: Message; tk: TokenTuple; args: openArray[string])
exists:
std: proc exists(lib: string): bool
flush:
meta: proc flush(engine: TimEngine)
fnExtraArg:
logging: Message.fnExtraArg
fnImportLocal:
ast: FunctionType.fnImportLocal
fnImportModule:
ast: FunctionType.fnImportModule
fnImportSystem:
ast: FunctionType.fnImportSystem
FnParam:
ast: tuple FnParam
fnRedefine:
logging: Message.fnRedefine
fnReturnMissingCommand:
logging: Message.fnReturnMissingCommand
fnReturnVoid:
logging: Message.fnReturnVoid
fnUndeclared:
logging: Message.fnUndeclared
FunctionType:
ast: enum FunctionType
getAst:
parser: proc getAst(p: Parser): Ast
getAstPath:
meta: proc getAstPath(t: TimTemplate): string
getAstStoragePath:
meta: proc getAstStoragePath(engine: TimEngine): string
getDeps:
meta: proc getDeps(t: TimTemplate): seq[string]
getError:
tokens: proc getError(lex`gensym0: Lexer): string
getGlobalData:
meta: proc getGlobalData(engine: TimEngine): JsonNode
getHash:
meta: proc getHash(t: TimTemplate): string
getHead:
html: proc getHead(c: HtmlCompiler): string
getHtml:
html: proc getHtml(c: HtmlCompiler): string
meta: proc getHtml(t: TimTemplate): string
getHtmlPath:
meta: proc getHtmlPath(t: TimTemplate): string
getHtmlStoragePath:
meta: proc getHtmlStoragePath(engine: TimEngine): string
getIndentSize:
meta: proc getIndentSize(engine: TimEngine): int
getInfixMathOp:
ast: proc getInfixMathOp(kind: TokenKind; isInfixInfix: bool): MathOp
getInfixOp:
ast: proc getInfixOp(kind: TokenKind; isInfixInfix: bool): InfixOp
getLayout:
meta: proc getLayout(engine: TimEngine; key: string): TimTemplate
getLayouts:
meta: iterator getLayouts(engine: TimEngine): TimTemplate
getMessage:
logging: proc getMessage(log: Log): Message
getName:
meta: proc getName(t: TimTemplate): string
getPath:
meta: proc getPath(engine: TimEngine; key: string; templateType: TimTemplateType): string
getSourcePath:
meta: proc getSourcePath(engine: TimEngine): string
meta: proc getSourcePath(t: TimTemplate): string
getTag:
ast: proc getTag(x: Node): string
getTail:
html: proc getTail(c: HtmlCompiler): string
meta: proc getTail(t: TimTemplate): string
getTemplateByPath:
meta: proc getTemplateByPath(engine: TimEngine; path: string): TimTemplate
getTemplateId:
meta: proc getTemplateId(t: TimTemplate): string
getTemplatePath:
meta: proc getTemplatePath(engine: TimEngine; path: string): string
getTemplateType:
meta: proc getTemplateType(engine: TimEngine; path: string): TimTemplateType
getToken:
tokens: proc getToken(lex: var Lexer): TokenTuple
getType:
ast: proc getType(x: NimNode): NodeType
meta: proc getType(t: TimTemplate): TimTemplateType
getView:
meta: proc getView(engine: TimEngine; key: string): TimTemplate
getViewIndent:
meta: proc getViewIndent(t: TimTemplate): uint
getViews:
meta: iterator getViews(engine: TimEngine): TimTemplate
getVoidNode:
ast: proc getVoidNode(): Node
globalStorage:
ast: StorageType.globalStorage
hasDep:
meta: proc hasDep(t: TimTemplate; path: string): bool
hasError:
html: proc hasError(c: HtmlCompiler): bool
parser: proc hasError(p: Parser): bool
tokens: proc hasError(lex`gensym0: Lexer): bool
hasLayout:
meta: proc hasLayout(engine: TimEngine; key: string): bool
hasLetters:
tokens: proc hasLetters(lex`gensym0: var Lexer; pos`gensym0: int): bool
hasNumbers:
tokens: proc hasNumbers(lex`gensym0: var Lexer; pos`gensym0: int): bool
hasPlaceholder:
meta: proc hasPlaceholder(engine: TimEngine; k: string): bool
hasView:
meta: proc hasView(engine: TimEngine; key: string): bool
HtmlAttributes:
ast: type HtmlAttributes
HtmlCompiler:
html: object HtmlCompiler
importCircularError:
logging: Message.importCircularError
importNotFound:
logging: Message.importNotFound
inc:
tokens: proc inc(lex`gensym0: var Lexer; offset`gensym0 = 1)
indexDefect:
logging: Message.indexDefect
InfixOp:
ast: enum InfixOp
initCommonStorage:
tim: macro initCommonStorage(x: untyped)
initModuleSystem:
std: proc initModuleSystem()
internalError:
logging: Message.internalError
invalidAccessorStorage:
logging: Message.invalidAccessorStorage
invalidContext:
logging: Message.invalidContext
invalidIndentation:
logging: Message.invalidIndentation
invalidIterator:
logging: Message.invalidIterator
invalidViewLoader:
logging: Message.invalidViewLoader
isMinified:
meta: proc isMinified(engine: TimEngine): bool
isUsed:
meta: proc isUsed(t: TimTemplate): bool
jitEnable:
meta: proc jitEnable(t: TimTemplate)
jitEnabled:
meta: proc jitEnabled(t: TimTemplate): bool
jsonValue:
ast: ValueKind.jsonValue
Level:
logging: enum Level
Lexer:
tokens: object Lexer
LexerException:
tokens: object LexerException
lexReady:
tokens: proc lexReady(lex`gensym0: var Lexer)
listPlaceholders:
meta: iterator listPlaceholders(engine: TimEngine): (string, seq[Ast])
localModule:
std: var localModule
localStorage:
tim: const localStorage
ast: StorageType.localStorage
Log:
logging: type Log
Logger:
logging: type Logger
lvlError:
logging: Level.lvlError
lvlInfo:
logging: Level.lvlInfo
lvlNotice:
logging: Level.lvlNotice
lvlWarn:
logging: Level.lvlWarn
MathOp:
ast: enum MathOp
Message:
logging: enum Message
Meta:
ast: type Meta
newArray:
ast: proc newArray(items: seq[Node] = @[]): Node
newAssignment:
ast: proc newAssignment(tk: TokenTuple; varValue: Node): Node
newBool:
ast: proc newBool(v: bool): Node
ast: proc newBool(v: bool; tk: TokenTuple): Node
newCall:
ast: proc newCall(tk: TokenTuple): Node
newCommand:
ast: proc newCommand(cmdType: CommandType; node: Node; tk: TokenTuple): Node
newCompiler:
html: proc newCompiler(ast: Ast; minify = true; indent = 2): HtmlCompiler
html: proc newCompiler(engine: TimEngine; ast: Ast; tpl: TimTemplate; minify = true; indent = 2; data: JsonNode = newJObject()): HtmlCompiler
newCondition:
ast: proc newCondition(condIfBranch: ConditionBranch; tk: TokenTuple): Node
newError:
logging: proc newError(logger: Logger; msg: Message; line, col: int; useFmt: bool; args: varargs[string])
newErrorMultiLines:
logging: proc newErrorMultiLines(logger: Logger; msg: Message; line, col: int; useFmt: bool; extraLines: seq[string]; extraLabel: string; args: varargs[string])
newFloat:
ast: proc newFloat(v: float): Node
ast: proc newFloat(v: float; tk: TokenTuple): Node
newFunction:
ast: proc newFunction(tk: TokenTuple; ident: string): Node
newHtmlElement:
ast: proc newHtmlElement(tag: HtmlTag; tk: TokenTuple): Node
newIdent:
ast: proc newIdent(tk: TokenTuple): Node
newInfix:
ast: proc newInfix(lhs, rhs: Node; infixOp: InfixOp; tk: TokenTuple): Node
newInfo:
logging: proc newInfo(logger: Logger; msg: Message; line, col: int; useFmt: bool; args: varargs[string])
newInteger:
ast: proc newInteger(v: int): Node
ast: proc newInteger(v: int; tk: TokenTuple): Node
newLexer:
tokens: proc newLexer(fileContent`gensym0: string; allowMultilineStrings`gensym0 = false): Lexer
newNode:
ast: proc newNode(nt: static NodeType): Node
ast: proc newNode(nt: static NodeType; tk: TokenTuple): Node
newNotice:
logging: proc newNotice(logger: Logger; msg: Message; line, col: int; useFmt: bool; args: varargs[string])
newParser:
parser: proc newParser(engine: TimEngine; tpl: TimTemplate; isMainParser = true; refreshAst = false): Parser
newStream:
ast: proc newStream(node: JsonNode): Node
newString:
ast: proc newString(v: string): Node
ast: proc newString(tk: TokenTuple): Node
newTim:
meta: proc newTim(src, output, basepath: string; minify = true; indent = 2; showHtmlError = false): TimEngine
newVariable:
ast: proc newVariable(varName: string; varValue: Node; meta: Meta): Node
ast: proc newVariable(varName: string; varValue: Node; tk: TokenTuple): Node
newWarn:
logging: proc newWarn(logger: Logger; msg: Message; line, col: int; useFmt: bool; args: varargs[string])
newWarningMultiLines:
logging: proc newWarningMultiLines(logger: Logger; msg: Message; line, col: int; useFmt: bool; extraLines: seq[string]; extraLabel: string; args: varargs[string])
NimCall:
std: type NimCall
nimValue:
ast: ValueKind.nimValue
Node:
ast: type Node
NodeType:
ast: enum NodeType
ntAssignableSet:
ast: const ntAssignableSet
ntAssignExpr:
ast: NodeType.ntAssignExpr
ntBracketExpr:
ast: NodeType.ntBracketExpr
ntCall:
ast: NodeType.ntCall
ntCaseStmt:
ast: NodeType.ntCaseStmt
ntClientBlock:
ast: NodeType.ntClientBlock
ntCommandStmt:
ast: NodeType.ntCommandStmt
ntConditionStmt:
ast: NodeType.ntConditionStmt
ntDotExpr:
ast: NodeType.ntDotExpr
ntFunction:
ast: NodeType.ntFunction
ntHtmlElement:
ast: NodeType.ntHtmlElement
ntIdent:
ast: NodeType.ntIdent
ntIdentPair:
ast: NodeType.ntIdentPair
ntImport:
ast: NodeType.ntImport
ntInclude:
ast: NodeType.ntInclude
ntIndexRange:
ast: NodeType.ntIndexRange
ntInfixExpr:
ast: NodeType.ntInfixExpr
ntJavaScriptSnippet:
ast: NodeType.ntJavaScriptSnippet
ntJsonSnippet:
ast: NodeType.ntJsonSnippet
ntLitArray:
ast: NodeType.ntLitArray
ntLitBool:
ast: NodeType.ntLitBool
ntLitFloat:
ast: NodeType.ntLitFloat
ntLitInt:
ast: NodeType.ntLitInt
ntLitObject:
ast: NodeType.ntLitObject
ntLitString:
ast: NodeType.ntLitString
ntLitVoid:
ast: NodeType.ntLitVoid
ntLoopStmt:
ast: NodeType.ntLoopStmt
ntMathInfixExpr:
ast: NodeType.ntMathInfixExpr
ntPlaceholder:
ast: NodeType.ntPlaceholder
ntRuntimeCode:
ast: NodeType.ntRuntimeCode
ntStmtList:
ast: NodeType.ntStmtList
ntStream:
ast: NodeType.ntStream
ntUnknown:
ast: NodeType.ntUnknown
ntVariableDef:
ast: NodeType.ntVariableDef
ntViewLoader:
ast: NodeType.ntViewLoader
ntYamlSnippet:
ast: NodeType.ntYamlSnippet
OSModule:
std: object OSModule
Parser:
parser: object Parser
parseSnippet:
parser: proc parseSnippet(snippetPath: string): Parser
parser: proc parseSnippet(id, code: string): Parser
precompile:
tim: proc precompile(engine: TimEngine; callback: TimCallback = nil; flush = true; waitThread = false; browserSyncPort = Port(6502); browserSyncDelay = 200; global: JsonNode = newJObject(); watchoutNotify = true)
readAst:
meta: proc readAst(engine: TimEngine; tpl: TimTemplate): Ast
render:
tim: proc render(engine: TimEngine; viewName: string; layoutName = defaultLayout; local = newJObject()): string
scopeStorage:
ast: StorageType.scopeStorage
ScopeTable:
ast: type ScopeTable
setError:
tokens: proc setError(lex`gensym0: var Lexer; message`gensym0: string)
setGlobalData:
meta: proc setGlobalData(engine: TimEngine; data: JsonNode)
setViewIndent:
meta: proc setViewIndent(t: TimTemplate; i: uint)
showHtmlErrors:
meta: proc showHtmlErrors(engine: TimEngine): bool
skip:
tokens: proc skip(lex`gensym0: var Lexer)
snippets:
meta: iterator snippets(engine: TimEngine; k: string): Ast
SourceCode:
std: type SourceCode
std:
std: proc std(lib: string): (Module, SourceCode)
stdlib:
std: var stdlib
StorageType:
ast: enum StorageType
StringsModule:
std: object StringsModule
SystemModule:
std: object SystemModule
TimCallback:
meta: type TimCallback
TimCompiler:
tim: object TimCompiler
TimEngine:
meta: type TimEngine
TimError:
meta: object TimError
TimModulesTable:
ast: type TimModulesTable
TimPartialsTable:
ast: type TimPartialsTable
TimPolicy:
meta: type TimPolicy
TimTemplate:
meta: type TimTemplate
TimTemplateType:
meta: enum TimTemplateType
toHtml:
tim: proc toHtml(name, code: string): string
TokenKind:
tokens: enum TokenKind
TokenTuple:
tokens: tuple TokenTuple
toNimSeq:
std: proc toNimSeq(node: Node): seq[string]
toTimNode:
ast: proc toTimNode(x: JsonNode): Node
ttInvalid:
meta: TimTemplateType.ttInvalid
ttLayout:
meta: TimTemplateType.ttLayout
ttPartial:
meta: TimTemplateType.ttPartial
ttView:
meta: TimTemplateType.ttView
typeMismatch:
logging: Message.typeMismatch
undeclaredField:
logging: Message.undeclaredField
undeclaredVariable:
logging: Message.undeclaredVariable
unexpectedToken:
logging: Message.unexpectedToken
Value:
ast: object Value
ValueKind:
ast: enum ValueKind
varImmutable:
logging: Message.varImmutable
varRedefine:
logging: Message.varRedefine
warn:
logging: proc warn(logger: Logger; msg: Message; line, col: int; strFmt: bool; args: varargs[string])
logging: proc warn(logger: Logger; msg: Message; line, col: int; args: varargs[string])
logging: template warn(msg: Message; tk: TokenTuple; strFmt: bool; args: varargs[string])
logging: template warn(msg: Message; tk: TokenTuple; args: varargs[string])
warnings:
logging: iterator warnings(logger: Logger): Row
warnWithArgs:
logging: template warnWithArgs(msg: Message; tk: TokenTuple; args: openArray[string])
writeAst:
meta: proc writeAst(engine: TimEngine; tpl: TimTemplate; astCode: Ast)
writeHtml:
meta: proc writeHtml(engine: TimEngine; tpl: TimTemplate; htmlCode: string)
writeHtmlTail:
meta: proc writeHtmlTail(engine: TimEngine; tpl: TimTemplate; htmlCode: string)