Documentation
¶
Index ¶
- Constants
- Variables
- func CountGroupTypeMembers(t AstNodeI) (r int)
- func CountGroupTypeMembersMulti(ts []AstNodeI) (r int)
- func CountMembers(t AstNodeI) (r int)
- func CountMembersMulti(ts []AstNodeI) (r int)
- func CountNonScalars(t AstNodeI) (r int)
- func CountNonScalarsMulti(ts []AstNodeI) (r int)
- func IterateGroupIndexedByOccurrence(t AstNodeI, uniqTypeIndex int) iter.Seq2[int, PrimitiveAstNodeI]
- func IteratePrimitiveTypesMulti(ts []AstNodeI) iter.Seq2[int, PrimitiveAstNodeI]
- type AstNodeI
- type BaseTypeMachineNumericE
- type BaseTypeStringE
- type BaseTypeTemporalE
- type ByteOrderModifierE
- type GroupAstNode
- func (inst GroupAstNode) IsMachineNumericNode() bool
- func (inst GroupAstNode) IsPrimitive() bool
- func (inst GroupAstNode) IsSignature() bool
- func (inst GroupAstNode) IsStringNode() bool
- func (inst GroupAstNode) IsTemporalNode() bool
- func (inst GroupAstNode) IsValid() bool
- func (inst GroupAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
- func (inst GroupAstNode) MarshalCBOR() (data []byte, err error)
- func (inst GroupAstNode) String() string
- type MachineNumericTypeAstNode
- func (inst MachineNumericTypeAstNode) GenerateGoCode(w io.Writer) (err error)
- func (inst MachineNumericTypeAstNode) IsMachineNumericNode() bool
- func (inst MachineNumericTypeAstNode) IsPrimitive() bool
- func (inst MachineNumericTypeAstNode) IsScalar() bool
- func (inst MachineNumericTypeAstNode) IsSignature() bool
- func (inst MachineNumericTypeAstNode) IsStringNode() bool
- func (inst MachineNumericTypeAstNode) IsTemporalNode() bool
- func (inst MachineNumericTypeAstNode) IsValid() bool
- func (inst MachineNumericTypeAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
- func (inst MachineNumericTypeAstNode) MarshalCBOR() (data []byte, err error)
- func (inst MachineNumericTypeAstNode) String() string
- type Parser
- func (inst *Parser) MustParsePrimitiveTypeAst(typeS string) (ast PrimitiveAstNodeI)
- func (inst *Parser) MustParseTypeOrGroupAst(typeOrGroup string) (ast AstNodeI)
- func (inst *Parser) ParsePrimitiveTypeAst(typeS string) (ast PrimitiveAstNodeI, err error)
- func (inst *Parser) ParsePrimitiveTypeOrGroupAst(typeOrGroup string) (ast AstNodeI, err error)
- func (inst *Parser) ParseSignature(signature string) (parser antlr.Recognizer, tree grammar2.ICanonicalTypeSignatureContext, ...)
- func (inst *Parser) ParseTypeOrGroup(typeOrGroup string) (parser antlr.Recognizer, tree grammar2.ISingleCanonicalTypeOrGroupContext, ...)
- type PrimitiveAstNodeI
- type ScalarModifierE
- type SignatureAstNode
- func (inst SignatureAstNode) IsPrimitive() bool
- func (inst SignatureAstNode) IsSignature() bool
- func (inst SignatureAstNode) IsValid() bool
- func (inst SignatureAstNode) IterateGroupMembers() iter.Seq[AstNodeI]
- func (inst SignatureAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
- func (inst SignatureAstNode) MarshalCBOR() (data []byte, err error)
- func (inst SignatureAstNode) String() string
- type StringAstNode
- func (inst StringAstNode) GenerateGoCode(w io.Writer) (err error)
- func (inst StringAstNode) IsMachineNumericNode() bool
- func (inst StringAstNode) IsPrimitive() bool
- func (inst StringAstNode) IsScalar() bool
- func (inst StringAstNode) IsSignature() bool
- func (inst StringAstNode) IsStringNode() bool
- func (inst StringAstNode) IsTemporalNode() bool
- func (inst StringAstNode) IsValid() bool
- func (inst StringAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
- func (inst StringAstNode) MarshalCBOR() (data []byte, err error)
- func (inst StringAstNode) String() string
- type TemporalTypeAstNode
- func (inst TemporalTypeAstNode) GenerateGoCode(w io.Writer) (err error)
- func (inst TemporalTypeAstNode) IsMachineNumericNode() bool
- func (inst TemporalTypeAstNode) IsPrimitive() bool
- func (inst TemporalTypeAstNode) IsScalar() bool
- func (inst TemporalTypeAstNode) IsSignature() bool
- func (inst TemporalTypeAstNode) IsStringNode() bool
- func (inst TemporalTypeAstNode) IsTemporalNode() bool
- func (inst TemporalTypeAstNode) IsValid() bool
- func (inst TemporalTypeAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
- func (inst TemporalTypeAstNode) MarshalCBOR() (data []byte, err error)
- func (inst TemporalTypeAstNode) String() string
- type Width
- type WidthModifierE
Constants ¶
View Source
const GroupSeparator = "-"
View Source
const SignatureSeparator = "_"
Variables ¶
View Source
var ErrInternalParserError = eh.Errorf("internal parser error")
Functions ¶
func CountGroupTypeMembers ¶
func CountMembers ¶
func CountMembersMulti ¶
func CountNonScalars ¶
func CountNonScalarsMulti ¶
func IteratePrimitiveTypesMulti ¶
func IteratePrimitiveTypesMulti(ts []AstNodeI) iter.Seq2[int, PrimitiveAstNodeI]
Types ¶
type AstNodeI ¶
type AstNodeI interface {
cbor.Marshaler
IsSignature() bool
IsPrimitive() bool
IsValid() bool
IterateMembers() iter.Seq[PrimitiveAstNodeI]
fmt.Stringer
}
func CastSliceOfPrimitiveAstNodes ¶
func CastSliceOfPrimitiveAstNodes(s []PrimitiveAstNodeI) (o []AstNodeI)
func DemoteToScalars ¶
func PromoteScalars ¶
func PromoteScalars(in AstNodeI, scalarModifier ScalarModifierE) (out AstNodeI, modified int, unmodified int)
type BaseTypeMachineNumericE ¶
type BaseTypeMachineNumericE rune
const ( BaseTypeMachineNumericNone BaseTypeMachineNumericE = 0 BaseTypeMachineNumericUnsigned BaseTypeMachineNumericE = 'u' BaseTypeMachineNumericSigned BaseTypeMachineNumericE = 'i' BaseTypeMachineNumericFloat BaseTypeMachineNumericE = 'f' )
func (BaseTypeMachineNumericE) String ¶
func (inst BaseTypeMachineNumericE) String() string
type BaseTypeStringE ¶
type BaseTypeStringE rune
const ( BaseTypeStringNone BaseTypeStringE = 0 BaseTypeStringUtf8 BaseTypeStringE = 's' BaseTypeStringBytes BaseTypeStringE = 'y' BaseTypeStringBool BaseTypeStringE = 'b' )
func (BaseTypeStringE) String ¶
func (inst BaseTypeStringE) String() string
type BaseTypeTemporalE ¶
type BaseTypeTemporalE rune
const ( BaseTypeTemporalNone BaseTypeTemporalE = 0 BaseTypeTemporalUtcDatetime BaseTypeTemporalE = 'z' BaseTypeTemporalZonedDatetime BaseTypeTemporalE = 'd' BaseTypeTemporalZonedTime BaseTypeTemporalE = 't' )
func (BaseTypeTemporalE) String ¶
func (inst BaseTypeTemporalE) String() string
type ByteOrderModifierE ¶
type ByteOrderModifierE rune
const ( ByteOrderModifierNone ByteOrderModifierE = 0 ByteOrderModifierLittleEndian ByteOrderModifierE = 'l' ByteOrderModifierBigEndian ByteOrderModifierE = 'n' )
func (ByteOrderModifierE) String ¶
func (inst ByteOrderModifierE) String() string
type GroupAstNode ¶
type GroupAstNode struct {
// contains filtered or unexported fields
}
func MergeGroup ¶
func MergeGroup(l AstNodeI, r AstNodeI) (g GroupAstNode)
func NewGroupAstNode ¶
func NewGroupAstNode(members []PrimitiveAstNodeI) GroupAstNode
func (GroupAstNode) IsMachineNumericNode ¶
func (inst GroupAstNode) IsMachineNumericNode() bool
func (GroupAstNode) IsPrimitive ¶
func (inst GroupAstNode) IsPrimitive() bool
func (GroupAstNode) IsSignature ¶
func (inst GroupAstNode) IsSignature() bool
func (GroupAstNode) IsStringNode ¶
func (inst GroupAstNode) IsStringNode() bool
func (GroupAstNode) IsTemporalNode ¶
func (inst GroupAstNode) IsTemporalNode() bool
func (GroupAstNode) IsValid ¶
func (inst GroupAstNode) IsValid() bool
func (GroupAstNode) IterateMembers ¶
func (inst GroupAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
func (GroupAstNode) MarshalCBOR ¶
func (inst GroupAstNode) MarshalCBOR() (data []byte, err error)
func (GroupAstNode) String ¶
func (inst GroupAstNode) String() string
type MachineNumericTypeAstNode ¶
type MachineNumericTypeAstNode struct {
BaseType BaseTypeMachineNumericE
Width Width
ByteOrderModifier ByteOrderModifierE
ScalarModifier ScalarModifierE
}
func (MachineNumericTypeAstNode) GenerateGoCode ¶
func (inst MachineNumericTypeAstNode) GenerateGoCode(w io.Writer) (err error)
func (MachineNumericTypeAstNode) IsMachineNumericNode ¶
func (inst MachineNumericTypeAstNode) IsMachineNumericNode() bool
func (MachineNumericTypeAstNode) IsPrimitive ¶
func (inst MachineNumericTypeAstNode) IsPrimitive() bool
func (MachineNumericTypeAstNode) IsScalar ¶
func (inst MachineNumericTypeAstNode) IsScalar() bool
func (MachineNumericTypeAstNode) IsSignature ¶
func (inst MachineNumericTypeAstNode) IsSignature() bool
func (MachineNumericTypeAstNode) IsStringNode ¶
func (inst MachineNumericTypeAstNode) IsStringNode() bool
func (MachineNumericTypeAstNode) IsTemporalNode ¶
func (inst MachineNumericTypeAstNode) IsTemporalNode() bool
func (MachineNumericTypeAstNode) IsValid ¶
func (inst MachineNumericTypeAstNode) IsValid() bool
func (MachineNumericTypeAstNode) IterateMembers ¶
func (inst MachineNumericTypeAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
func (MachineNumericTypeAstNode) MarshalCBOR ¶
func (inst MachineNumericTypeAstNode) MarshalCBOR() (data []byte, err error)
func (MachineNumericTypeAstNode) String ¶
func (inst MachineNumericTypeAstNode) String() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) MustParsePrimitiveTypeAst ¶
func (inst *Parser) MustParsePrimitiveTypeAst(typeS string) (ast PrimitiveAstNodeI)
func (*Parser) MustParseTypeOrGroupAst ¶
func (*Parser) ParsePrimitiveTypeAst ¶
func (inst *Parser) ParsePrimitiveTypeAst(typeS string) (ast PrimitiveAstNodeI, err error)
func (*Parser) ParsePrimitiveTypeOrGroupAst ¶
func (*Parser) ParseSignature ¶
func (inst *Parser) ParseSignature(signature string) (parser antlr.Recognizer, tree grammar2.ICanonicalTypeSignatureContext, err error)
func (*Parser) ParseTypeOrGroup ¶
func (inst *Parser) ParseTypeOrGroup(typeOrGroup string) (parser antlr.Recognizer, tree grammar2.ISingleCanonicalTypeOrGroupContext, err error)
type PrimitiveAstNodeI ¶
type PrimitiveAstNodeI interface {
IsStringNode() bool
IsTemporalNode() bool
IsMachineNumericNode() bool
IsScalar() bool
GenerateGoCode(w io.Writer) (err error)
AstNodeI
}
func DemoteToScalar ¶
func DemoteToScalar(s PrimitiveAstNodeI) (out PrimitiveAstNodeI)
type ScalarModifierE ¶
type ScalarModifierE rune
const ( ScalarModifierNone ScalarModifierE = 0 ScalarModifierHomogenousArray ScalarModifierE = 'h' ScalarModifierSet ScalarModifierE = 'm' )
func (ScalarModifierE) String ¶
func (inst ScalarModifierE) String() string
type SignatureAstNode ¶
type SignatureAstNode struct {
// contains filtered or unexported fields
}
func (SignatureAstNode) IsPrimitive ¶
func (inst SignatureAstNode) IsPrimitive() bool
func (SignatureAstNode) IsSignature ¶
func (inst SignatureAstNode) IsSignature() bool
func (SignatureAstNode) IsValid ¶
func (inst SignatureAstNode) IsValid() bool
func (SignatureAstNode) IterateGroupMembers ¶
func (inst SignatureAstNode) IterateGroupMembers() iter.Seq[AstNodeI]
func (SignatureAstNode) IterateMembers ¶
func (inst SignatureAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
func (SignatureAstNode) MarshalCBOR ¶
func (inst SignatureAstNode) MarshalCBOR() (data []byte, err error)
func (SignatureAstNode) String ¶
func (inst SignatureAstNode) String() string
type StringAstNode ¶
type StringAstNode struct {
BaseType BaseTypeStringE
WidthModifier WidthModifierE
Width Width
ScalarModifier ScalarModifierE
}
func (StringAstNode) GenerateGoCode ¶
func (inst StringAstNode) GenerateGoCode(w io.Writer) (err error)
func (StringAstNode) IsMachineNumericNode ¶
func (inst StringAstNode) IsMachineNumericNode() bool
func (StringAstNode) IsPrimitive ¶
func (inst StringAstNode) IsPrimitive() bool
func (StringAstNode) IsScalar ¶
func (inst StringAstNode) IsScalar() bool
func (StringAstNode) IsSignature ¶
func (inst StringAstNode) IsSignature() bool
func (StringAstNode) IsStringNode ¶
func (inst StringAstNode) IsStringNode() bool
func (StringAstNode) IsTemporalNode ¶
func (inst StringAstNode) IsTemporalNode() bool
func (StringAstNode) IsValid ¶
func (inst StringAstNode) IsValid() bool
func (StringAstNode) IterateMembers ¶
func (inst StringAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
func (StringAstNode) MarshalCBOR ¶
func (inst StringAstNode) MarshalCBOR() (data []byte, err error)
func (StringAstNode) String ¶
func (inst StringAstNode) String() string
type TemporalTypeAstNode ¶
type TemporalTypeAstNode struct {
BaseType BaseTypeTemporalE
Width Width
ScalarModifier ScalarModifierE
}
func (TemporalTypeAstNode) GenerateGoCode ¶
func (inst TemporalTypeAstNode) GenerateGoCode(w io.Writer) (err error)
func (TemporalTypeAstNode) IsMachineNumericNode ¶
func (inst TemporalTypeAstNode) IsMachineNumericNode() bool
func (TemporalTypeAstNode) IsPrimitive ¶
func (inst TemporalTypeAstNode) IsPrimitive() bool
func (TemporalTypeAstNode) IsScalar ¶
func (inst TemporalTypeAstNode) IsScalar() bool
func (TemporalTypeAstNode) IsSignature ¶
func (inst TemporalTypeAstNode) IsSignature() bool
func (TemporalTypeAstNode) IsStringNode ¶
func (inst TemporalTypeAstNode) IsStringNode() bool
func (TemporalTypeAstNode) IsTemporalNode ¶
func (inst TemporalTypeAstNode) IsTemporalNode() bool
func (TemporalTypeAstNode) IsValid ¶
func (inst TemporalTypeAstNode) IsValid() bool
func (TemporalTypeAstNode) IterateMembers ¶
func (inst TemporalTypeAstNode) IterateMembers() iter.Seq[PrimitiveAstNodeI]
func (TemporalTypeAstNode) MarshalCBOR ¶
func (inst TemporalTypeAstNode) MarshalCBOR() (data []byte, err error)
func (TemporalTypeAstNode) String ¶
func (inst TemporalTypeAstNode) String() string
type WidthModifierE ¶
type WidthModifierE rune
const ( WidthModifierNone WidthModifierE = 0 WidthModifierFixed WidthModifierE = 'x' )
func (WidthModifierE) String ¶
func (inst WidthModifierE) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.