Skip to content

Commit 5263b91

Browse files
feat: functions blocks, parenthesed JSON Expressions
- fixes #1792, the very complex example - fixes #1477 - cosmetics
1 parent e19dc0e commit 5263b91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4067,7 +4067,6 @@ JsonExpression JsonExpression() : {
40674067
CastExpression castExpr = null;
40684068
}
40694069
{
4070-
{ System.out.println("Complex:" + getAsBoolean(Feature.allowComplexParsing));}
40714070
(
40724071
LOOKAHEAD(3, {!interrupted}) expr=CaseWhenExpression()
40734072
|
@@ -4092,7 +4091,6 @@ JsonExpression JsonExpression() : {
40924091
LOOKAHEAD(ParenthesedExpression(), {getAsBoolean(Feature.allowComplexParsing)} ) expr = ParenthesedExpression()
40934092
|
40944093
LOOKAHEAD( 3, {getAsBoolean(Feature.allowComplexParsing) && !interrupted}) expr=ParenthesedSelect()
4095-
40964094
)
40974095

40984096
(
@@ -6714,6 +6712,9 @@ List<String> captureFunctionBody() {
67146712
tok = getToken(1);
67156713
int l = tokens.size();
67166714
if( tok.kind == EOF || ( foundEnd && tok.kind == ST_SEMICOLON) ) {
6715+
if (tok.kind == ST_SEMICOLON) {
6716+
tokens.add(tok.image);
6717+
}
67176718
break;
67186719
} else if ( l>0 && ( tok.image.equals(".") || tokens.get(l-1).endsWith(".")) ) {
67196720
tokens.set(l-1, tokens.get(l-1) + tok.image);

src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
import java.nio.charset.StandardCharsets;
6262
import java.util.ArrayList;
6363
import java.util.List;
64-
import java.util.logging.Level;
6564

6665
import static net.sf.jsqlparser.test.TestUtils.assertDeparse;
6766
import static net.sf.jsqlparser.test.TestUtils.assertExpressionCanBeDeparsedAs;

0 commit comments

Comments
 (0)