Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrParse = errors.New("parse error")
)
Functions ¶
This section is empty.
Types ¶
type ArrStringNoAlloc ¶
type ArrStringNoAlloc []StringNoAlloc
func ArrStringToNoAlloc ¶
func ArrStringToNoAlloc(sArr []string) ArrStringNoAlloc
func (ArrStringNoAlloc) GoString ¶
func (s ArrStringNoAlloc) GoString() string
func (ArrStringNoAlloc) String ¶
func (s ArrStringNoAlloc) String() string
type Makefile ¶
type Makefile struct {
Rules RuleList
Variables VariableList
}
Makefile and it's corresponded parts matches signature of checkmake/parser
type MakefileScanner ¶
type MakefileScanner struct {
Scanner *bufio.Scanner
LineNumber int
FileHandle *os.File
Finished bool
}
MakefileScanner is a wrapping struct around bufio.Scanner which provides extra functionality like the current line number
func NewMakefileScanner ¶
func NewMakefileScanner(filepath string) (ret *MakefileScanner, err error)
NewMakefileScanner returns a MakefileScanner struct for parsing a Makefile
func (*MakefileScanner) Bytes ¶
func (s *MakefileScanner) Bytes() []byte
Bytes is a thin wrapper around bufio.Scanner Bytes()
func (*MakefileScanner) Close ¶
func (s *MakefileScanner) Close() error
Close closes all open handles the scanner has
func (*MakefileScanner) Scan ¶
func (s *MakefileScanner) Scan() bool
Scan is a thin wrapper around the bufio.Scanner Scan() function
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func NewParseWithBuffSize ¶
type Rule ¶
type Rule struct {
LineNumber int
Target StringNoAlloc
Dependencies []StringNoAlloc
Body []StringNoAlloc
UsedVariables []Variable
}
type StringNoAlloc ¶
type StringNoAlloc gojay.EmbeddedJSON
func StringToNoAlloc ¶
func StringToNoAlloc(s string) StringNoAlloc
func (StringNoAlloc) GoString ¶
func (s StringNoAlloc) GoString() string
func (StringNoAlloc) String ¶
func (s StringNoAlloc) String() string
type Variable ¶
type Variable struct {
LineNumber int
SimplyExpanded bool
SpecialVariable bool
Name StringNoAlloc
Assignment StringNoAlloc
}
type VariableList ¶
type VariableList []Variable