[ 
https://issues.apache.org/jira/browse/TINKERPOP-3153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077375#comment-18077375
 ] 

ASF GitHub Bot commented on TINKERPOP-3153:
-------------------------------------------

kenhuuu commented on code in PR #3401:
URL: https://github.com/apache/tinkerpop/pull/3401#discussion_r3169230283


##########
gremlin-language/src/main/antlr4/Gremlin.g4:
##########
@@ -2500,6 +2520,26 @@ SignedInfLiteral
 
 // String Literals
 
+// Character literal is a single character string with a 'c' suffix, modeled 
after printf's %c.
+// Must appear before NonEmptyStringLiteral for longest-match priority.
+CharacterLiteral
+    : '"' DoubleQuotedStringCharacter '"' 'c'
+    | '\'' SingleQuotedStringCharacter '\'' 'c'

Review Comment:
   Maybe? That's probably a good idea. The way I have it set up right now 
follows printf where c/C and s/S are different things where wide-characters are 
a thing. But I guess since we are UTF-8 only, it does make sense to have it 
more consistent within the grammar. Let me think about this some more.





> Expand type syntax in grammar in 4.0
> ------------------------------------
>
>                 Key: TINKERPOP-3153
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3153
>             Project: TinkerPop
>          Issue Type: Improvement
>    Affects Versions: 4.0.0
>            Reporter: Ken Hu
>            Priority: Major
>
> Types to add to the grammar in 4.0:
>  * Char
>  ** Unfortunately '' is already used for strings to match Groovy. Will need 
> to look into something nice for this.
>  * Duration
>  ** Should check to see if Duration can be used for date functions as well
>  ** Duration(Long)
>  * CompositePdt
>  ** Pdt("name", [ : ] )
>  * PrimitivePdt
>  ** Pdt("name", "value")
>  * Tree
>  * Graph
>  * Binary (ByteBuffer) - moved from 3.8.0
>  ** {{Binary( '/9j/4AAQSkZJRgABAQEAAAAAAAD/==')}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to