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

27 lines
494 B
Go
Raw Normal View History

package bash
// LineType enumerates available line types
type LineType byte
const (
// ANY is the default line type (all except assignments)
ANY LineType = iota
// ASSIGNMENT line
ASSIGNMENT
)
// Line represents a meaningful line
type Line struct {
// Type of line
Type LineType
// Components of the line
//
// When Type = ASSIGNMENT :
// [0] = indentation (spaces and tabs)
// [1] = variable name
// [2] = variable value
// [3] = comment (optional)
Components []string
}