You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/08/01 14:12:56 UTC

[groovy] branch master updated: Add `offset` to keyword list of GINQ

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new a9541b2  Add `offset` to keyword list of GINQ
a9541b2 is described below

commit a9541b24f50de60059cc75e7bab52744987b0d2e
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Aug 1 22:12:39 2021 +0800

    Add `offset` to keyword list of GINQ
---
 .../src/main/groovy/org/apache/groovy/ginq/dsl/GinqAstBuilder.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/GinqAstBuilder.java b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/GinqAstBuilder.java
index ccee213..f88b690 100644
--- a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/GinqAstBuilder.java
+++ b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/GinqAstBuilder.java
@@ -466,7 +466,7 @@ public class GinqAstBuilder extends CodeVisitorSupport implements SyntaxErrorRep
 
     private static final String __LATEST_GINQ_EXPRESSION_CLAUSE = "__latestGinqExpressionClause";
 
-    private static final String KW_WITH = "with";   // reserved keyword
+    private static final String KW_WITH = "with"; // reserved keyword
     private static final String KW_FROM = "from";
     private static final String KW_IN = "in";
     private static final String KW_ON = "on";
@@ -476,16 +476,17 @@ public class GinqAstBuilder extends CodeVisitorSupport implements SyntaxErrorRep
     private static final String KW_HAVING = "having";
     private static final String KW_ORDERBY = "orderby";
     private static final String KW_LIMIT = "limit";
+    private static final String KW_OFFSET = "offset"; // reserved keyword
     private static final String KW_SELECT = "select";
     private static final String KW_DISTINCT = "distinct";
-    private static final String KW_WITHINGROUP = "withingroup";   // reserved keyword
+    private static final String KW_WITHINGROUP = "withingroup"; // reserved keyword
     private static final String KW_OVER = "over";
     private static final String KW_AS = "as";
     private static final String KW_SHUTDOWN = "shutdown";
     private static final Set<String> KEYWORD_SET = new HashSet<>();
     static {
         KEYWORD_SET.addAll(Arrays.asList(KW_WITH, KW_FROM, KW_IN, KW_ON, KW_WHERE, KW_EXISTS, KW_GROUPBY, KW_HAVING, KW_ORDERBY,
-                                         KW_LIMIT, KW_SELECT, KW_DISTINCT, KW_WITHINGROUP, KW_OVER, KW_AS, KW_SHUTDOWN));
+                                         KW_LIMIT, KW_OFFSET, KW_SELECT, KW_DISTINCT, KW_WITHINGROUP, KW_OVER, KW_AS, KW_SHUTDOWN));
         KEYWORD_SET.addAll(JoinExpression.JOIN_NAME_LIST);
     }
 }