mirror of https://github.com/kdl-org/kdl.git
Make whitespace required around query operators (#500)
This commit is contained in:
parent
ee79f9f755
commit
b942867c58
|
|
@ -115,15 +115,15 @@ what they expand to.
|
|||
|
||||
```
|
||||
query-str := $bom? query
|
||||
query := selector q-ws* "||" q-ws* query | selector
|
||||
selector := filter q-ws* selector-operator q-ws* selector-subsequent | filter
|
||||
selector-subsequent := matchers q-ws* selector-operator q-ws* selector-subsequent | matchers
|
||||
query := selector q-ws+ "||" q-ws+ query | selector
|
||||
selector := filter q-ws+ selector-operator q-ws+ selector-subsequent | filter
|
||||
selector-subsequent := matchers q-ws+ selector-operator q-ws+ selector-subsequent | matchers
|
||||
selector-operator := ">>" | ">" | "++" | "+"
|
||||
filter := "top(" q-ws* ")" | matchers
|
||||
matchers := type-matcher $string? accessor-matcher* | $string accessor-matcher* | accessor-matcher+
|
||||
type-matcher := "(" q-ws* ")" | $type
|
||||
accessor-matcher := "[" q-ws* (comparison | accessor)? q-ws* "]"
|
||||
comparison := accessor q-ws* matcher-operator q-ws* ($type | $string | $number | $keyword)
|
||||
comparison := accessor q-ws+ matcher-operator q-ws+ ($type | $string | $number | $keyword)
|
||||
accessor := "val(" q-ws* $integer q-ws* ")" | "prop(" q-ws* $string q-ws* ")" | "name(" q-ws* ")" | "tag(" q-ws* ")" | "values(" q-ws* ")" | "props(" q-ws* ")" | $string
|
||||
matcher-operator := "=" | "!=" | ">" | "<" | ">=" | "<=" | "^=" | "$=" | "*="
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue