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 Destination
- type DestinationAccount
- type DestinationAllotment
- type DestinationAllotmentItem
- type DestinationInorder
- type DestinationInorderClause
- type DestinationKept
- type DestinationTo
- type ErrorListener
- type FnCall
- type FnCallIdentifier
- type KeptOrDestination
- type Literal
- 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 VarDeclaration
- type VariableLiteral
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 Destination ¶
type Destination interface {
Ranged
// contains filtered or unexported methods
}
Destination exprs
type DestinationAccount ¶
type DestinationAccount struct {
Literal
}
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 Literal
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 []Literal
}
type FnCallIdentifier ¶
type KeptOrDestination ¶
type KeptOrDestination interface {
// contains filtered or unexported methods
}
type Literal ¶
type Literal interface {
Ranged
// contains filtered or unexported methods
}
does it even make sense to have a literal supertype?
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 {
Literal
}
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 VarDeclaration ¶
type VarDeclaration struct {
Range
Name *VariableLiteral
Type *TypeDecl
Origin *FnCall
}
type VariableLiteral ¶
Click to show internal directories.
Click to hide internal directories.