package parser
import "github.com/markbates/pkger/parser"
Index ¶
- type CreateDecl
- func (d CreateDecl) File() (*File, error)
- func (d CreateDecl) MarshalJSON() ([]byte, error)
- func (d CreateDecl) Position() (token.Position, error)
- func (d CreateDecl) String() string
- func (d CreateDecl) Value() (string, error)
- func (d CreateDecl) VirtualPaths() []string
- type Decl
- type Decls
- func Parse(her here.Info, includes ...string) (Decls, error)
- func (decls Decls) Files() ([]*File, error)
- type File
- type Filer
- type HTTPDecl
- func (d HTTPDecl) File() (*File, error)
- func (d HTTPDecl) Files(virtual map[string]string) ([]*File, error)
- func (d HTTPDecl) MarshalJSON() ([]byte, error)
- func (d HTTPDecl) Position() (token.Position, error)
- func (d HTTPDecl) String() string
- func (d HTTPDecl) Value() (string, error)
- type IncludeDecl
- func (d IncludeDecl) File() (*File, error)
- func (d IncludeDecl) Files(virtual map[string]string) ([]*File, error)
- func (d IncludeDecl) MarshalJSON() ([]byte, error)
- func (d IncludeDecl) Position() (token.Position, error)
- func (d IncludeDecl) String() string
- func (d IncludeDecl) Value() (string, error)
- type MkdirAllDecl
- func (d MkdirAllDecl) File() (*File, error)
- func (d MkdirAllDecl) MarshalJSON() ([]byte, error)
- func (d MkdirAllDecl) Position() (token.Position, error)
- func (d MkdirAllDecl) String() string
- func (d MkdirAllDecl) Value() (string, error)
- func (d MkdirAllDecl) VirtualPaths() []string
- type OpenDecl
- func (d OpenDecl) File() (*File, error)
- func (d OpenDecl) Files(virtual map[string]string) ([]*File, error)
- func (d OpenDecl) MarshalJSON() ([]byte, error)
- func (d OpenDecl) Position() (token.Position, error)
- func (d OpenDecl) String() string
- func (d OpenDecl) Value() (string, error)
- type ParsedSource
- type Parser
- func New(her here.Info) (*Parser, error)
- func (p *Parser) Decls() (Decls, error)
- func (p *Parser) DeclsMap() (map[string]Decls, error)
- func (p *Parser) Parse() error
- func (p *Parser) ParseDir(abs string, mode parser.Mode) ([]*ParsedSource, error)
- func (p *Parser) ParseFile(abs string, mode parser.Mode) (*ParsedSource, error)
- func (p *Parser) ParseSource(source Source, mode parser.Mode) (*ParsedSource, error)
- type Source
- type StatDecl
- func (d StatDecl) File() (*File, error)
- func (d StatDecl) Files(virtual map[string]string) ([]*File, error)
- func (d StatDecl) MarshalJSON() ([]byte, error)
- func (d StatDecl) Position() (token.Position, error)
- func (d StatDecl) String() string
- func (d StatDecl) Value() (string, error)
- type Virtualer
- type WalkDecl
Types ¶
type CreateDecl ¶
type CreateDecl struct {
// contains filtered or unexported fields
}
func (CreateDecl) File ¶
func (d CreateDecl) File() (*File, error)
func (CreateDecl) MarshalJSON ¶
func (d CreateDecl) MarshalJSON() ([]byte, error)
func (CreateDecl) Position ¶
func (d CreateDecl) Position() (token.Position, error)
func (CreateDecl) String ¶
func (d CreateDecl) String() string
func (CreateDecl) Value ¶
func (d CreateDecl) Value() (string, error)
func (CreateDecl) VirtualPaths ¶
func (d CreateDecl) VirtualPaths() []string
type Decl ¶
type Decl interface { File() (*File, error) Position() (token.Position, error) Value() (string, error) }
type Decls ¶
type Decls []Decl
func Parse ¶
func (Decls) Files ¶
type File ¶
func (File) String ¶
type Filer ¶
type HTTPDecl ¶
type HTTPDecl struct {
// contains filtered or unexported fields
}
func (HTTPDecl) File ¶
func (HTTPDecl) Files ¶
func (HTTPDecl) MarshalJSON ¶
func (HTTPDecl) Position ¶
func (HTTPDecl) String ¶
func (HTTPDecl) Value ¶
type IncludeDecl ¶
type IncludeDecl struct {
// contains filtered or unexported fields
}
func (IncludeDecl) File ¶
func (d IncludeDecl) File() (*File, error)
func (IncludeDecl) Files ¶
func (d IncludeDecl) Files(virtual map[string]string) ([]*File, error)
func (IncludeDecl) MarshalJSON ¶
func (d IncludeDecl) MarshalJSON() ([]byte, error)
func (IncludeDecl) Position ¶
func (d IncludeDecl) Position() (token.Position, error)
func (IncludeDecl) String ¶
func (d IncludeDecl) String() string
func (IncludeDecl) Value ¶
func (d IncludeDecl) Value() (string, error)
type MkdirAllDecl ¶
type MkdirAllDecl struct {
// contains filtered or unexported fields
}
func (MkdirAllDecl) File ¶
func (d MkdirAllDecl) File() (*File, error)
func (MkdirAllDecl) MarshalJSON ¶
func (d MkdirAllDecl) MarshalJSON() ([]byte, error)
func (MkdirAllDecl) Position ¶
func (d MkdirAllDecl) Position() (token.Position, error)
func (MkdirAllDecl) String ¶
func (d MkdirAllDecl) String() string
func (MkdirAllDecl) Value ¶
func (d MkdirAllDecl) Value() (string, error)
func (MkdirAllDecl) VirtualPaths ¶
func (d MkdirAllDecl) VirtualPaths() []string
type OpenDecl ¶
type OpenDecl struct {
// contains filtered or unexported fields
}
func (OpenDecl) File ¶
func (OpenDecl) Files ¶
func (OpenDecl) MarshalJSON ¶
func (OpenDecl) Position ¶
func (OpenDecl) String ¶
func (OpenDecl) Value ¶
type ParsedSource ¶
type ParsedSource struct { Source FileSet *token.FileSet Ast *ast.File // contains filtered or unexported fields }
func (*ParsedSource) DeclsMap ¶
func (p *ParsedSource) DeclsMap() (map[string]Decls, error)
func (*ParsedSource) Parse ¶
func (p *ParsedSource) Parse() error
type Parser ¶
func New ¶
func (*Parser) Decls ¶
func (*Parser) DeclsMap ¶
func (*Parser) Parse ¶
func (*Parser) ParseDir ¶
func (*Parser) ParseFile ¶
func (*Parser) ParseSource ¶
type Source ¶
type StatDecl ¶
type StatDecl struct {
// contains filtered or unexported fields
}
func (StatDecl) File ¶
func (StatDecl) Files ¶
func (StatDecl) MarshalJSON ¶
func (StatDecl) Position ¶
func (StatDecl) String ¶
func (StatDecl) Value ¶
type Virtualer ¶
type Virtualer interface { VirtualPaths() []string }
type WalkDecl ¶
type WalkDecl struct {
// contains filtered or unexported fields
}
func (WalkDecl) File ¶
func (WalkDecl) Files ¶
func (WalkDecl) MarshalJSON ¶
func (WalkDecl) Position ¶
func (WalkDecl) String ¶
func (WalkDecl) Value ¶
Source Files ¶
create.go decl.go file.go http.go include.go mkdir.go open.go parser.go source.go stat.go walk.go
- Version
- v0.12.7
- Published
- Nov 21, 2019
- Platform
- js/wasm
- Imports
- 14 packages
- Last checked
- 9 hours ago –
Tools for package owners.