Documentation ¶
Index ¶
- func ParseErrorsToString(errors []ParserError, source string) string
- func ParsePercentageRatio(source string) (*big.Int, *big.Int, error)
- type AccountLiteral
- type AllotmentValue
- type AssetLiteral
- type BinaryInfix
- type Destination
- type DestinationAccount
- type DestinationAllotment
- type DestinationAllotmentItem
- type DestinationInorder
- type DestinationInorderClause
- type DestinationKept
- type DestinationTo
- type ErrorListener
- type FnCall
- type FnCallIdentifier
- type InfixOperator
- type KeptOrDestination
- type MonetaryLiteral
- type NumberLiteral
- type ParseResult
- type ParserError
- type Position
- type Program
- type Range
- type Ranged
- type RatioLiteral
- type RemainingAllotment
- type SaveStatement
- type SendStatement
- type SentValue
- type SentValueAll
- type SentValueLiteral
- type Source
- type SourceAccount
- type SourceAllotment
- type SourceAllotmentItem
- type SourceCapped
- type SourceInorder
- type SourceOverdraft
- type Statement
- type StringLiteral
- type TypeDecl
- type ValueExpr
- type VarDeclaration
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseErrorsToString ¶
func ParseErrorsToString(errors []ParserError, source string) string
Types ¶
type AccountLiteral ¶
func (*AccountLiteral) IsWorld ¶
func (a *AccountLiteral) IsWorld() bool
type AllotmentValue ¶
type AllotmentValue interface {
// contains filtered or unexported methods
}
type AssetLiteral ¶
type BinaryInfix ¶ added in v0.0.10
type BinaryInfix struct { Range Operator InfixOperator Left ValueExpr Right ValueExpr }
type Destination ¶
type Destination interface { Ranged // contains filtered or unexported methods }
Destination exprs
type DestinationAccount ¶
type DestinationAccount struct {
ValueExpr
}
type DestinationAllotment ¶
type DestinationAllotment struct { Range Items []DestinationAllotmentItem }
type DestinationAllotmentItem ¶
type DestinationAllotmentItem struct { Range Allotment AllotmentValue To KeptOrDestination }
type DestinationInorder ¶
type DestinationInorder struct { Range Clauses []DestinationInorderClause Remaining KeptOrDestination }
type DestinationInorderClause ¶
type DestinationInorderClause struct { Range Cap ValueExpr To KeptOrDestination }
type DestinationKept ¶
type DestinationKept struct {
Range
}
type DestinationTo ¶
type DestinationTo struct {
Destination Destination
}
type ErrorListener ¶
type ErrorListener struct { antlr.DefaultErrorListener Errors []ParserError }
func (*ErrorListener) SyntaxError ¶
func (l *ErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, startL, startC int, msg string, e antlr.RecognitionException)
type FnCall ¶
type FnCall struct { Range Caller *FnCallIdentifier Args []ValueExpr }
type FnCallIdentifier ¶
type InfixOperator ¶ added in v0.0.10
type InfixOperator string
const ( InfixOperatorPlus InfixOperator = "+" InfixOperatorMinus InfixOperator = "-" )
type KeptOrDestination ¶
type KeptOrDestination interface {
// contains filtered or unexported methods
}
type MonetaryLiteral ¶
type NumberLiteral ¶
type ParseResult ¶
type ParseResult struct { Source string Value Program Errors []ParserError }
func Parse ¶
func Parse(input string) ParseResult
type ParserError ¶
type Program ¶
type Program struct { Vars []VarDeclaration Statements []Statement }
type Range ¶
func (Range) ShowOnSource ¶
Pre: valid range (e.g. start <= end)
type RatioLiteral ¶
func (RatioLiteral) ToRatio ¶
func (r RatioLiteral) ToRatio() *big.Rat
type RemainingAllotment ¶
type RemainingAllotment struct {
Range
}
type SaveStatement ¶
type SendStatement ¶
type SendStatement struct { Range SentValue SentValue Source Source Destination Destination }
type SentValueAll ¶
type SentValueLiteral ¶
type SourceAccount ¶
type SourceAccount struct {
ValueExpr
}
type SourceAllotment ¶
type SourceAllotment struct { Range Items []SourceAllotmentItem }
type SourceAllotmentItem ¶
type SourceAllotmentItem struct { Range Allotment AllotmentValue From Source }
type SourceCapped ¶
type SourceInorder ¶
type SourceOverdraft ¶
type StringLiteral ¶
type ValueExpr ¶ added in v0.0.10
type ValueExpr interface { Ranged // contains filtered or unexported methods }
type VarDeclaration ¶
Click to show internal directories.
Click to hide internal directories.