nix-amer/internal/cnf/parser/nginx/line.go

34 lines
603 B
Go
Raw Permalink Normal View History

package nginx
// LineType enumerates available line types
type LineType byte
const (
// NONE is the default line type (invalid syntax)
NONE LineType = iota
// COMMENT represents a #-comment
COMMENT
// COLONCOMMENT represents a ;-comment
COLONCOMMENT
// ASSIGNMENT line
ASSIGNMENT
// INCLUDE line
INCLUDE
// SECTION start
SECTION
// SECTIONEND line '}'
SECTIONEND
)
// Line represents a meaningful line
type Line struct {
// Type of line
Type LineType
// Components of the line
Components []string
// Lines children of the current section (nil if not a section)
Lines []*Line
}