Documentation
¶
Overview ¶
Package pre offers preprocessing of files.
Commands available are:
printf include require define ifdef ifndef
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LispComment = PrefixCommenter(";") CppComment = PrefixCommenter("//") CComment = &ast.Commenter{"/*", "*/", false} )
Functions ¶
func PrefixCommenter ¶
Types ¶
type Processor ¶
type Processor struct {
// Trigger is the string which begins an action (command).
// The default trigger is "#", which is the same as the C/C++ pre-processor.
Trigger string
// MaxIncludeDepth is the maximum number of nested includes that can occur
// before an error is thrown. This is to prevent infinite include loops.
MaxIncludeDepth int
// Commenters define what kind of comments are accepted in the parsed text.
// Triggers are ignored when they are inside a comment. Comments can also
// be stripped out of the text, or just left there.
Commenters ast.Commenters
}
Click to show internal directories.
Click to hide internal directories.