ast

package
v0.0.0-...-2c4dd6d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STRING_DBL = iota
	STRING_SNG
	STRING_LIT
	IDENT
	AT
	LCURLY
	RCURLY
	LSQUARE
	RSQUARE
	SEMI
	COMMA
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Directive

type Directive struct {
	Identifier string
	IsContext  bool
	Value      Node
	HasSemi    bool
	// contains filtered or unexported fields
}

func (Directive) Begin

func (n Directive) Begin() Position

func (Directive) End

func (n Directive) End() Position

func (Directive) Execute

func (d Directive) Execute(x interface{}) error

func (Directive) String

func (d Directive) String() string

func (Directive) Text

func (n Directive) Text() string

type Document

type Document struct {
	Directives []Node
	// contains filtered or unexported fields
}

func (Document) Begin

func (n Document) Begin() Position

func (Document) End

func (n Document) End() Position

func (Document) Execute

func (d Document) Execute(x interface{}) error

func (Document) String

func (d Document) String() string

func (Document) Text

func (n Document) Text() string

type Node

type Node interface {
	Begin() Position
	End() Position
	Text() string
	Execute(x interface{}) error
}

type Note

type Note struct {
	Value string
	// contains filtered or unexported fields
}

func (Note) Begin

func (n Note) Begin() Position

func (Note) End

func (n Note) End() Position

func (Note) Execute

func (n Note) Execute(x interface{}) error

func (Note) Text

func (n Note) Text() string

type Number

type Number struct {
	Value string
	// contains filtered or unexported fields
}

func (Number) Begin

func (n Number) Begin() Position

func (Number) End

func (n Number) End() Position

func (Number) Execute

func (n Number) Execute(x interface{}) error

func (Number) String

func (n Number) String() string

func (Number) Text

func (n Number) Text() string

type Object

type Object struct {
	Directives []Node
	// contains filtered or unexported fields
}

func (Object) Begin

func (n Object) Begin() Position

func (Object) End

func (n Object) End() Position

func (Object) Execute

func (o Object) Execute(x interface{}) error

func (Object) String

func (o Object) String() string

func (Object) Text

func (n Object) Text() string

type Parser

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

func NewParser

func NewParser(data []byte) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (Node, error)

type Position

type Position struct {
	Byte   int
	Line   int
	Column int
}

type RepeatedDirective

type RepeatedDirective struct {
	Identifier string
	IsContext  bool
	Values     []Node
	// contains filtered or unexported fields
}

func (RepeatedDirective) Begin

func (n RepeatedDirective) Begin() Position

func (RepeatedDirective) End

func (n RepeatedDirective) End() Position

func (RepeatedDirective) Execute

func (r RepeatedDirective) Execute(x interface{}) (err error)

func (RepeatedDirective) String

func (d RepeatedDirective) String() string

func (RepeatedDirective) Text

func (n RepeatedDirective) Text() string

type String

type String struct {
	Value   string
	IsMacro bool
	// contains filtered or unexported fields
}

func (String) Begin

func (n String) Begin() Position

func (String) End

func (n String) End() Position

func (String) Execute

func (n String) Execute(x interface{}) error

func (String) String

func (s String) String() string

func (String) Text

func (n String) Text() string

type Token

type Token uint8

type Unknown

type Unknown struct {
	Value string
	// contains filtered or unexported fields
}

func (Unknown) Begin

func (n Unknown) Begin() Position

func (Unknown) End

func (n Unknown) End() Position

func (Unknown) Execute

func (n Unknown) Execute(x interface{}) error

func (Unknown) Text

func (n Unknown) Text() string

type Whitespace

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

func (Whitespace) Begin

func (n Whitespace) Begin() Position

func (Whitespace) End

func (n Whitespace) End() Position

func (Whitespace) Execute

func (w Whitespace) Execute(x interface{}) error

func (Whitespace) Text

func (n Whitespace) Text() string

Jump to

Keyboard shortcuts

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