{"modulePath":"github.com/foxcpp/maddy","version":"v0.3.3","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parser\n\nPackage config provides set of utilities for configuration parsing.\n\n## Functions\n\n```go\nfunc NodeErr(node Node, f string, args ...interface{}) error\n```\n\n## Types\n\n```go\ntype Node struct {\n\t// Name is the first string at node's line.\n\tName string\n\t// Args are any strings placed after the node name.\n\tArgs []string\n\n\t// Children slice contains all children blocks if node is a block. Can be nil.\n\tChildren []Node\n\n\t// Snippet indicates whether current parsed node is a snippet. Always false\n\t// for all nodes returned from Read because snippets are expanded before it\n\t// returns.\n\tSnippet bool\n\n\t// Macro indicates whether current parsed node is a macro. Always false\n\t// for all nodes returned from Read because macros are expanded before it\n\t// returns.\n\tMacro bool\n\n\t// File is the name of node's source file.\n\tFile string\n\n\t// Line is the line number where the directive is located in the source file. For\n\t// blocks this is the line where \"block header\" (name + args) resides.\n\tLine int\n}\n```\nNode struct describes a parsed configurtion block or a simple directive.\n\n\tname arg0 arg1 {\n\t children0\n\t children1\n\t}\n\n```go\nfunc Read(r io.Reader, location string) (nodes []Node, err error)\n```\n\n","path":"github.com/foxcpp/maddy/pkg/cfgparser","name":"parser","synopsis":"Package config provides set of utilities for configuration parsing.","isRedistributable":true}
