{"modulePath":"github.com/PagoPlus/numscriptex","version":"v0.0.0-20241202135701-b8e89d0f3967","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parser\n\n## Functions\n\n```go\nfunc ParseErrorsToString(errors []ParserError, source string) string\n```\n\n```go\nfunc ParsePercentageRatio(source string) (*big.Int, *big.Int, error)\n```\nTODO actually handle big int\n\n## Types\n\n```go\ntype AccountLiteral struct {\n\tRange\n\tName string\n}\n```\n\n```go\nfunc (a *AccountLiteral) IsWorld() bool\n```\n\n```go\ntype AllotmentValue interface {\n\t// contains filtered or unexported methods\n}\n```\n\n```go\ntype AssetLiteral struct {\n\tRange\n\tAsset string\n}\n```\n\n```go\ntype BinaryInfix struct {\n\tRange\n\tOperator InfixOperator\n\tLeft     ValueExpr\n\tRight    ValueExpr\n}\n```\n\n```go\ntype Destination interface {\n\tRanged\n\t// contains filtered or unexported methods\n}\n```\nDestination exprs\n\n```go\ntype DestinationAccount struct {\n\tValueExpr\n}\n```\n\n```go\ntype DestinationAllotment struct {\n\tRange\n\tItems []DestinationAllotmentItem\n}\n```\n\n```go\ntype DestinationAllotmentItem struct {\n\tRange\n\tAllotment AllotmentValue\n\tTo        KeptOrDestination\n}\n```\n\n```go\ntype DestinationInorder struct {\n\tRange\n\tClauses   []DestinationInorderClause\n\tRemaining KeptOrDestination\n}\n```\n\n```go\ntype DestinationInorderClause struct {\n\tRange\n\tCap ValueExpr\n\tTo  KeptOrDestination\n}\n```\n\n```go\ntype DestinationKept struct {\n\tRange\n}\n```\n\n```go\ntype DestinationTo struct {\n\tDestination Destination\n}\n```\n\n```go\ntype ErrorListener struct {\n\tantlr.DefaultErrorListener\n\tErrors []ParserError\n}\n```\n\n```go\nfunc (l *ErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, startL, startC int, msg string, e antlr.RecognitionException)\n```\n\n```go\ntype FnCall struct {\n\tRange\n\tCaller *FnCallIdentifier\n\tArgs   []ValueExpr\n}\n```\n\n```go\ntype FnCallIdentifier struct {\n\tRange\n\tName string\n}\n```\n\n```go\ntype InfixOperator string\n```\n\n```go\nconst (\n\tInfixOperatorPlus  InfixOperator = \"+\"\n\tInfixOperatorMinus InfixOperator = \"-\"\n)\n```\n\n```go\ntype KeptOrDestination interface {\n\t// contains filtered or unexported methods\n}\n```\n\n```go\ntype MonetaryLiteral struct {\n\tRange\n\tAsset  ValueExpr\n\tAmount ValueExpr\n}\n```\n\n```go\ntype NumberLiteral struct {\n\tRange\n\tNumber int\n}\n```\n\n```go\ntype ParseResult struct {\n\tSource string\n\tValue  Program\n\tErrors []ParserError\n}\n```\n\n```go\nfunc Parse(input string) ParseResult\n```\n\n```go\ntype ParserError struct {\n\tRange Range\n\tMsg   string\n}\n```\n\n```go\ntype Position struct {\n\tCharacter int\n\tLine      int\n}\n```\n\n```go\nfunc PositionOf(src string, substr string) *Position\n```\n\n```go\nfunc PositionOfIndexed(src string, substr string, occurrence int) *Position\n```\n\n```go\nfunc (p *Position) AsRange() Range\n```\n\n```go\nfunc (p1 *Position) GtEq(p2 Position) bool\n```\n\n```go\ntype Program struct {\n\tVars       []VarDeclaration\n\tStatements []Statement\n}\n```\n\n```go\ntype Range struct {\n\tStart Position\n\tEnd   Position\n}\n```\n\n```go\nfunc RangeOfIndexed(src string, substr string, occurrence int) Range\n```\n\n```go\nfunc (r Range) Contains(position Position) bool\n```\n\n```go\nfunc (r Range) GetRange() Range\n```\n\n```go\nfunc (r Range) ShowOnSource(source string) string\n```\nPre: valid range (e.g. start \\\u003c= end)\n\n```go\ntype Ranged interface {\n\tGetRange() Range\n}\n```\n\n```go\ntype RatioLiteral struct {\n\tRange\n\tNumerator   *big.Int\n\tDenominator *big.Int\n}\n```\n\n```go\nfunc (r RatioLiteral) ToRatio() *big.Rat\n```\n\n```go\ntype RemainingAllotment struct {\n\tRange\n}\n```\n\n```go\ntype SaveStatement struct {\n\tRange\n\tSentValue SentValue\n\tAmount    ValueExpr\n}\n```\n\n```go\ntype SendStatement struct {\n\tRange\n\tSentValue   SentValue\n\tSource      Source\n\tDestination Destination\n}\n```\n\n```go\ntype SentValue interface {\n\tRanged\n\t// contains filtered or unexported methods\n}\n```\n\n```go\ntype SentValueAll struct {\n\tRange\n\tAsset ValueExpr\n}\n```\n\n```go\ntype SentValueLiteral struct {\n\tRange\n\tMonetary ValueExpr\n}\n```\n\n```go\ntype Source interface {\n\tGetRange() Range\n\t// contains filtered or unexported methods\n}\n```\n\n```go\ntype SourceAccount struct {\n\tValueExpr\n}\n```\n\n```go\ntype SourceAllotment struct {\n\tRange\n\tItems []SourceAllotmentItem\n}\n```\n\n```go\ntype SourceAllotmentItem struct {\n\tRange\n\tAllotment AllotmentValue\n\tFrom      Source\n}\n```\n\n```go\ntype SourceCapped struct {\n\tRange\n\tFrom Source\n\tCap  ValueExpr\n}\n```\n\n```go\ntype SourceInorder struct {\n\tRange\n\tSources []Source\n}\n```\n\n```go\ntype SourceOverdraft struct {\n\tRange\n\tAddress ValueExpr\n\tBounded *ValueExpr\n}\n```\n\n```go\ntype Statement interface {\n\tRanged\n\t// contains filtered or unexported methods\n}\n```\n\n```go\ntype StringLiteral struct {\n\tRange\n\tString string\n}\n```\n\n```go\ntype TypeDecl struct {\n\tRange\n\tName string\n}\n```\n\n```go\ntype ValueExpr interface {\n\tRanged\n\t// contains filtered or unexported methods\n}\n```\n\n```go\ntype VarDeclaration struct {\n\tRange\n\tName   *Variable\n\tType   *TypeDecl\n\tOrigin *FnCall\n}\n```\n\n```go\ntype Variable struct {\n\tRange\n\tName string\n}\n```\n\n","path":"github.com/PagoPlus/numscriptex/internal/parser","name":"parser","synopsis":"","isRedistributable":true}
