package
module
Version:
v1.0.0-...-095ec92
Opens a new window with list of versions in this module.
Published: Oct 30, 2014
License: LGPL-3.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
¶
Installation and usage
See gopkg.in/twik.v1 for documentation and usage details.
Documentation
¶
Package twik implements a tiny embeddable language for Go.
For details, see the blog post:
http://blog.labix.org/2013/07/16/twik-a-tiny-language-for-go
NewFileSet returns a new FileSet to hold positioning information
for a set of parsed twik sources.
Parse parses a byte slice containing twik code and returns
the resulting parsed tree.
Positioning information for the parsed code will be stored in
fset under the given name.
ParseString parses a string containing twik code and returns
the resulting parsed tree.
Positioning information for the parsed code will be stored in
fset under the given name.
Error holds an error and the source position where the error was found.
Scope is an environment where twik logic may be evaluated in.
NewScope returns a new scope for evaluating logic that was parsed into fset.
Branch returns a new scope that has s as a parent.
Create defines a new symbol with the given value in the s scope.
It is an error to redefine an existent symbol.
Eval evaluates node in the s scope and returns the resulting value.
Get returns the value of symbol in the shallowest scope it is defined in.
It is an error to get the value of an undefined symbol.
Set sets symbol to the given value in the shallowest scope it is defined in.
It is an error to set an undefined symbol.
Source Files
¶
Directories
¶
|
|
cmd
|
|
|
|
Click to show internal directories.
Click to hide internal directories.