Skip to content

Commit ece6380

Browse files
committed
Input parameters for SPEL grammar
1 parent 5836f41 commit ece6380

File tree

8 files changed

+1114
-833
lines changed

8 files changed

+1114
-833
lines changed

headless-services/commons/jpql/grammars/SpelLexer.g4

-6
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ IDENTIFIER
117117
: (ALPHABETIC | '_') (ALPHABETIC | DIGIT | '_' | '$')*
118118
;
119119

120-
NUMERIC_LITERAL
121-
: REAL_LITERAL
122-
| INTEGER_LITERAL
123-
;
124-
125-
126120
REAL_LITERAL
127121
: '.' DECIMAL_DIGIT+ EXPONENT_PART? REAL_TYPE_SUFFIX?
128122
| DECIMAL_DIGIT+ '.' DECIMAL_DIGIT+ EXPONENT_PART? REAL_TYPE_SUFFIX?

headless-services/commons/jpql/grammars/SpelParser.g4

+11-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ node
5858

5959
nonDottedNode
6060
: (LSQUARE spelExpr RSQUARE)
61+
| inputParameter
6162
;
6263

6364
dottedNode
@@ -105,16 +106,21 @@ startNode
105106
| projection
106107
| selection
107108
| inlineListOrMap
109+
| inputParameter
108110
;
109111

110112

111113
literal
112-
: NUMERIC_LITERAL
114+
: numericLiteral
113115
| STRING_LITERAL
114116
| TRUE
115117
| FALSE
116118
;
117119

120+
numericLiteral
121+
: INTEGER_LITERAL
122+
| REAL_LITERAL
123+
;
118124

119125
parenspelExpr
120126
: LPAREN spelExpr RPAREN
@@ -168,4 +174,7 @@ beanReference
168174
: (BEAN_REF | FACTORY_BEAN_REF) (IDENTIFIER | STRING_LITERAL)
169175
;
170176

171-
177+
inputParameter
178+
: (LSQUARE INTEGER_LITERAL RSQUARE)
179+
;
180+

headless-services/commons/jpql/src/main/java/org/springframework/ide/vscode/parser/spel/SpelLexer.java

+456-460
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)