Slang
Slang codegen.
Walks an AST::Document and emits Crystal source that, at runtime,
writes the rendered HTML to a buffer named buffer_name. The buffer
must be an IO.
Constants
DEFAULT_BUFFER_NAME = "__slang__"
PROCESS_PATH = "/tmp/tmp.kpnGAI/src/src/slang/process"
Class methods
process_file(filename : String, buffer_name : String = DEFAULT_BUFFER_NAME) : String
Reads .slang source from filename, parses, and returns the
equivalent Crystal source as a string. Pure -- no side effects.
process_string(source : String, filename : String | Nil = nil, buffer_name : String = DEFAULT_BUFFER_NAME) : String
Same as process_file but takes the source as a string. The
filename argument is used only for source-location directives.
Macros
embed(filename, io_name)
Source