|
|
|
@ -61,7 +61,25 @@ |
|
|
|
// An identifier which main contain periods which starts with a period, the references
|
|
|
|
// are resolved from the settings current section (e.g. .value, .sub_section.value)
|
|
|
|
//
|
|
|
|
// Directives
|
|
|
|
// * Comment:
|
|
|
|
// A comment is a pound symbol ('#') followed by any text any which ends with a newline (e.g. '# I am a comment\n')
|
|
|
|
// A comment can either be on a line of it's own or at the end of any line. Nothing can come after the comment
|
|
|
|
// until after the newline.
|
|
|
|
// * Directive:
|
|
|
|
// A directive is a setting, a identifier and a value. They are in the format '<identifier> = <value>;'
|
|
|
|
// All directives must end in a semicolon. The value can be any of the types defined above.
|
|
|
|
// * Section:
|
|
|
|
// A section is a grouping of directives under a common name. They are in the format '<section_name> { <directives> }'.
|
|
|
|
// All sections must be wrapped in brackets ('{', '}') and must all have a name. They do not end in a semicolon.
|
|
|
|
// Sections may be left empty, they do not have to contain any directives.
|
|
|
|
// * Include:
|
|
|
|
// An include statement tells the config parser to include the contents of another config file where the include
|
|
|
|
// statement is defined. Includes are in the format 'include "<pattern>";'. The <pattern> can be any glob
|
|
|
|
// like pattern which is compatible with `path.filepath.Match` http://golang.org/pkg/path/filepath/#Match
|
|
|
|
//
|
|
|
|
// Note about references.
|
|
|
|
//
|
|
|
|
// References are resolved during parsing not access (they do not act as pointers... today).
|
|
|
|
// Meaning that if I have the following config:
|
|
|
|
// setting = "value";
|
|
|
|
@ -78,22 +96,6 @@ |
|
|
|
// This is mostly due to the naive implementation of references today. How they work may change in
|
|
|
|
// future versions or they may disappear entirely.
|
|
|
|
//
|
|
|
|
// Directives
|
|
|
|
// * Comment:
|
|
|
|
// A comment is a pound symbol ('#') followed by any text any which ends with a newline (e.g. '# I am a comment\n')
|
|
|
|
// A comment can either be on a line of it's own or at the end of any line. Nothing can come after the comment
|
|
|
|
// until after the newline.
|
|
|
|
// * Directive:
|
|
|
|
// A directive is a setting, a identifier and a value. They are in the format '<identifier> = <value>;'
|
|
|
|
// All directives must end in a semicolon. The value can be any of the types defined above.
|
|
|
|
// * Section:
|
|
|
|
// A section is a grouping of directives under a common name. They are in the format '<section_name> { <directives> }'.
|
|
|
|
// All sections must be wrapped in brackets ('{', '}') and must all have a name. They do not end in a semicolon.
|
|
|
|
// Sections may be left empty, they do not have to contain any directives.
|
|
|
|
// * Include:
|
|
|
|
// An include statement tells the config parser to include the contents of another config file where the include
|
|
|
|
// statement is defined. Includes are in the format 'include "<pattern>";'. The <pattern> can be any glob
|
|
|
|
// like pattern which is compatible with `path.filepath.Match` http://golang.org/pkg/path/filepath/#Match
|
|
|
|
package forge |
|
|
|
|
|
|
|
import ( |
|
|
|
|