simple-framework / simple_grid_yaml_compiler

Generates the extended YAML output for an input site_level_configuration_file
Apache License 2.0
0 stars 9 forks source link

Variable hierarchies #10

Closed maany closed 5 years ago

maany commented 5 years ago

Issue with YAML

var1 : &var1 value_1
var2 : &var2 &var1  #Not supported in YAML

Alternate solution 1

var 2: &var2
  - &var1

Alternate solution 2

var 2: &var2
  **value**: &var1

Alternate Solution 1 looks cleaner while Alternate solution 2 is easier to handle.

For version 1, we could stick to Alternate Solution 2 and select a key that specifies values. In the above example, the key is called : "value". It could be called : "existing variable" for better understanding.

The compiler would then need to look for "existing values" key recursively to end up with the final value of a variable.

maany commented 5 years ago

@ejr004 thoughts?