docparser

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Children

func Children(node ast.Node) []ast.Node

func Lex

func Lex(fn string, input string) (tokens, error)

func NewliteralFieldSet

func NewliteralFieldSet(a ...LiteralField) literalFieldSet

NewliteralFieldSet creates and returns a reference to an empty set.

func Parse

func Parse(t tokens) (ast.Node, error)

Types

type FodderElement

type FodderElement struct {
	Kind FodderKind
	Data string
}

type FodderKind

type FodderKind int

--------------------------------------------------------------------------- Fodder

Fodder is stuff that is usually thrown away by lexers/preprocessors but is kept so that the source can be round tripped with full fidelity.

const (
	FodderWhitespace FodderKind = iota
	FodderCommentC
	FodderCommentCpp
	FodderCommentHash
)

type LiteralField

type LiteralField string

+gen set

type StaticError

type StaticError struct {
	Loc ast.LocationRange
	Msg string
}

StaticError represents an error during parsing/lexing or static analysis. TODO(sbarzowski) Make it possible to have multiple static errors and warnings

func MakeStaticError

func MakeStaticError(msg string, lr ast.LocationRange) StaticError

func MakeStaticErrorMsg

func MakeStaticErrorMsg(msg string) StaticError

func (StaticError) Error

func (err StaticError) Error() string

Jump to

Keyboard shortcuts

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