parser

package
Version: v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 14 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDecl added in v0.6.0

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

func (CreateDecl) File added in v0.6.0

func (d CreateDecl) File() (*File, error)

func (CreateDecl) MarshalJSON added in v0.6.0

func (d CreateDecl) MarshalJSON() ([]byte, error)

func (CreateDecl) Position added in v0.9.0

func (d CreateDecl) Position() (token.Position, error)

func (CreateDecl) String added in v0.6.0

func (d CreateDecl) String() string

func (CreateDecl) Value added in v0.6.0

func (d CreateDecl) Value() (string, error)

func (CreateDecl) VirtualPaths added in v0.6.0

func (d CreateDecl) VirtualPaths() []string

type Decl added in v0.3.0

type Decl interface {
	File() (*File, error)
	Position() (token.Position, error)
	Value() (string, error)
}

type Decls added in v0.3.0

type Decls []Decl

func Parse

func Parse(her here.Info, includes ...string) (Decls, error)

func (Decls) Files added in v0.3.0

func (decls Decls) Files() ([]*File, error)

type File added in v0.3.0

type File struct {
	Abs  string // full path on disk to file
	Path here.Path
	Here here.Info
}

func (File) String added in v0.3.0

func (f File) String() string

type Filer added in v0.3.0

type Filer interface {
	Files(map[string]string) ([]*File, error)
}

type HTTPDecl added in v0.5.1

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

func (HTTPDecl) File added in v0.5.1

func (d HTTPDecl) File() (*File, error)

func (HTTPDecl) Files added in v0.5.1

func (d HTTPDecl) Files(virtual map[string]string) ([]*File, error)

func (HTTPDecl) MarshalJSON added in v0.5.1

func (d HTTPDecl) MarshalJSON() ([]byte, error)

func (HTTPDecl) Position added in v0.9.0

func (d HTTPDecl) Position() (token.Position, error)

func (HTTPDecl) String added in v0.6.0

func (d HTTPDecl) String() string

func (HTTPDecl) Value added in v0.5.1

func (d HTTPDecl) Value() (string, error)

type IncludeDecl added in v0.12.0

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

func NewInclude added in v0.12.10

func NewInclude(her here.Info, inc string) (IncludeDecl, error)

func (IncludeDecl) File added in v0.12.0

func (d IncludeDecl) File() (*File, error)

func (IncludeDecl) Files added in v0.12.0

func (d IncludeDecl) Files(virtual map[string]string) ([]*File, error)

func (IncludeDecl) MarshalJSON added in v0.12.0

func (d IncludeDecl) MarshalJSON() ([]byte, error)

func (IncludeDecl) Position added in v0.12.0

func (d IncludeDecl) Position() (token.Position, error)

func (IncludeDecl) String added in v0.12.0

func (d IncludeDecl) String() string

func (IncludeDecl) Value added in v0.12.0

func (d IncludeDecl) Value() (string, error)

type MkdirAllDecl added in v0.6.0

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

func (MkdirAllDecl) File added in v0.6.0

func (d MkdirAllDecl) File() (*File, error)

func (MkdirAllDecl) MarshalJSON added in v0.6.0

func (d MkdirAllDecl) MarshalJSON() ([]byte, error)

func (MkdirAllDecl) Position added in v0.9.0

func (d MkdirAllDecl) Position() (token.Position, error)

func (MkdirAllDecl) String added in v0.6.0

func (d MkdirAllDecl) String() string

func (MkdirAllDecl) Value added in v0.6.0

func (d MkdirAllDecl) Value() (string, error)

func (MkdirAllDecl) VirtualPaths added in v0.6.0

func (d MkdirAllDecl) VirtualPaths() []string

type OpenDecl added in v0.3.0

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

func (OpenDecl) File added in v0.3.0

func (d OpenDecl) File() (*File, error)

func (OpenDecl) Files added in v0.3.0

func (d OpenDecl) Files(virtual map[string]string) ([]*File, error)

func (OpenDecl) MarshalJSON added in v0.4.0

func (d OpenDecl) MarshalJSON() ([]byte, error)

func (OpenDecl) Position added in v0.9.0

func (d OpenDecl) Position() (token.Position, error)

func (OpenDecl) String added in v0.6.0

func (d OpenDecl) String() string

func (OpenDecl) Value added in v0.3.0

func (d OpenDecl) Value() (string, error)

type ParsedSource added in v0.10.0

type ParsedSource struct {
	Source
	FileSet *token.FileSet
	Ast     *ast.File
	// contains filtered or unexported fields
}

func (*ParsedSource) DeclsMap added in v0.10.0

func (p *ParsedSource) DeclsMap() (map[string]Decls, error)

func (*ParsedSource) Parse added in v0.10.0

func (p *ParsedSource) Parse() error

type Parser added in v0.10.0

type Parser struct {
	here.Info
	// contains filtered or unexported fields
}

func New added in v0.10.0

func New(her here.Info) (*Parser, error)

func (*Parser) Decls added in v0.10.0

func (p *Parser) Decls() (Decls, error)

func (*Parser) DeclsMap added in v0.10.0

func (p *Parser) DeclsMap() (map[string]Decls, error)

func (*Parser) Parse added in v0.10.0

func (p *Parser) Parse() error

func (*Parser) ParseDir added in v0.12.0

func (p *Parser) ParseDir(abs string, mode parser.Mode) ([]*ParsedSource, error)

func (*Parser) ParseFile added in v0.12.0

func (p *Parser) ParseFile(abs string, mode parser.Mode) (*ParsedSource, error)

func (*Parser) ParseSource added in v0.12.0

func (p *Parser) ParseSource(source Source, mode parser.Mode) (*ParsedSource, error)

type Source added in v0.10.0

type Source struct {
	Abs  string // full path on disk to file
	Path here.Path
	Here here.Info
}

type StatDecl added in v0.6.0

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

func (StatDecl) File added in v0.6.0

func (d StatDecl) File() (*File, error)

func (StatDecl) Files added in v0.6.0

func (d StatDecl) Files(virtual map[string]string) ([]*File, error)

func (StatDecl) MarshalJSON added in v0.6.0

func (d StatDecl) MarshalJSON() ([]byte, error)

func (StatDecl) Position added in v0.9.0

func (d StatDecl) Position() (token.Position, error)

func (StatDecl) String added in v0.6.0

func (d StatDecl) String() string

func (StatDecl) Value added in v0.6.0

func (d StatDecl) Value() (string, error)

type Virtualer added in v0.6.0

type Virtualer interface {
	VirtualPaths() []string
}

type WalkDecl added in v0.3.0

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

func (WalkDecl) File added in v0.3.0

func (d WalkDecl) File() (*File, error)

func (WalkDecl) Files added in v0.3.0

func (d WalkDecl) Files(virtual map[string]string) ([]*File, error)

func (WalkDecl) MarshalJSON added in v0.4.0

func (d WalkDecl) MarshalJSON() ([]byte, error)

func (WalkDecl) Position added in v0.9.0

func (d WalkDecl) Position() (token.Position, error)

func (WalkDecl) String added in v0.6.0

func (d WalkDecl) String() string

func (WalkDecl) Value added in v0.3.0

func (d WalkDecl) Value() (string, error)

Jump to

Keyboard shortcuts

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