[ https://issues.apache.org/jira/browse/TINKERPOP-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733251#comment-17733251 ]
ASF GitHub Bot commented on TINKERPOP-2959: ------------------------------------------- Cole-Greer commented on code in PR #2094: URL: https://github.com/apache/tinkerpop/pull/2094#discussion_r1231588579 ########## gremlin-language/src/main/antlr4/Gremlin.g4: ########## @@ -1403,7 +1521,7 @@ genericLiteralMap | LBRACK mapEntry (COMMA mapEntry)* RBRACK ; -// allow builds of Map that sorta make sense in the Gremlin context +// allow builds of Map that sorta make sense in the Gremlin context. mapEntry : NEW COLON genericLiteral // explicit for [new: true] - if we had other keywords like that maybe we'd group them up? | (LPAREN stringLiteral RPAREN | stringLiteral) COLON genericLiteral Review Comment: I believe that for each of these, the value part of the mapEntry should be a `genericLiteralArgument` instead of just a `genericLiteral`. Just checked in console and groovy allows passing variables as the value in maps. > Allow the grammar to support parameters > --------------------------------------- > > Key: TINKERPOP-2959 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2959 > Project: TinkerPop > Issue Type: Improvement > Components: language > Affects Versions: 3.6.4 > Reporter: Stephen Mallette > Priority: Major > > Allow the grammar to support parameters similar to how the groovy engine does > like, {{g.inject(x,y,z)}}. Doing this will make it easier for a transition > away from the groovy engine as a lot of Gremlin in the world today uses > parameters. The grammar may have to come with some limitations though as > groovy is wide open in terms of what can be treated as a variable. Probably > going to keep parameters tied to primitives, collections and tokens/enums > like {{Order}} and {{Scope}}. Collections themselves will not contain > parameters and things like a {{Traversal}} or {{P}} cannot be treated as one. -- This message was sent by Atlassian Jira (v8.20.10#820010)