Documentation ¶
Overview ¶
Package main is the entry point for the Tamarin CLI. A path to a Tamarin script should be provided as an argument to the program.
Example:
$ cd path/to/tamarin $ go build $ ./tamarin ./examples/math.tm
Tamarin may also be imported into another Go program to be used as a library. View the exec package for documentation on using Tamarin as a library.
Directories ¶
Path | Synopsis |
---|---|
Package ast contains the definitions of the abstract syntax tree that our parser produces and that our interpreter executes.
|
Package ast contains the definitions of the abstract syntax tree that our parser produces and that our interpreter executes. |
cmd
|
|
example-ast-reuse
This program demonstrates using Tamarin as a library to run a simple script.
|
This program demonstrates using Tamarin as a library to run a simple script. |
example-proxy
This program demonstrates using Tamarin as a library to run a simple script.
|
This program demonstrates using Tamarin as a library to run a simple script. |
simple-example
This program demonstrates using Tamarin as a library to run a simple script.
|
This program demonstrates using Tamarin as a library to run a simple script. |
tamarin-lsp
This package implements a Tamarin language server.
|
This package implements a Tamarin language server. |
Package evaluator contains the core of our interpreter, which walks the AST produced by the parser and evaluates user code.
|
Package evaluator contains the core of our interpreter, which walks the AST produced by the parser and evaluates user code. |
Package exec provides an Execute function that is used to run arbitrary Tamarin source code and return the result.
|
Package exec provides an Execute function that is used to run arbitrary Tamarin source code and return the result. |
internal
|
|
Package lexer contains the code to lex input-programs into a stream of tokens, such that they may be parsed.
|
Package lexer contains the code to lex input-programs into a stream of tokens, such that they may be parsed. |
Package object defines all available object types in Tamarin.
|
Package object defines all available object types in Tamarin. |
Package parser is used to parse an input program from its tokens and produce an abstract syntax tree (AST) as output.
|
Package parser is used to parse an input program from its tokens and produce an abstract syntax tree (AST) as output. |
tests
|
|
Package token contains constants which are used when lexing a program written in the monkey language, as done by the parser.
|
Package token contains constants which are used when lexing a program written in the monkey language, as done by the parser. |
Click to show internal directories.
Click to hide internal directories.