Browse Source

add environment to documentation

pull/19/head
Brett Langdon 11 years ago
parent
commit
b15ecded88
2 changed files with 9 additions and 1 deletions
  1. +3
    -0
      README.md
  2. +6
    -1
      forge.go

+ 3
- 0
README.md View File

@ -23,6 +23,9 @@ You can see example usage in the `example` folder.
# Global directives
global = "global value";
# Pull in the "PATH" environment variable
path_env = $PATH;
# Primary section
primary {
string = "primary string value";


+ 6
- 1
forge.go View File

@ -34,7 +34,8 @@
// FLOAT: ('-')? NUMBERS '.' NUMBERS
// STRING: '"' .* '"'
// REFERENCE: (IDENTIFIER)? ('.' IDENTIFIER)+
// VALUE: BOOL | NULL | INTEGER | FLOAT | STRING | REFERENCE
// ENVIRONMENT: '$' IDENTIFIER
// VALUE: BOOL | NULL | INTEGER | FLOAT | STRING | REFERENCE | ENVIRONMENT
//
// INCLUDE: 'include ' STRING ';'
// DIRECTIVE: (IDENTIFIER '=' VALUE | INCLUDE) ';'
@ -62,6 +63,10 @@
// * Local reference:
// 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)
// * Environment:
// An environment is a way to pull in environment variables into your config. Environment variables
// are identifiers which start with a dollar sign (e.g. $PATH). Environment variables are always
// represented as strings and are evaluated at parse time.
//
// Directives
// * Comment:


Loading…
Cancel
Save