 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func ParseErrorsToString(errors []ParserError, source string) string
- func ParsePercentageRatio(source string) (*big.Int, uint16, error)
- type AccountInterpLiteral
- type AccountNamePart
- type AccountTextPart
- type AllotmentValue
- type AssetLiteral
- type BinaryInfix
- type CappedKeptOrDestination
- type Comment
- type Destination
- type DestinationAccount
- type DestinationAllotment
- type DestinationAllotmentItem
- type DestinationInorder
- type DestinationKept
- type DestinationOneof
- type DestinationTo
- type ErrorListener
- type FnCall
- type FnCallIdentifier
- type InfixOperator
- type KeptOrDestination
- type MonetaryLiteral
- type NumberLiteral
- type ParseResult
- type ParserError
- type PercentageLiteral
- type Position
- type Program
- type Range
- type Ranged
- 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 SourceOneof
- type SourceOverdraft
- type Statement
- type StringLiteral
- type TypeDecl
- type ValueExpr
- type ValueExprAllotment
- type VarDeclaration
- type VarDeclarations
- type Variable
- type Version
- type VersionInterpreter
- type VersionMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseErrorsToString ¶
func ParseErrorsToString(errors []ParserError, source string) string
Types ¶
type AccountInterpLiteral ¶ added in v0.0.12
type AccountInterpLiteral struct {
	Range
	Parts []AccountNamePart
}
    func (AccountInterpLiteral) IsWorld ¶ added in v0.0.12
func (a AccountInterpLiteral) IsWorld() bool
func (AccountInterpLiteral) String ¶ added in v0.0.12
func (expr AccountInterpLiteral) String() string
type AccountNamePart ¶ added in v0.0.12
type AccountNamePart interface {
	// contains filtered or unexported methods
}
    type AccountTextPart ¶ added in v0.0.12
type AccountTextPart struct{ Name string }
    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 CappedKeptOrDestination ¶ added in v0.0.11
type CappedKeptOrDestination struct {
	Range
	Cap ValueExpr
	To  KeptOrDestination
}
    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   []CappedKeptOrDestination
	Remaining KeptOrDestination
}
    type DestinationKept ¶
type DestinationKept struct {
	Range
}
    type DestinationOneof ¶ added in v0.0.11
type DestinationOneof struct {
	Range
	Clauses   []CappedKeptOrDestination
	Remaining KeptOrDestination
}
    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 = "-" InfixOperatorDiv 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 ¶
func (ParserError) Error ¶ added in v0.0.19
func (e ParserError) Error() string
type PercentageLiteral ¶ added in v0.0.11
func (PercentageLiteral) ToRatio ¶ added in v0.0.11
func (r PercentageLiteral) ToRatio() *big.Rat
type Program ¶
type Program struct {
	Vars       *VarDeclarations
	Statements []Statement
	Comments   []Comment
}
    func (Program) GetVersion ¶ added in v0.0.16
type Range ¶
func (Range) ShowOnSource ¶
Pre: valid range (e.g. start <= end)
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 SourceAllotment ¶
type SourceAllotment struct {
	Range
	Items []SourceAllotmentItem
}
    type SourceAllotmentItem ¶
type SourceAllotmentItem struct {
	Range
	Allotment AllotmentValue
	From      Source
}
    type SourceCapped ¶
type SourceInorder ¶
type SourceOneof ¶ added in v0.0.11
type SourceOverdraft ¶
type StringLiteral ¶
type ValueExpr ¶ added in v0.0.10
type ValueExpr interface {
	Ranged
	// contains filtered or unexported methods
}
    type ValueExprAllotment ¶ added in v0.0.11
type ValueExprAllotment struct {
	Value ValueExpr
}
    type VarDeclaration ¶
type VarDeclarations ¶ added in v0.0.12
type VarDeclarations struct {
	Range
	Declarations []VarDeclaration
}
    type Version ¶ added in v0.0.16
type Version interface {
	String() string
	// contains filtered or unexported methods
}
    type VersionInterpreter ¶ added in v0.0.16
func NewVersionInterpreter ¶ added in v0.0.16
func NewVersionInterpreter(major uint16, minor uint16, patch uint16) VersionInterpreter
func (VersionInterpreter) GtEq ¶ added in v0.0.16
func (v VersionInterpreter) GtEq(other VersionInterpreter) bool
func (VersionInterpreter) String ¶ added in v0.0.16
func (v VersionInterpreter) String() string
type VersionMachine ¶ added in v0.0.16
type VersionMachine struct{}
    func (VersionMachine) String ¶ added in v0.0.16
func (v VersionMachine) String() string
 Click to show internal directories. 
   Click to hide internal directories.