file
-- import "github.com/robertkrimen/otto/file"
Package file encapsulates the file abstractions used by the ast & parser.
Usage
type File
func NewFile
func (*File) Base
func (*File) Name
func (*File) Source
type FileSet
A FileSet represents a set of source files.
func (*FileSet) AddFile
AddFile adds a new file with the given filename and src.
This an internal method, but exported for cross-package use.
func (*FileSet) File
func (*FileSet) Position
Position converts an Idx in the FileSet into a Position.
type Idx
Idx is a compact encoding of a source position within a file set. It can be converted into a Position for a more convenient, but much larger, representation.
type Position
Position describes an arbitrary source position including the filename, line, and column location.
func (*Position) String
String returns a string in one of several forms:
-- godocdown http://github.com/robertkrimen/godocdown
Last updated