mirror of https://github.com/kdl-org/kdl.git
remove the 'values are just number-indexed properties' feature
This commit is contained in:
parent
b4067bdfad
commit
951eed8f43
28
SPEC.md
28
SPEC.md
|
|
@ -33,25 +33,14 @@ Being a node-oriented language means that the real core component of any KDL
|
||||||
document is the "node". Every node must have a name, which is either a legal
|
document is the "node". Every node must have a name, which is either a legal
|
||||||
[Identifier](#identifier), or a quoted [String](#string).
|
[Identifier](#identifier), or a quoted [String](#string).
|
||||||
|
|
||||||
Following the name are one or more [Whitespace](#whitespace) components,
|
Following the name are zero or more whitespace-separated [Values](#value) or
|
||||||
followed by zero or more whitespace-separated [Values](#value) or
|
[Properties](#property). Values and Properties may be interspersed in any
|
||||||
[Properties](#property). Finally, a node is terminated by either a
|
order, much like is common with positional arguments vs options in command
|
||||||
[Newline](#newline), a [Children Block](#children-block), a semicolon (`;`) or
|
line tools.
|
||||||
the end of the
|
|
||||||
file/stream (an `EOF`).
|
|
||||||
|
|
||||||
When present in the list of Properties and Values, plain Values (those not
|
Finally, a node is terminated by either a [Newline](#newline), a [Children
|
||||||
attached to a Property), each "anonymous" value should be treated as a
|
Block](#children-block), a semicolon (`;`) or the end of the file/stream (an
|
||||||
Property whose key is its current index among _values_ in the same
|
`EOF`).
|
||||||
node, starting from 0, as a string. Named properties do not count towarrds
|
|
||||||
this index.
|
|
||||||
|
|
||||||
That is, the following two nodes are semantically equivalent:
|
|
||||||
|
|
||||||
```kdl
|
|
||||||
foo 1 key="val" 2
|
|
||||||
foo "0"=1 "1"=2 key="val"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
|
|
@ -81,7 +70,8 @@ The following characters cannot be the first character in a bare
|
||||||
|
|
||||||
### Non-identifier characters
|
### Non-identifier characters
|
||||||
|
|
||||||
The following characters cannot be used anywhere in a bare [Identifier](#identifier):
|
The following characters cannot be used anywhere in a bare
|
||||||
|
[Identifier](#identifier):
|
||||||
|
|
||||||
* Any codepoint with hexadecimal value `0x20` or below.
|
* Any codepoint with hexadecimal value `0x20` or below.
|
||||||
* Any codepoint with hexadecimal value higher than `0x10FFF`.
|
* Any codepoint with hexadecimal value higher than `0x10FFF`.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue