ast

package
v0.0.0-...-490b20b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbbrevForwardStep

type AbbrevForwardStep struct {
	Token token.Token
	NodeTest
}

AbbrevForwardStep ::= "@"? NodeTest

func (*AbbrevForwardStep) String

func (afs *AbbrevForwardStep) String() string

type AbbrevReverseStep

type AbbrevReverseStep struct {
	Token token.Token
}

AbbrevReverseStep ::= ".."

func (*AbbrevReverseStep) String

func (ars *AbbrevReverseStep) String() string

type AdditiveExpr

type AdditiveExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

AdditiveExpr ::= MultiplicativeExpr ( ("+" | "-") MultiplicativeExpr )*

func (*AdditiveExpr) String

func (ae *AdditiveExpr) String() string

type AndExpr

type AndExpr struct {
	LeftExpr  ExprSingle
	Token     token.Token // token.AND
	RightExpr ExprSingle
}

AndExpr ::= ComparisonExpr ( "and" ComparisonExpr )*

func (*AndExpr) String

func (ae *AndExpr) String() string

type AnyArrayTest

type AnyArrayTest struct{}

AnyArrayTest ::= "array" "(" "*" ")"

func (*AnyArrayTest) String

func (aat *AnyArrayTest) String() string

type AnyFunctionTest

type AnyFunctionTest struct{}

AnyFunctionTest ::= "function" "(" "*" ")"

func (*AnyFunctionTest) String

func (aft *AnyFunctionTest) String() string

type AnyKindTest

type AnyKindTest struct{}

AnyKindTest ::= "node" "(" ")"

func (*AnyKindTest) String

func (akt *AnyKindTest) String() string

type AnyMapTest

type AnyMapTest struct{}

AnyMapTest ::= "map" "(" "*" ")"

func (*AnyMapTest) String

func (amt *AnyMapTest) String() string

type Argument

type Argument struct {
	ExprSingle
	ArgumentPlaceholder
	TypeID byte
}

Argument ::= ExprSingle | ArgumentPlaceholder TypeID ::= 1 | 2

func (*Argument) String

func (a *Argument) String() string

type ArgumentList

type ArgumentList struct {
	Args []Argument
}

ArgumentList ::= "(" (Argument ("," Argument)*)? ")"

func (*ArgumentList) String

func (al *ArgumentList) String() string

type ArgumentPlaceholder

type ArgumentPlaceholder struct {
	Token token.Token // token.QUESTION
}

ArgumentPlaceholder ::= "?"

func (*ArgumentPlaceholder) String

func (ap *ArgumentPlaceholder) String() string

type ArrayConstructor

type ArrayConstructor struct {
	SquareArrayConstructor
	CurlyArrayConstructor
	TypeID byte
}

ArrayConstructor ::= SquareArrayConstructor | CurlyArrayConstructor TypeID ::= 1 | 2

func (*ArrayConstructor) String

func (ac *ArrayConstructor) String() string

type ArrayTest

type ArrayTest struct {
	NodeTest
	TypeID byte
}

ArrayTest ::= AnyArrayTest | TypedArrayTest TypeID ::= 1 | 2

func (*ArrayTest) String

func (at *ArrayTest) String() string

type ArrowBinding

type ArrowBinding struct {
	ArrowFunctionSpecifier
	ArgumentList
}

ArrowBinding ::= "=>" ArrowFunctionSpecifier ArgumentList **custom**

func (*ArrowBinding) String

func (ab *ArrowBinding) String() string

type ArrowExpr

type ArrowExpr struct {
	ExprSingle
	Bindings []ArrowBinding
}

ArrowExpr ::= UnaryExpr ( "=>" ArrowFunctionSpecifier ArgumentList )*

func (*ArrowExpr) String

func (ae *ArrowExpr) String() string

type ArrowFunctionSpecifier

type ArrowFunctionSpecifier struct {
	EQName
	VarRef
	ParenthesizedExpr
	TypeID byte
}

ArrowFunctionSpecifier ::= EQName | VarRef | ParenthesizedExpr TypeID ::= 1 | 2 | 3

func (*ArrowFunctionSpecifier) String

func (afs *ArrowFunctionSpecifier) String() string

type AtomicOrUnionType

type AtomicOrUnionType struct {
	EQName
}

AtomicOrUnionType ::= EQName

func (*AtomicOrUnionType) String

func (aout *AtomicOrUnionType) String() string

type AttribNameOrWildcard

type AttribNameOrWildcard struct {
	AttributeName
	WC string // "*"
}

AttribNameOrWildcard ::= AttributeName | "*"

func (*AttribNameOrWildcard) String

func (aow *AttribNameOrWildcard) String() string

type AttributeDeclaration

type AttributeDeclaration = AttributeName

AttributeDeclaration ::= AttributeName

type AttributeName

type AttributeName = EQName

AttributeName ::= EQName

type AttributeTest

type AttributeTest struct {
	AttribNameOrWildcard
	TypeName
}

AttributeTest ::= "attribute" "(" (AttribNameOrWildcard ("," TypeName)?)? ")"

func (*AttributeTest) String

func (at *AttributeTest) String() string

type AxisStep

type AxisStep struct {
	ReverseStep
	ForwardStep
	PredicateList
	TypeID byte
}

AxisStep ::= (ReverseStep | ForwardStep) PredicateList TypeID ::= 1 | 2

func (*AxisStep) String

func (as *AxisStep) String() string

type BracedURILiteral

type BracedURILiteral struct {
	// contains filtered or unexported fields
}

BracedURILiteral ::= "Q" "{" [^{}]* "}"

func (*BracedURILiteral) SetValue

func (b *BracedURILiteral) SetValue(name string)

SetValue is a setter for the value field

func (*BracedURILiteral) URI

func (b *BracedURILiteral) URI() string

URI returns uri in Q{uri}

func (*BracedURILiteral) Value

func (b *BracedURILiteral) Value() string

Value is a getter for the value field

type CastExpr

type CastExpr struct {
	ExprSingle
	SingleType
}

CastExpr ::= ArrowExpr ( "cast" "as" SingleType )?

func (*CastExpr) String

func (ce *CastExpr) String() string

type CastableExpr

type CastableExpr struct {
	ExprSingle
	SingleType
}

CastableExpr ::= CastExpr ( "castable" "as" SingleType )?

func (*CastableExpr) String

func (ce *CastableExpr) String() string

type CommentTest

type CommentTest struct{}

CommentTest ::= "comment" "(" ")"

func (*CommentTest) String

func (ct *CommentTest) String() string

type ComparisonExpr

type ComparisonExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

ComparisonExpr ::= StringConcatExpr ( (ValueComp | GeneralComp | NodeComp) StringConcatExpr )?

func (*ComparisonExpr) String

func (ce *ComparisonExpr) String() string

type ContextItemExpr

type ContextItemExpr struct {
	Token token.Token // token.DOT
}

ContextItemExpr ::= "."

func (*ContextItemExpr) String

func (cie *ContextItemExpr) String() string

type CurlyArrayConstructor

type CurlyArrayConstructor struct {
	EnclosedExpr
}

CurlyArrayConstructor ::= "array" EnclosedExpr

func (*CurlyArrayConstructor) String

func (cac *CurlyArrayConstructor) String() string

type DecimalLiteral

type DecimalLiteral struct {
	Value float64
}

DecimalLiteral ::= ("." Digits) | (Digits "." [0-9]*)

func (*DecimalLiteral) String

func (dl *DecimalLiteral) String() string

type DocumentTest

type DocumentTest struct {
	NodeTest
}

DocumentTest ::= "document-node" "(" (ElementTest | SchemaElementTest)? ")"

func (*DocumentTest) String

func (dt *DocumentTest) String() string

type DoubleLiteral

type DoubleLiteral struct {
	Value float64
}

DoubleLiteral ::= (("." Digits) | (Digits ("." [0-9]*)?)) [eE] [+-]? Digits

func (*DoubleLiteral) String

func (dl *DoubleLiteral) String() string

type EQName

type EQName struct {
	QName
	URIQualifiedName
	TypeID byte
}

EQName ::= QName | URIQualifiedName TypeID ::= 1 | 2

func (*EQName) SetValue

func (eqn *EQName) SetValue(name string)

SetValue is a setter for the value field

func (*EQName) Value

func (eqn *EQName) Value() string

Value is a getter for the value field

type ElementDeclaration

type ElementDeclaration = ElementName

ElementDeclaration ::= ElementName

type ElementName

type ElementName = EQName

ElementName ::= EQName

type ElementNameOrWildcard

type ElementNameOrWildcard struct {
	ElementName
	WC string // "*"
}

ElementNameOrWildcard ::= ElementName | "*"

func (*ElementNameOrWildcard) String

func (eow *ElementNameOrWildcard) String() string

type ElementTest

type ElementTest struct {
	ElementNameOrWildcard
	TypeName
	Token token.Token // token.QUESTION
}

ElementTest ::= "element" "(" (ElementNameOrWildcard ("," TypeName "?"?)?)? ")"

func (*ElementTest) String

func (et *ElementTest) String() string

type EnclosedExpr

type EnclosedExpr struct {
	Expr
}

EnclosedExpr ::= "{" Expr? "}"

func (*EnclosedExpr) String

func (ee *EnclosedExpr) String() string

type Expr

type Expr struct {
	Exprs []ExprSingle
}

Expr ::= ExprSingle ("," ExprSingle)*

func (*Expr) String

func (e *Expr) String() string

type ExprSingle

type ExprSingle interface {
	String() string
	// contains filtered or unexported methods
}

ExprSingle ::= ForExpr | LetExpr | QuantifiedExpr | IfExpr | OrExpr

type ForExpr

type ForExpr struct {
	SimpleForClause
	ExprSingle
}

ForExpr ::= SimpleForClause "return" ExprSingle

func (*ForExpr) String

func (fe *ForExpr) String() string

type ForwardAxis

type ForwardAxis struct {
	// contains filtered or unexported fields
}

ForwardAxis ::= ("child" "::") | ("descendant" "::") | ("attribute" "::") | ("self" "::") | ("descendant-or-self" "::") | ("following-sibling" "::") | ("following" "::") | ("namespace" "::")

func (*ForwardAxis) SetValue

func (fa *ForwardAxis) SetValue(str string)

SetValue is a setter for the value field

func (*ForwardAxis) Value

func (fa *ForwardAxis) Value() string

Value is a getter for the value field

type ForwardStep

type ForwardStep struct {
	ForwardAxis
	NodeTest
	AbbrevForwardStep
	TypeID byte
}

ForwardStep ::= (ForwardAxis NodeTest) | AbbrevForwardStep TypeID ::= 1 | 2

func (*ForwardStep) String

func (fs *ForwardStep) String() string

type FunctionBody

type FunctionBody = EnclosedExpr

FunctionBody ::= EnclosedExpr

type FunctionCall

type FunctionCall struct {
	EQName
	ArgumentList
}

FunctionCall ::= EQName ArgumentList

func (*FunctionCall) String

func (fc *FunctionCall) String() string

type FunctionItemExpr

type FunctionItemExpr struct {
	PrimaryExpr
	TypeID byte
}

FunctionItemExpr ::= NamedFunctionRef | InlineFunctionExpr TypeID ::= 1 | 2

func (*FunctionItemExpr) String

func (fie *FunctionItemExpr) String() string

type FunctionTest

type FunctionTest struct {
	NodeTest
	TypeID byte
}

FunctionTest ::= AnyFunctionTest | TypedFunctionTest TypeID ::= 1 | 2

func (*FunctionTest) String

func (ft *FunctionTest) String() string

type GeneralComp

type GeneralComp struct {
	// contains filtered or unexported fields
}

GeneralComp ::= "=" | "!=" | "<" | "<=" | ">" | ">="

func (*GeneralComp) SetValue

func (gc *GeneralComp) SetValue(t token.Token)

SetValue is a setter for the value field

func (*GeneralComp) Value

func (gc *GeneralComp) Value() token.Token

Value is a getter for the value field

type Identifier

type Identifier struct {
	EQName
}

Identifier ::= EQName **custom**

func (*Identifier) String

func (i *Identifier) String() string

type IfExpr

type IfExpr struct {
	TestExpr ExprSingle
	ThenExpr ExprSingle
	ElseExpr ExprSingle
}

IfExpr ::= "if" "(" Expr ")" "then" ExprSingle "else" ExprSingle

func (*IfExpr) String

func (ie *IfExpr) String() string

type InlineFunctionExpr

type InlineFunctionExpr struct {
	ParamList
	SequenceType
	FunctionBody
}

InlineFunctionExpr ::= "function" "(" ParamList? ")" ("as" SequenceType)? FunctionBody

func (*InlineFunctionExpr) String

func (ifr *InlineFunctionExpr) String() string

type InstanceofExpr

type InstanceofExpr struct {
	ExprSingle
	SequenceType
}

InstanceofExpr ::= TreatExpr ( "instance" "of" SequenceType )?

func (*InstanceofExpr) String

func (ie *InstanceofExpr) String() string

type IntegerLiteral

type IntegerLiteral struct {
	Value int
}

IntegerLiteral ::= Digits Digits ::= [0-9]+

func (*IntegerLiteral) String

func (il *IntegerLiteral) String() string

type IntersectExceptExpr

type IntersectExceptExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

IntersectExceptExpr ::= InstanceofExpr ( ("intersect" | "except") InstanceofExpr )*

func (*IntersectExceptExpr) String

func (iee *IntersectExceptExpr) String() string

type ItemTest

type ItemTest struct{}

ItemTest ::= ("item" "(" ")")

func (*ItemTest) String

func (it *ItemTest) String() string

type ItemType

type ItemType struct {
	NodeTest
	TypeID byte
}

ItemType ::= KindTest | ItemTest | FunctionTest | MapTest | ArrayTest | AtomicOrUnionType | ParenthesizedItemType TypeID ::= 1 | 2 | 3 | 4 | 5 | 6 | 7

func (*ItemType) String

func (it *ItemType) String() string

type KeySpecifier

type KeySpecifier struct {
	NCName
	IntegerLiteral
	ParenthesizedExpr
	TypeID byte
}

KeySpecifier ::= NCName | IntegerLiteral | ParenthesizedExpr | "*" TypeID ::= 1 | 2 | 3 | 4

func (*KeySpecifier) String

func (ks *KeySpecifier) String() string

type KindTest

type KindTest struct {
	NodeTest
	TypeID byte
}

KindTest ::= DocumentTest | ElementTest | AttributeTest | SchemaElementTest | SchemaAttributeTest | PITest | CommentTest | TextTest | NamespaceNodeTest | AnyKindTest TypeID ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

func (*KindTest) String

func (kt *KindTest) String() string

type LetExpr

type LetExpr struct {
	SimpleLetClause
	ExprSingle
}

LetExpr ::= SimpleLetClause "return" ExprSingle

func (*LetExpr) String

func (le *LetExpr) String() string

type Literal

type Literal struct {
	PrimaryExpr
	TypeID byte
}

Literal ::= NumericLiteral | StringLiteral TypeID ::= 1 | 2

func (*Literal) String

func (l *Literal) String() string

type Lookup

type Lookup struct {
	Token token.Token // token.QUESTION
	KeySpecifier
}

Lookup ::= "?" KeySpecifier

func (*Lookup) String

func (l *Lookup) String() string

type MapConstructor

type MapConstructor struct {
	Entries []MapConstructorEntry
}

MapConstructor ::= "map" "{" (MapConstructorEntry ("," MapConstructorEntry)*)? "}"

func (*MapConstructor) String

func (mc *MapConstructor) String() string

type MapConstructorEntry

type MapConstructorEntry struct {
	MapKeyExpr
	MapValueExpr
}

MapConstructorEntry ::= MapKeyExpr ":" MapValueExpr

func (*MapConstructorEntry) String

func (mce *MapConstructorEntry) String() string

type MapKeyExpr

type MapKeyExpr struct {
	ExprSingle
}

MapKeyExpr ::= ExprSingle

func (*MapKeyExpr) String

func (mke *MapKeyExpr) String() string

type MapTest

type MapTest struct {
	NodeTest
	TypeID byte
}

MapTest ::= AnyMapTest | TypedMapTest TypeID ::= 1 | 2

func (*MapTest) String

func (mt *MapTest) String() string

type MapValueExpr

type MapValueExpr struct {
	ExprSingle
}

MapValueExpr ::= ExprSingle

func (*MapValueExpr) String

func (mve *MapValueExpr) String() string

type MultiplicativeExpr

type MultiplicativeExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

MultiplicativeExpr ::= UnionExpr ( ("*" | "div" | "idiv" | "mod") UnionExpr )*

func (*MultiplicativeExpr) String

func (me *MultiplicativeExpr) String() string

type NCName

type NCName struct {
	// contains filtered or unexported fields
}

NCName ::= Name - (Char* ':' Char*)

func (*NCName) SetValue

func (ncn *NCName) SetValue(name string)

SetValue is a setter for the value field

func (*NCName) Value

func (ncn *NCName) Value() string

Value is a getter for the value field

type NameTest

type NameTest struct {
	EQName
	Wildcard
	TypeID byte
}

NameTest ::= EQName | Wildcard TypeID ::= 1 | 2

func (*NameTest) String

func (nt *NameTest) String() string

type NamedFunctionRef

type NamedFunctionRef struct {
	EQName
	IntegerLiteral
}

NamedFunctionRef ::= EQName "#" IntegerLiteral

func (*NamedFunctionRef) String

func (nfr *NamedFunctionRef) String() string

type NamespaceNodeTest

type NamespaceNodeTest struct{}

NamespaceNodeTest ::= "namespace-node" "(" ")"

func (*NamespaceNodeTest) String

func (nnt *NamespaceNodeTest) String() string

type NodeComp

type NodeComp struct {
	// contains filtered or unexported fields
}

NodeComp ::= "is" | "<<" | ">>"

func (*NodeComp) SetValue

func (nc *NodeComp) SetValue(t token.Token)

SetValue is a setter for the value field

func (*NodeComp) Value

func (nc *NodeComp) Value() token.Token

Value is a getter for the value field

type NodeTest

type NodeTest interface {
	String() string
	// contains filtered or unexported methods
}

NodeTest ::= KindTest | NameTest

type NumericLiteral

type NumericLiteral struct {
	PrimaryExpr
	TypeID byte
}

NumericLiteral ::= IntegerLiteral | DecimalLiteral | DoubleLiteral TypeID ::= 1 | 2 | 3

func (*NumericLiteral) String

func (nl *NumericLiteral) String() string

type OccurrenceIndicator

type OccurrenceIndicator struct {
	Token token.Token
}

OccurrenceIndicator ::= "?" | "*" | "+"

func (*OccurrenceIndicator) String

func (oi *OccurrenceIndicator) String() string

type OrExpr

type OrExpr struct {
	LeftExpr  ExprSingle
	Token     token.Token // token.OR
	RightExpr ExprSingle
}

OrExpr ::= AndExpr ( "or" AndExpr )*

func (*OrExpr) String

func (oe *OrExpr) String() string

type PAL

type PAL interface {
	String() string
	// contains filtered or unexported methods
}

PAL := Predicate | ArgumentList | Lookup **custom**

type PITest

type PITest struct {
	NCName
	StringLiteral
}

PITest ::= "processing-instruction" "(" (NCName | StringLiteral)? ")"

func (*PITest) String

func (pit *PITest) String() string

type Param

type Param struct {
	EQName
	TypeDeclaration
}

Param ::= "$" EQName TypeDeclaration?

func (*Param) String

func (p *Param) String() string

type ParamList

type ParamList struct {
	Params []Param
}

ParamList ::= Param ("," Param)*

func (*ParamList) String

func (pl *ParamList) String() string

type ParenthesizedExpr

type ParenthesizedExpr struct {
	Expr
}

ParenthesizedExpr ::= "(" Expr? ")"

func (*ParenthesizedExpr) String

func (pe *ParenthesizedExpr) String() string

type ParenthesizedItemType

type ParenthesizedItemType struct {
	NodeTest
}

ParenthesizedItemType ::= "(" ItemType ")"

func (*ParenthesizedItemType) String

func (pit *ParenthesizedItemType) String() string

type PathExpr

type PathExpr struct {
	ExprSingle
	Token token.Token
}

PathExpr ::= ("/" RelativePathExpr?) | ("//" RelativePathExpr) | RelativePathExpr

func (*PathExpr) String

func (pe *PathExpr) String() string

type PostfixExpr

type PostfixExpr struct {
	ExprSingle
	Pals []PAL
}

PostfixExpr ::= PrimaryExpr (Predicate | ArgumentList | Lookup)*

func (*PostfixExpr) String

func (pe *PostfixExpr) String() string

type Predicate

type Predicate struct {
	Expr
}

Predicate ::= "[" Expr "]"

func (*Predicate) String

func (p *Predicate) String() string

type PredicateList

type PredicateList struct {
	PL []Predicate
}

PredicateList ::= Predicate*

func (*PredicateList) String

func (pl *PredicateList) String() string

type PrimaryExpr

type PrimaryExpr interface {
	ExprSingle
	// contains filtered or unexported methods
}

PrimaryExpr ::= Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCall | FunctionItemExpr | MapConstructor | ArrayConstructor | UnaryLookup

type QName

type QName struct {
	// contains filtered or unexported fields
}

QName ::= [http://www.w3.org/TR/REC-xml-names/#NT-QName]

func (*QName) Local

func (qn *QName) Local() string

Prefix is a getter for the local field

func (*QName) Prefix

func (qn *QName) Prefix() string

Prefix is a getter for the prefix field

func (*QName) SetLocal

func (qn *QName) SetLocal(v string)

SetLocal is a setter for the local field

func (*QName) SetPrefix

func (qn *QName) SetPrefix(v string)

SetPrefix is a setter for the prefix field

func (*QName) SetValue

func (qn *QName) SetValue(v string)

SetValue is a setter for the QName

func (*QName) Value

func (qn *QName) Value() string

Value is a getter for the QName

type QuantifiedExpr

type QuantifiedExpr struct {
	Token      token.Token
	ExprSingle // satisfies ExprSingle
	SimpleQClause
}

QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)* "satisfies" ExprSingle

func (*QuantifiedExpr) String

func (qe *QuantifiedExpr) String() string

type RangeExpr

type RangeExpr struct {
	LeftExpr  ExprSingle
	Token     token.Token // token.TO
	RightExpr ExprSingle
}

RangeExpr ::= AdditiveExpr ( "to" AdditiveExpr )?

func (*RangeExpr) String

func (re *RangeExpr) String() string

type RelativePathExpr

type RelativePathExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

RelativePathExpr ::= StepExpr (("/" | "//") StepExpr)*

func (*RelativePathExpr) String

func (rpe *RelativePathExpr) String() string

type ReverseAxis

type ReverseAxis struct {
	// contains filtered or unexported fields
}

ReverseAxis ::= ("parent" "::") | ("ancestor" "::") | ("preceding-sibling" "::") | ("preceding" "::") | ("ancestor-or-self" "::")

func (*ReverseAxis) SetValue

func (ra *ReverseAxis) SetValue(str string)

SetValue is a setter for the value field

func (*ReverseAxis) Value

func (ra *ReverseAxis) Value() string

Value is a getter for the value field

type ReverseStep

type ReverseStep struct {
	ReverseAxis
	NodeTest
	AbbrevReverseStep
	TypeID byte
}

ReverseStep ::= (ReverseAxis NodeTest) | AbbrevReverseStep TypeID ::= 1 | 2

func (*ReverseStep) String

func (rs *ReverseStep) String() string

type SchemaAttributeTest

type SchemaAttributeTest struct {
	AttributeDeclaration
}

SchemaAttributeTest ::= "schema-attribute" "(" AttributeDeclaration ")"

func (*SchemaAttributeTest) String

func (sat *SchemaAttributeTest) String() string

type SchemaElementTest

type SchemaElementTest struct {
	ElementDeclaration
}

SchemaElementTest ::= "schema-element" "(" ElementDeclaration ")"

func (*SchemaElementTest) String

func (set *SchemaElementTest) String() string

type SequenceType

type SequenceType struct {
	NodeTest
	OccurrenceIndicator
	TypeID byte
}

SequenceType ::= ("empty-sequence" "(" ")") | (ItemType OccurrenceIndicator?) TypeID ::= 1 | 2

func (*SequenceType) String

func (st *SequenceType) String() string

type SimpleForBinding

type SimpleForBinding struct {
	VarName
	ExprSingle
}

SimpleForBinding ::= "$" VarName "in" ExprSingle

func (*SimpleForBinding) String

func (sfb *SimpleForBinding) String() string

type SimpleForClause

type SimpleForClause struct {
	Bindings []SimpleForBinding
}

SimpleForClause ::= "for" SimpleForBinding ("," SimpleForBinding)*

func (*SimpleForClause) String

func (sfc *SimpleForClause) String() string

type SimpleLetBinding

type SimpleLetBinding struct {
	VarName
	ExprSingle
}

SimpleLetBinding ::= "$" VarName ":=" ExprSingle

func (*SimpleLetBinding) String

func (slb *SimpleLetBinding) String() string

type SimpleLetClause

type SimpleLetClause struct {
	Bindings []SimpleLetBinding
}

SimpleLetClause ::= "let" SimpleLetBinding ("," SimpleLetBinding)*

func (*SimpleLetClause) String

func (slc *SimpleLetClause) String() string

type SimpleMapExpr

type SimpleMapExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

SimpleMapExpr ::= PathExpr ("!" PathExpr)*

func (*SimpleMapExpr) String

func (sme *SimpleMapExpr) String() string

type SimpleQBinding

type SimpleQBinding struct {
	VarName
	ExprSingle
}

SimpleQBinding ::= "$" VarName "in" ExprSingle

func (*SimpleQBinding) String

func (sqb *SimpleQBinding) String() string

type SimpleQClause

type SimpleQClause struct {
	Bindings []SimpleQBinding
}

SimpleQClause ::= "$" VarName "in" ExprSingle ("," "$" VarName "in" ExprSingle)*

func (*SimpleQClause) String

func (sqc *SimpleQClause) String() string

type SimpleTypeName

type SimpleTypeName = TypeName

SimpleTypeName ::= TypeName

type SingleType

type SingleType struct {
	SimpleTypeName
	Token token.Token
}

SingleType ::= SimpleTypeName "?"?

func (*SingleType) String

func (st *SingleType) String() string

type SquareArrayConstructor

type SquareArrayConstructor struct {
	Exprs []ExprSingle
}

SquareArrayConstructor ::= "[" (ExprSingle ("," ExprSingle)*)? "]"

func (*SquareArrayConstructor) String

func (sac *SquareArrayConstructor) String() string

type StepExpr

type StepExpr struct {
	ExprSingle
	TypeID byte
}

StepExpr ::= PostfixExpr | AxisStep TypeID ::= 1 | 2

func (*StepExpr) String

func (se *StepExpr) String() string

type StringConcatExpr

type StringConcatExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

StringConcatExpr ::= RangeExpr ( "||" RangeExpr )*

func (*StringConcatExpr) String

func (sce *StringConcatExpr) String() string

type StringLiteral

type StringLiteral struct {
	Value string
}

StringLiteral ::= ('"' (EscapeQuot | [^"])* '"') | ("'" (EscapeApos | [^'])* EscapeQuot ::= '""' EscapeApos ::= "”"

func (*StringLiteral) String

func (sl *StringLiteral) String() string

type TextTest

type TextTest struct{}

TextTest ::= "text" "(" ")"

func (*TextTest) String

func (tt *TextTest) String() string

type TreatExpr

type TreatExpr struct {
	ExprSingle
	SequenceType
}

TreatExpr ::= CastableExpr ( "treat" "as" SequenceType )?

func (*TreatExpr) String

func (te *TreatExpr) String() string

type TypeDeclaration

type TypeDeclaration struct {
	SequenceType
}

TypeDeclaration ::= "as" SequenceType

func (*TypeDeclaration) String

func (td *TypeDeclaration) String() string

type TypeName

type TypeName = EQName

TypeName ::= EQName

type TypedArrayTest

type TypedArrayTest struct {
	SequenceType
}

TypedArrayTest ::= "array" "(" SequenceType ")"

func (*TypedArrayTest) String

func (tat *TypedArrayTest) String() string

type TypedFunctionTest

type TypedFunctionTest struct {
	ParamSTypes []SequenceType
	AsSType     SequenceType
}

TypedFunctionTest ::= "function" "(" (SequenceType ("," SequenceType)*)? ")" "as" SequenceType

func (*TypedFunctionTest) String

func (tft *TypedFunctionTest) String() string

type TypedMapTest

type TypedMapTest struct {
	AtomicOrUnionType
	SequenceType
}

TypedMapTest ::= "map" "(" AtomicOrUnionType "," SequenceType ")"

func (*TypedMapTest) String

func (tmt *TypedMapTest) String() string

type URIQualifiedName

type URIQualifiedName struct {
	BracedURILiteral
	NCName
}

URIQualifiedName ::= BracedURILiteral NCName

func (*URIQualifiedName) SetValue

func (u *URIQualifiedName) SetValue(name string)

SetValue is a setter for the fields

func (*URIQualifiedName) Value

func (u *URIQualifiedName) Value() string

Value is a getter for the fields

type UnaryExpr

type UnaryExpr struct {
	ExprSingle
	Token token.Token
}

UnaryExpr ::= ("-" | "+")* ValueExpr

func (*UnaryExpr) String

func (ue *UnaryExpr) String() string

type UnaryLookup

type UnaryLookup struct {
	Token token.Token // token.UQUESTION
	KeySpecifier
}

UnaryLookup ::= "?" KeySpecifier Unary lookup is used in predicates (e.g. $map[?name='Mike'] or with the simple map operator (e.g. $maps ! ?name='Mike').

func (*UnaryLookup) String

func (ul *UnaryLookup) String() string

type UnionExpr

type UnionExpr struct {
	LeftExpr  ExprSingle
	RightExpr ExprSingle
	Token     token.Token
}

UnionExpr ::= IntersectExceptExpr ( ("union" | "|") IntersectExceptExpr )*

func (*UnionExpr) String

func (ue *UnionExpr) String() string

type ValueComp

type ValueComp struct {
	// contains filtered or unexported fields
}

ValueComp ::= "eq" | "ne" | "lt" | "le" | "gt" | "ge"

func (*ValueComp) SetValue

func (vc *ValueComp) SetValue(t token.Token)

SetValue is a setter for the value field

func (*ValueComp) Value

func (vc *ValueComp) Value() token.Token

Value is a getter for the value field

type ValueExpr

type ValueExpr = SimpleMapExpr

ValueExpr ::= SimpleMapExpr

type VarName

type VarName = EQName

VarName ::= EQName

type VarRef

type VarRef struct {
	VarName
}

VarRef ::= "$" VarName

func (*VarRef) String

func (vr *VarRef) String() string

type Wildcard

type Wildcard struct {
	NCName
	BracedURILiteral
	TypeID byte
}

Wildcard ::= "*" | (NCName ":*") | ("*:" NCName) | (BracedURILiteral "*") TypeID 1 | 2 | 3 | 4

func (*Wildcard) String

func (w *Wildcard) String() string

type XPath

type XPath struct {
	Expr
}

XPath ::= Expr

func (*XPath) String

func (x *XPath) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL