Skip to content

Commit

Permalink
more predictable slashdash
Browse files Browse the repository at this point in the history
Fixes: #401
  • Loading branch information
zkat committed Nov 29, 2024
1 parent 1588b1f commit 5f5e087
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Bare identifiers can now be used as values in Arguments and Properties, and are interpreted as string values.
* The spec prose now more explicitly states that strings and raw strings can
be used as type annotations.
* A statement in the spec prose that said "It is reasonable for an
* Removed a statement in the spec prose that said "It is reasonable for an
implementation to ignore null values altogether when deserializing". This is
no longer encouraged or desired.
* Code points have been constrained to [Unicode Scalar
Expand Down Expand Up @@ -69,6 +69,7 @@
* Correspondingly, the identifiers `inf`, `-inf`, and `nan` are now syntax
errors.
* `u128` and `i128` have been added as well-known number type annotations.
* Slashdash (`/-`) -compatible locations adjusted to be more clear and intuitive.

### KQL

Expand Down
16 changes: 8 additions & 8 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,16 +697,16 @@ Finally, a special kind of comment called a "slashdash", denoted by `/-`, can
be used to comment out entire _components_ of a KDL document logically, and
have those elements be treated as whitespace.

Slashdash comments can be used before:
Slashdash comments can be used before the following, including before their type
annotations, if present:

* A [Node](#node) name (or its type annotation): the entire Node is
* A [Node](#node) name: the entire Node is
treated as Whitespace, including all props, args, and children.
* A node [Argument](#argument) (or its type annotation), in which case
the Argument value is treated as Whitespace.
* A [Property](#property) key, in which case the entire property, both
key and value, is treated as Whitespace.
* A [Children Block](#children-block), in which case the entire block,
including all children within, is treated as Whitespace.
* A node [Argument](#argument): the Argument value is treated as Whitespace.
* A [Property](#property) key: the entire property, including both key and value,
is treated as Whitespace. A slashdash of just the property value is not allowed.
* A [Children Block](#children-block): the entire block, including all children within,
is treated as Whitespace. Other node items may follow a slashdashed children block.

### Newline

Expand Down

0 comments on commit 5f5e087

Please sign in to comment.