Open chongkong opened 8 years ago
I think adding +
, -
, *
, /
operators and defining operation priority seems the clearest.
But I also want some kind of list-comprehension-like syntax, like
[
"{% for scope in scopes %}",
"{{ greeting < scope }}",
"{% end for %}"
]
or
{
"for_comprehension": "{{ foo.bar for foo in foos }}",
"map": "{{ foos map bar }}",
"dot_operator": "{{ foos.bar }}",
"dot_operator_with_other": [
"{{ foos .+ 1 }}",
"{{ foos .?? fallback }}",
"{{ foos .< scopes }}"
]
}
Currently supported operations are
<
|
??
Although combinations of above operations can structure many of the configuration, there is some limitations to achieve everything. This issue is a small proposal for future improvements of operations
List Operation
Merging two lists
Mapping injection with list of scope (really required?)
Unique filter
Dictionary
Merging two dictionary (really required?)
Integer Operation
Simple integer operation