Browse Source

add note about references

pull/16/head
Brett Langdon 11 years ago
parent
commit
92989956e1
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      forge.go

+ 16
- 0
forge.go View File

@ -61,6 +61,22 @@
// An identifier which main contain periods which starts with a period, the references // 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) // are resolved from the settings current section (e.g. .value, .sub_section.value)
// //
// 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";
// ref_to_setting = setting;
//
// During parsing when I get to `ref_to_setting` it will be resolved immediately and it's value will
// be set to `"value"`.
//
// This config example, however, will raise a parsing error since it cannot resolve the reference:
// ref_to_setting = setting;
// setting = "value";
//
// Since `setting` does not exist yet.
// 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 // Directives
// * Comment: // * Comment:


Loading…
Cancel
Save