Documentation ¶
Overview ¶
Package corgi provides parsing for corgi files.
Index ¶
Constants ¶
View Source
const ( PrecompFileName = "lib.precorgi" Ext = ".corgi" LibExt = ".corgil" )
Variables ¶
View Source
var ErrNotExists = errors.New("file does not exist")
Functions ¶
func LoadLibrary ¶
func LoadLibrary(sysPath string, o LoadOptions) (*file.Library, error)
LoadLibrary parses and links the library located at the passed file system path.
func LoadMainData ¶
func LoadMainData(in []byte, o LoadOptions) (*file.File, error)
LoadMainData parses and links the passed main file's raw data.
Callers should set the Name of the returned file, so that error messages are correctly printed.
Types ¶
type LoadOptions ¶
type LoadOptions struct { // GoExecPath is the path to the go binary to used. // // If not set, $GOROOT/bin/go will be used. GoExecPath string // NoPrecompile forces the loader to always read corgi files instead of // loading a precompiled file. NoPrecompile bool // Logger is used to log the individual steps of the logging process. // // If left as nil, nothing will be logged Logger *slog.Logger }
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
corgidebug
Command corgidebug is a utility for debugging problems when the compiler doesn't do what it should.
|
Command corgidebug is a utility for debugging problems when the compiler doesn't do what it should. |
examples
|
|
Package file provides structs that represent the structure of a corgi file.
|
Package file provides structs that represent the structure of a corgi file. |
fileutil
Package fileutil provides utilities for interacting with a corgi AST and its contents.
|
Package fileutil provides utilities for interacting with a corgi AST and its contents. |
precomp
Package precomp allows encoding and decoding of precompiled libraries.
|
Package precomp allows encoding and decoding of precompiled libraries. |
internal
|
|
meta
Package meta contains metadata about the compiler.
|
Package meta contains metadata about the compiler. |
stack
Package stack implements a stack built using a linked list.
|
Package stack implements a stack built using a linked list. |
voidelem
Package voidelem provides utilities for working with HTML void elements.
|
Package voidelem provides utilities for working with HTML void elements. |
Package link links implements a linker for corgi files.
|
Package link links implements a linker for corgi files. |
test
|
|
internal/compile
Package compile provides an utility function to compile files in preparation tests.
|
Package compile provides an utility function to compile files in preparation tests. |
internal/extra
Package extra provides variables, constants, types, and function to be imported by corgi files.
|
Package extra provides variables, constants, types, and function to be imported by corgi files. |
internal/outcheck
Package outcheck provides a utility to check if the output of a template function matches a file.
|
Package outcheck provides a utility to check if the output of a template function matches a file. |
Package validate provides contextual validation for [file.File].
|
Package validate provides contextual validation for [file.File]. |
Package woof provides serialization of Go values to be used in HTML documents.
|
Package woof provides serialization of Go values to be used in HTML documents. |
Package writer provides a writer that allows converting a file.File to Go code.
|
Package writer provides a writer that allows converting a file.File to Go code. |
Click to show internal directories.
Click to hide internal directories.