parser

package
v0.0.0-...-3483356 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const WhitespaceSeparators = " \t\n\r"

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsingError

type ParsingError struct {
	Line   int
	Column int
	Group  string
	Key    string
	// contains filtered or unexported fields
}

func ParseUnitFile

func ParseUnitFile(pathName string) (M.UnitFile, []ParsingError)

Load a unit file from disk, remembering the path and filename

func ParseUnitFileString

func ParseUnitFileString(pathName, content string) (M.UnitFile, []ParsingError)

func (*ParsingError) Error

func (e *ParsingError) Error() string

type SplitFlags

type SplitFlags = uint64
const (
	// SplitRelax Allow unbalanced quote and eat up trailing backslash.
	SplitRelax SplitFlags = 1 << iota
	// SplitCUnescape Unescape known escape sequences.
	SplitCUnescape
	// SplitUnescapeRelax Allow and keep unknown escape sequences, allow and keep trailing backslash.
	SplitUnescapeRelax
	// SplitUnescapeSeparators Unescape separators (those specified, or whitespace by default).
	SplitUnescapeSeparators
	// SplitKeepQuote Ignore separators in quoting with "" and ”.
	SplitKeepQuote
	// SplitUnquote Ignore separators in quoting with "" and ”, and remove the quotes.
	SplitUnquote
	// SplitDontCoalesceSeparators Don't treat multiple adjacent separators as one
	SplitDontCoalesceSeparators
	// SplitRetainEscape Treat escape character '\' as any other character without special meaning
	SplitRetainEscape
	// SplitRetainSeparators Do not advance the original string pointer past the separator(s) */
	SplitRetainSeparators
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL