Documentation ¶
Index ¶
- Constants
- func Lex(ch chan *Token, src []byte)
- func Lookup(name string) (ast.Stmt, bool)
- func Parse(src []byte) (ast.Stmts, error)
- func ParseFile(filename string, options ...ParseFileOption) (ast.Stmt, error)
- func Register(name string, stmt ast.Stmt) error
- func RegisterFile(filename string, options ...RegisterFileOption) error
- type ParseFileOption
- type RegisterFileOption
- type Token
Constants ¶
View Source
const ( EOF = iota Keyword Literal Numeric Ident Comma Equal Semicolon Colon Question DoubleQuote Asterisk Plus Minus Slash LessThan LessThanEqual GreaterThan GreaterThanEqual Equality // == OpenParen // ( CloseParen // ) OpenBracket // [ CloseBracket // ] OpenBrace // { CloseBrace // } Percent Sharp And BitwiseAnd Exclamation )
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse parses an OpenSCAD source code, and turns it into an internal representation that can be used to output the same source code afterwrads, programmatically.
Currently comments are out of scope of this implementation.
func RegisterFile ¶
func RegisterFile(filename string, options ...RegisterFileOption) error
Types ¶
type ParseFileOption ¶
type ParseFileOption interface { RegisterFileOption option.Interface // contains filtered or unexported methods }
func WithFS ¶
func WithFS(src fs.FS) ParseFileOption
type RegisterFileOption ¶
func WithLookupName ¶
func WithLookupName(name string) RegisterFileOption
Click to show internal directories.
Click to hide internal directories.