-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow escaping labels and property keys for TCK Cypher Value Parser #317
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the point simply to allow wrapping backticks, or to extend the support of these symbols to be able to contain whitespace? If the former; no additional comments, if the latter: there should be tests for whitespace-containing labels, properties and rel-types.
test("relationship") { | ||
val string = "[:A {since: 1920}]" | ||
val parsed = CypherValue(string) | ||
val expected = CypherRelationship("A", CypherPropertyMap(Map("since" -> CypherInteger(1920)))) | ||
parsed should equal(expected) | ||
} | ||
|
||
test("relationship with escaped label") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
escaped type
|
||
relationshipTypeName : SYMBOLIC_NAME ; | ||
|
||
label : ':' labelName ; | ||
label : ':' (labelName | ('`' labelName '`')) ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all these three rules resolve to the same lexer rule SYMBOLIC_NAME
, perhaps we could simplify the change by introducing an in-between parser rule symbolicName
that allows escaping?
Like
propertyKey: symbolicName ;
relationshipTypeName: symbolicName ;
labelName: symbolicName ;
symbolicName: '`' SYMBOLIC_NAME '`' ;
@DarthMax Is this still something we need? |
No description provided.