Documentation
¶
Index ¶
- Constants
- func DumpExpr(expr Expr) string
- type Access
- type And
- type Assignment
- type Binary
- type Call
- type CellAddr
- type Clear
- type Clonable
- type ConfigEntry
- type Deferred
- type ExportRef
- type Expr
- func NewAccess(expr Expr, prop string) Expr
- func NewAnd(left, right Expr) Expr
- func NewAssignment(ident, expr Expr) Expr
- func NewBinary(left, right Expr, oper op.Op) Expr
- func NewCall(id Expr, args []Expr) Expr
- func NewCellAddr(pos layout.Position, col, row bool) Expr
- func NewDeferred(expr Expr) Expr
- func NewIdentifier(id string) Expr
- func NewInterval(from, to, step Expr) Expr
- func NewIntervalList(expr []Expr) Expr
- func NewLiteral(value string) Expr
- func NewNot(expr Expr) Expr
- func NewNumber(value float64) Expr
- func NewOr(left, right Expr) Expr
- func NewPostfix(expr Expr, oper op.Op) Expr
- func NewQualifiedAddr(path, addr Expr) Expr
- func NewRangeAddr(start, end Expr) Expr
- func NewScript(body []Expr) Expr
- func NewSlice(view, expr Expr) Expr
- func NewTemplate(list []Expr) Expr
- func NewUnary(expr Expr, oper op.Op) Expr
- func ParseFormula(str string) (Expr, error)
- type ExprKind
- type Grammar
- func (g *Grammar) Context() string
- func (g *Grammar) Infix(tok Token) (InfixFunc, error)
- func (g *Grammar) IsTerminator(tok Token) bool
- func (g *Grammar) Isolated() bool
- func (g *Grammar) Postfix(tok Token) (InfixFunc, error)
- func (g *Grammar) Pow(kind op.Op) int
- func (g *Grammar) Prefix(tok Token) (PrefixFunc, error)
- func (g *Grammar) RegisterBinding(kd op.Op, pow int)
- func (g *Grammar) RegisterInfix(kd op.Op, fn InfixFunc)
- func (g *Grammar) RegisterInfixKeyword(kw string, fn InfixFunc)
- func (g *Grammar) RegisterPostfix(kd op.Op, fn InfixFunc)
- func (g *Grammar) RegisterPrefix(kd op.Op, fn PrefixFunc)
- func (g *Grammar) RegisterPrefixKeyword(kw string, fn PrefixFunc)
- func (g *Grammar) UnregisterInfix(kd op.Op)
- func (g *Grammar) UnregisterInfixKeyword(kw string)
- func (g *Grammar) UnregisterPostfix(kd op.Op)
- func (g *Grammar) UnregisterPrefix(kd op.Op)
- func (g *Grammar) UnregisterPrefixKeyword(kw string)
- type GrammarScope
- type GrammarStack
- func (gs *GrammarStack) Context() string
- func (gs *GrammarStack) Infix(tok Token) (InfixFunc, error)
- func (gs *GrammarStack) IsTermintor(tok Token) bool
- func (gs *GrammarStack) Mode() ScanMode
- func (gs *GrammarStack) Pop()
- func (gs *GrammarStack) Postfix(tok Token) (InfixFunc, error)
- func (gs *GrammarStack) Pow(kind op.Op) int
- func (gs *GrammarStack) Prefix(tok Token) (PrefixFunc, error)
- func (gs *GrammarStack) Push(g *Grammar) error
- func (gs *GrammarStack) Top() *Grammar
- type Identifier
- type ImportFile
- func (i ImportFile) Accept(v Visitor) error
- func (i ImportFile) Alias() string
- func (i ImportFile) Default() bool
- func (i ImportFile) File() string
- func (i ImportFile) Format() string
- func (ImportFile) Kind() Kind
- func (i ImportFile) Options() map[string]any
- func (i ImportFile) ReadOnly() bool
- func (i ImportFile) Specifier() string
- func (i ImportFile) String() string
- type InfixFunc
- type IntervalExpr
- type IntervalList
- type Kind
- type Literal
- type LockRef
- type Mode
- type Not
- type Number
- type Or
- type Parser
- type Pop
- type Position
- type Postfix
- type PrefixFunc
- type PrintRef
- type Push
- type QualifiedCellAddr
- type RangeAddr
- type ScanMode
- type Scanner
- type ScannerState
- type Script
- type Selectable
- type Slice
- type Template
- type Token
- type Unary
- type UnlockRef
- type UseRef
- type VisitableExpr
- type Visitor
Constants ¶
View Source
const ( ModeScript = "script" ModePipeline = "pipeline" ModeCube = "cube" ModeCommand = "command" ModeFormula = "formula" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Assignment ¶
type Assignment struct {
Position
// contains filtered or unexported fields
}
func (Assignment) Accept ¶
func (a Assignment) Accept(v Visitor) error
func (Assignment) Expr ¶
func (a Assignment) Expr() Expr
func (Assignment) Ident ¶
func (a Assignment) Ident() Expr
func (Assignment) String ¶
func (a Assignment) String() string
type ConfigEntry ¶
type Expr ¶
func NewAssignment ¶
func NewDeferred ¶
func NewIdentifier ¶
func NewInterval ¶
func NewIntervalList ¶
func NewLiteral ¶
func NewQualifiedAddr ¶
func NewRangeAddr ¶
func NewTemplate ¶
func ParseFormula ¶
type Grammar ¶
type Grammar struct {
// contains filtered or unexported fields
}
func FormulaGrammar ¶
func FormulaGrammar() *Grammar
func LambdaGrammar ¶
func LambdaGrammar() *Grammar
func NewGrammar ¶
func ScriptGrammar ¶
func ScriptGrammar() *Grammar
func SliceGrammar ¶
func SliceGrammar() *Grammar
func (*Grammar) IsTerminator ¶
func (*Grammar) RegisterInfixKeyword ¶
func (*Grammar) RegisterPrefix ¶
func (g *Grammar) RegisterPrefix(kd op.Op, fn PrefixFunc)
func (*Grammar) RegisterPrefixKeyword ¶
func (g *Grammar) RegisterPrefixKeyword(kw string, fn PrefixFunc)
func (*Grammar) UnregisterInfix ¶
func (*Grammar) UnregisterInfixKeyword ¶
func (*Grammar) UnregisterPostfix ¶
func (*Grammar) UnregisterPrefix ¶
func (*Grammar) UnregisterPrefixKeyword ¶
type GrammarScope ¶
type GrammarScope int
const ( GrammarDefault GrammarScope = iota GrammarIsolated )
type GrammarStack ¶
type GrammarStack []*Grammar
func (*GrammarStack) Context ¶
func (gs *GrammarStack) Context() string
func (*GrammarStack) IsTermintor ¶
func (gs *GrammarStack) IsTermintor(tok Token) bool
func (*GrammarStack) Mode ¶
func (gs *GrammarStack) Mode() ScanMode
func (*GrammarStack) Pop ¶
func (gs *GrammarStack) Pop()
func (*GrammarStack) Prefix ¶
func (gs *GrammarStack) Prefix(tok Token) (PrefixFunc, error)
func (*GrammarStack) Push ¶
func (gs *GrammarStack) Push(g *Grammar) error
func (*GrammarStack) Top ¶
func (gs *GrammarStack) Top() *Grammar
type Identifier ¶
type Identifier struct {
Position
// contains filtered or unexported fields
}
func (Identifier) Accept ¶
func (i Identifier) Accept(v Visitor) error
func (Identifier) Ident ¶
func (i Identifier) Ident() string
func (Identifier) KindOf ¶
func (Identifier) KindOf() string
func (Identifier) String ¶
func (i Identifier) String() string
type ImportFile ¶
type ImportFile struct {
Position
// contains filtered or unexported fields
}
func (ImportFile) Accept ¶
func (i ImportFile) Accept(v Visitor) error
func (ImportFile) Alias ¶
func (i ImportFile) Alias() string
func (ImportFile) Default ¶
func (i ImportFile) Default() bool
func (ImportFile) File ¶
func (i ImportFile) File() string
func (ImportFile) Format ¶
func (i ImportFile) Format() string
func (ImportFile) Kind ¶
func (ImportFile) Kind() Kind
func (ImportFile) Options ¶
func (i ImportFile) Options() map[string]any
func (ImportFile) ReadOnly ¶
func (i ImportFile) ReadOnly() bool
func (ImportFile) Specifier ¶
func (i ImportFile) Specifier() string
func (ImportFile) String ¶
func (i ImportFile) String() string
type IntervalExpr ¶
type IntervalExpr struct {
Position
// contains filtered or unexported fields
}
func (IntervalExpr) String ¶
func (e IntervalExpr) String() string
type IntervalList ¶
type IntervalList struct {
Position
// contains filtered or unexported fields
}
func (IntervalList) Count ¶
func (i IntervalList) Count() int
func (IntervalList) String ¶
func (i IntervalList) String() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ExtractConfigEntries ¶
func (p *Parser) ExtractConfigEntries() ([]ConfigEntry, error)
type PrefixFunc ¶
type QualifiedCellAddr ¶
type QualifiedCellAddr struct {
Position
// contains filtered or unexported fields
}
func (QualifiedCellAddr) Accept ¶
func (q QualifiedCellAddr) Accept(v Visitor) error
func (QualifiedCellAddr) Addr ¶
func (a QualifiedCellAddr) Addr() Expr
func (QualifiedCellAddr) KindOf ¶
func (QualifiedCellAddr) KindOf() string
func (QualifiedCellAddr) Path ¶
func (a QualifiedCellAddr) Path() Expr
func (QualifiedCellAddr) String ¶
func (a QualifiedCellAddr) String() string
type Scanner ¶
type Scanner struct {
Position
// contains filtered or unexported fields
}
func (*Scanner) Restore ¶
func (s *Scanner) Restore(state ScannerState)
func (*Scanner) Save ¶
func (s *Scanner) Save() ScannerState
type ScannerState ¶
type ScannerState struct {
// contains filtered or unexported fields
}
type Selectable ¶
type UseRef ¶
type UseRef struct {
Position
// contains filtered or unexported fields
}
func (UseRef) Identifier ¶
type VisitableExpr ¶
type Visitor ¶
type Visitor interface {
VisitScript(Script) error
VisitImportFile(ImportFile) error
VisitExportRef(ExportRef) error
VisitPrintRef(PrintRef) error
VisitUseRef(UseRef) error
VisitClear(Clear) error
VisitIdentifier(Identifier) error
VisitLiteral(Literal) error
VisitNumber(Number) error
VisitQualifiedCellAddr(QualifiedCellAddr) error
VisitCellAddr(CellAddr) error
VisitRangeAddr(RangeAddr) error
VisitTemplate(Template) error
VisitAccess(Access) error
VisitDeferred(Deferred) error
VisitCall(Call) error
VisitSlice(Slice) error
VisitBinary(Binary) error
VisitAssignment(Assignment) error
VisitPostfix(Postfix) error
VisitNot(Not) error
VisitAnd(And) error
VisitOr(Or) error
VisitUnary(Unary) error
}
Click to show internal directories.
Click to hide internal directories.