forge
forge copied to clipboard
Support strings for keys
Right now we are limited in how we can name settings, basically [_a-zA-Z]+
is all we allow.
I have been thinking about allowing strings as identifiers. To allow for more complex key names.
"some-key@name" = "it's value";
Will probably keep references strict to just unquoted identifiers for now.
Just making note, allowing quoted keys in references would end up looking like: "some-key@name"."another-key"
, I haven't thought of anything better.
Well... looking at it again, unless we do "[email protected]"
which is much better looking, but think it could be very easily confused.
Allowing .
in the keys
is practical and helpful in real usage. No impact on references. However not sure of @
, -
, etc.
For example: Let's say we have only one identifier in nested namespace. Allowing .
will transform following-
markdown {
cache = true
}
into
markdown.cache = true