Documentation ¶
Index ¶
- type Lexer
- type ManualAstMod
- type Option
- type Options
- type ParsedDefinitions
- type Parser
- func (p *Parser) ByteSlice(reference document.ByteSliceReference) document.ByteSlice
- func (p *Parser) CachedByteSlice(i int) document.ByteSlice
- func (p *Parser) InitDirectiveSet(set *document.DirectiveSet)
- func (p *Parser) ParseExecutableDefinition(input []byte) (err error)
- func (p *Parser) ParseTypeSystemDefinition(input []byte) (err error)
- func (p *Parser) TextPosition() position.Position
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer interface { SetTypeSystemInput(input []byte) error SetExecutableInput(input []byte) error Read() (tok token.Token) Peek(ignoreWhitespace bool) keyword.Keyword ByteSlice(reference document.ByteSliceReference) document.ByteSlice TextPosition() position.Position }
Lexer is the interface used by the Parser to lex tokens
type ManualAstMod ¶ added in v1.2.0
type ManualAstMod struct {
// contains filtered or unexported fields
}
ManualAstMod keeps functions to manually modify the parsed ast
func NewManualAstMod ¶ added in v1.2.0
func NewManualAstMod(p *Parser) *ManualAstMod
func (*ManualAstMod) AppendFieldToSelectionSet ¶ added in v1.2.0
func (m *ManualAstMod) AppendFieldToSelectionSet(fieldRef, setRef int)
func (*ManualAstMod) DeleteFieldFromSelectionSet ¶ added in v1.2.0
func (m *ManualAstMod) DeleteFieldFromSelectionSet(fieldRef, setRef int)
type ParsedDefinitions ¶
type ParsedDefinitions struct { TypeSystemDefinition document.TypeSystemDefinition ExecutableDefinition document.ExecutableDefinition OperationDefinitions document.OperationDefinitions FragmentDefinitions document.FragmentDefinitions VariableDefinitions document.VariableDefinitions Fields document.Fields InlineFragments document.InlineFragments FragmentSpreads document.FragmentSpreads Arguments document.Arguments ArgumentSets []document.ArgumentSet Directives document.Directives DirectiveSets []document.DirectiveSet EnumTypeDefinitions document.EnumTypeDefinitions ArgumentsDefinitions document.ArgumentsDefinitions EnumValuesDefinitions document.EnumValueDefinitions FieldDefinitions document.FieldDefinitions InputValueDefinitions document.InputValueDefinitions InputObjectTypeDefinitions document.InputObjectTypeDefinitions DirectiveDefinitions document.DirectiveDefinitions InterfaceTypeDefinitions document.InterfaceTypeDefinitions ObjectTypeDefinitions document.ObjectTypeDefinitions ScalarTypeDefinitions document.ScalarTypeDefinitions UnionTypeDefinitions document.UnionTypeDefinitions InputFieldsDefinitions document.InputFieldsDefinitions Values []document.Value ListValues []document.ListValue ObjectValues []document.ObjectValue ObjectFields document.ObjectFields Types document.Types SelectionSets []document.SelectionSet ByteSliceReferences []document.ByteSliceReference Integers []int32 Floats []float32 Booleans [2]bool }
ParsedDefinitions contains all parsed definitions to avoid deeply nested data structures while parsing
type Parser ¶
type Parser struct { ParsedDefinitions ParsedDefinitions // contains filtered or unexported fields }
Parser holds the lexer and a buffer for writing literals
func (*Parser) ByteSlice ¶
func (p *Parser) ByteSlice(reference document.ByteSliceReference) document.ByteSlice
func (*Parser) InitDirectiveSet ¶
func (p *Parser) InitDirectiveSet(set *document.DirectiveSet)
func (*Parser) ParseExecutableDefinition ¶
ParseExecutableDefinition parses an ExecutableDefinition from an io.Reader
func (*Parser) ParseTypeSystemDefinition ¶
ParseTypeSystemDefinition parses a TypeSystemDefinition from an io.Reader
func (*Parser) TextPosition ¶
Source Files ¶
- arguments_parser.go
- argumentsdefinition_parser.go
- bool_value_parser.go
- byteslice_parser.go
- defaultvalue_parser.go
- directivedefinition_parser.go
- directives_parser.go
- enumtypedefinition_parser.go
- enumvaluesdefinition_parser.go
- executabledefinition_parser.go
- field_parser.go
- fieldsdefinition_parser.go
- float_value_parser.go
- fragmentdefinition_parser.go
- fragmentspread_parser.go
- implementsinterfaces_parser.go
- inlinefragment_parser.go
- inputfieldsdefinition_parser.go
- inputobjecttypedefinition_parser.go
- inputvaluedefinitions_parser.go
- int_value_parser.go
- interfacetypedefinition_parser.go
- list_value_parser.go
- manual_ast_mod.go
- object_value_parser.go
- objecttypedefinition_parser.go
- operationdefinition_parser.go
- parser.go
- scalartypedefinition_parser.go
- schemadefinition_parser.go
- selectionset_parser.go
- type_parser.go
- typesystemdefinition_parser.go
- uniontypedefinition_parser.go
- value_parser.go
- variabledefinitions_parser.go
Click to show internal directories.
Click to hide internal directories.