Documentation
¶
Overview ¶
Package files provides minor support for dealing with files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CppToHeader ¶
SwapHeaderCpp swaps between .cc/.cpp into .h
func DirExists ¶
DirExists check whether the directory exists and is a directory (not another type of file).
Types ¶
type LoadedFile ¶
LoadedFile represents a single gochart source file loaded in memory.
func LoadFileFromData ¶
func LoadFileFromData(data []byte) (*LoadedFile, error)
func LoadFileFromPath ¶
func LoadFileFromPath(path string) (*LoadedFile, error)
LoadFileFromPath reads the contents of a file from path and caches it in convenient ways so that the rest of the compiler can benefit from it.
type LoadedFilePosition ¶
type LoadedFilePosition struct { File *LoadedFile Line int Char int }
LoadedFilePosition represents a character position within a loaded file.
func (*LoadedFilePosition) Render ¶
func (lfp *LoadedFilePosition) Render(header, msg, footer string, contextSize int) string
Render prints the position pointed, with an possible message associated with it. The printing is "clang error style". |contextSize| is how many lines around the position to print (in each direction).