tim/engine/compilers/html

Types

HtmlCompiler = object of TimCompiler
  when not defined timStandalone:
    
  
Object of a TimCompiler to output HTML

Procs

proc dumpHook(s: var string; v: Node) {....raises: [Exception], tags: [RootEffect],
                                        forbids: [].}
Dumps v node to stringified JSON using pkg/jsony
proc dumpHook(s: var string; v: OrderedTableRef[string, Node]) {.
    ...raises: [Exception], tags: [RootEffect], forbids: [].}
proc dumpHook(s: var string; v: seq[Node]) {....raises: [Exception],
    tags: [RootEffect], forbids: [].}
proc getHead(c: HtmlCompiler): string {....raises: [], tags: [], forbids: [].}
Returns the top of a split layout
proc getHtml(c: HtmlCompiler): string {....raises: [], tags: [], forbids: [].}
proc getTail(c: HtmlCompiler): string {....raises: [], tags: [], forbids: [].}
Retruns the tail of a layout
proc hasError(c: HtmlCompiler): bool {....raises: [], tags: [], forbids: [].}
proc newCompiler(ast: Ast; minify = true; indent = 2): HtmlCompiler {.
    ...raises: [ValueError, Exception, JsonError, KeyError, IOError],
    tags: [RootEffect, WriteIOEffect], forbids: [].}
proc newCompiler(engine: TimEngine; ast: Ast; tpl: TimTemplate; minify = true;
                 indent = 2; data: JsonNode = newJObject()): HtmlCompiler {.
    ...raises: [ValueError, Exception, JsonError, KeyError, IOError],
    tags: [RootEffect, WriteIOEffect], forbids: [].}
Create a new instance of HtmlCompiler