Skip to content

Commit 61d24c4

Browse files
authored
Merge branch 'main' into nodeoptions
2 parents 5a95636 + 15ebbf2 commit 61d24c4

48 files changed

Lines changed: 824 additions & 239 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import java.util.Calendar
2+
13
plugins {
24
id("org.openrewrite.build.root") version "latest.release"
35
id("org.openrewrite.build.java-base") version "latest.release"
@@ -23,6 +25,29 @@ allprojects {
2325
description = "Eliminate tech-debt. Automatically."
2426
}
2527

28+
subprojects {
29+
tasks.withType<JavaExec>().configureEach {
30+
if (name == "generateAntlrSources") {
31+
doLast {
32+
val idx = args?.indexOf("-o") ?: return@doLast
33+
if (idx < 0 || idx + 1 >= args!!.size) return@doLast
34+
val rootPrefix = rootProject.projectDir.absolutePath + "/"
35+
val year = Calendar.getInstance().get(Calendar.YEAR)
36+
val licenseHeader = "/*\n" + rootProject.file("gradle/licenseHeader.txt")
37+
.readText().trim()
38+
.replace("\${year}", year.toString())
39+
.lines()
40+
.joinToString("\n") { " * $it".trimEnd() } + "\n */\n"
41+
project.file(args!![idx + 1]).walk().filter { it.extension == "java" }.forEach { file ->
42+
file.writeText(licenseHeader + file.readLines().joinToString("\n") { line ->
43+
line.trimEnd().replace("// Generated from $rootPrefix", "// Generated from ")
44+
} + "\n")
45+
}
46+
}
47+
}
48+
}
49+
}
50+
2651
// Use this task locally between different dependency check runs to have updated analysis:
2752
// OSSINDEX_PASSWORD=... OSSINDEX_USERNAME=... gradle cleanReports dCAg --no-parallel
2853
tasks.register<Delete>("cleanReports") {

rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLLexer.java

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 the original author or authors.
2+
* Copyright 2026 the original author or authors.
33
* <p>
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,11 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// Generated from ~/git/rewrite/rewrite-hcl/src/main/antlr/HCLLexer.g4 by ANTLR 4.13.2
16+
// Generated from rewrite-hcl/src/main/antlr/HCLLexer.g4 by ANTLR 4.13.2
1717
package org.openrewrite.hcl.internal.grammar;
1818
import java.util.Stack;
1919
import org.antlr.v4.runtime.Lexer;
2020
import org.antlr.v4.runtime.CharStream;
21+
import org.antlr.v4.runtime.Token;
22+
import org.antlr.v4.runtime.TokenStream;
2123
import org.antlr.v4.runtime.*;
2224
import org.antlr.v4.runtime.atn.*;
2325
import org.antlr.v4.runtime.dfa.DFA;
@@ -31,14 +33,14 @@ public class HCLLexer extends Lexer {
3133
protected static final PredictionContextCache _sharedContextCache =
3234
new PredictionContextCache();
3335
public static final int
34-
FOR_BRACE=1, FOR_BRACK=2, IF=3, IN=4, BooleanLiteral=5, NULL=6, LBRACE=7,
35-
RBRACE=8, ASSIGN=9, Identifier=10, WS=11, COMMENT=12, LINE_COMMENT=13,
36-
NEWLINE=14, NumericLiteral=15, QUOTE=16, HEREDOC_START=17, PLUS=18, AND=19,
37-
EQ=20, LT=21, DOUBLE_COLON=22, COLON=23, LBRACK=24, LPAREN=25, MINUS=26,
38-
OR=27, NEQ=28, GT=29, QUESTION=30, RBRACK=31, RPAREN=32, MUL=33, NOT=34,
39-
LEQ=35, DOT=36, DIV=37, GEQ=38, ARROW=39, COMMA=40, MOD=41, ELLIPSIS=42,
40-
TILDE=43, TEMPLATE_INTERPOLATION_START=44, TemplateStringLiteral=45, TemplateStringLiteralChar=46,
41-
HP_WS=47, HP_COMMENT=48, HP_LINE_COMMENT=49, HTemplateLiteral=50, HTemplateLiteralChar=51,
36+
FOR_BRACE=1, FOR_BRACK=2, IF=3, IN=4, BooleanLiteral=5, NULL=6, LBRACE=7,
37+
RBRACE=8, ASSIGN=9, Identifier=10, WS=11, COMMENT=12, LINE_COMMENT=13,
38+
NEWLINE=14, NumericLiteral=15, QUOTE=16, HEREDOC_START=17, PLUS=18, AND=19,
39+
EQ=20, LT=21, DOUBLE_COLON=22, COLON=23, LBRACK=24, LPAREN=25, MINUS=26,
40+
OR=27, NEQ=28, GT=29, QUESTION=30, RBRACK=31, RPAREN=32, MUL=33, NOT=34,
41+
LEQ=35, DOT=36, DIV=37, GEQ=38, ARROW=39, COMMA=40, MOD=41, ELLIPSIS=42,
42+
TILDE=43, TEMPLATE_INTERPOLATION_START=44, TemplateStringLiteral=45, TemplateStringLiteralChar=46,
43+
HP_WS=47, HP_COMMENT=48, HP_LINE_COMMENT=49, HTemplateLiteral=50, HTemplateLiteralChar=51,
4244
H_NEWLINE=52;
4345
public static final int
4446
TEMPLATE=1, HEREDOC_PREAMBLE=2, HEREDOC=3;
@@ -52,41 +54,41 @@ public class HCLLexer extends Lexer {
5254

5355
private static String[] makeRuleNames() {
5456
return new String[] {
55-
"FOR_BRACE", "FOR_BRACK", "IF", "IN", "BooleanLiteral", "NULL", "LBRACE",
56-
"RBRACE", "ASSIGN", "StringLiteralChar", "Identifier", "WS", "COMMENT",
57-
"LINE_COMMENT", "NEWLINE", "LetterOrDigit", "Letter", "EscapeSequence",
58-
"HexDigit", "NumericLiteral", "ExponentPart", "QUOTE", "HEREDOC_START",
59-
"PLUS", "AND", "EQ", "LT", "DOUBLE_COLON", "COLON", "LBRACK", "LPAREN",
60-
"MINUS", "OR", "NEQ", "GT", "QUESTION", "RBRACK", "RPAREN", "MUL", "NOT",
61-
"LEQ", "DOT", "DIV", "GEQ", "ARROW", "COMMA", "MOD", "ELLIPSIS", "TILDE",
62-
"TEMPLATE_INTERPOLATION_START", "TemplateStringLiteral", "TemplateStringLiteralChar",
63-
"END_QUOTE", "HP_NEWLINE", "HP_WS", "HP_COMMENT", "HP_LINE_COMMENT",
64-
"HPIdentifier", "H_NEWLINE", "H_TEMPLATE_INTERPOLATION_START", "HTemplateLiteral",
57+
"FOR_BRACE", "FOR_BRACK", "IF", "IN", "BooleanLiteral", "NULL", "LBRACE",
58+
"RBRACE", "ASSIGN", "StringLiteralChar", "Identifier", "WS", "COMMENT",
59+
"LINE_COMMENT", "NEWLINE", "LetterOrDigit", "Letter", "EscapeSequence",
60+
"HexDigit", "NumericLiteral", "ExponentPart", "QUOTE", "HEREDOC_START",
61+
"PLUS", "AND", "EQ", "LT", "DOUBLE_COLON", "COLON", "LBRACK", "LPAREN",
62+
"MINUS", "OR", "NEQ", "GT", "QUESTION", "RBRACK", "RPAREN", "MUL", "NOT",
63+
"LEQ", "DOT", "DIV", "GEQ", "ARROW", "COMMA", "MOD", "ELLIPSIS", "TILDE",
64+
"TEMPLATE_INTERPOLATION_START", "TemplateStringLiteral", "TemplateStringLiteralChar",
65+
"END_QUOTE", "HP_NEWLINE", "HP_WS", "HP_COMMENT", "HP_LINE_COMMENT",
66+
"HPIdentifier", "H_NEWLINE", "H_TEMPLATE_INTERPOLATION_START", "HTemplateLiteral",
6567
"HTemplateLiteralChar"
6668
};
6769
}
6870
public static final String[] ruleNames = makeRuleNames();
6971

7072
private static String[] makeLiteralNames() {
7173
return new String[] {
72-
null, null, null, "'if'", "'in'", null, "'null'", "'{'", "'}'", "'='",
73-
null, null, null, null, null, null, null, null, "'+'", "'&&'", "'=='",
74-
"'<'", "'::'", "':'", "'['", "'('", "'-'", "'||'", "'!='", "'>'", "'?'",
75-
"']'", "')'", "'*'", "'!'", "'<='", "'.'", "'/'", "'>='", "'=>'", "','",
76-
"'%'", "'...'", "'~'", null, null, null, null, null, null, null, null,
74+
null, null, null, "'if'", "'in'", null, "'null'", "'{'", "'}'", "'='",
75+
null, null, null, null, null, null, null, null, "'+'", "'&&'", "'=='",
76+
"'<'", "'::'", "':'", "'['", "'('", "'-'", "'||'", "'!='", "'>'", "'?'",
77+
"']'", "')'", "'*'", "'!'", "'<='", "'.'", "'/'", "'>='", "'=>'", "','",
78+
"'%'", "'...'", "'~'", null, null, null, null, null, null, null, null,
7779
"'\\n'"
7880
};
7981
}
8082
private static final String[] _LITERAL_NAMES = makeLiteralNames();
8183
private static String[] makeSymbolicNames() {
8284
return new String[] {
83-
null, "FOR_BRACE", "FOR_BRACK", "IF", "IN", "BooleanLiteral", "NULL",
84-
"LBRACE", "RBRACE", "ASSIGN", "Identifier", "WS", "COMMENT", "LINE_COMMENT",
85-
"NEWLINE", "NumericLiteral", "QUOTE", "HEREDOC_START", "PLUS", "AND",
86-
"EQ", "LT", "DOUBLE_COLON", "COLON", "LBRACK", "LPAREN", "MINUS", "OR",
87-
"NEQ", "GT", "QUESTION", "RBRACK", "RPAREN", "MUL", "NOT", "LEQ", "DOT",
88-
"DIV", "GEQ", "ARROW", "COMMA", "MOD", "ELLIPSIS", "TILDE", "TEMPLATE_INTERPOLATION_START",
89-
"TemplateStringLiteral", "TemplateStringLiteralChar", "HP_WS", "HP_COMMENT",
85+
null, "FOR_BRACE", "FOR_BRACK", "IF", "IN", "BooleanLiteral", "NULL",
86+
"LBRACE", "RBRACE", "ASSIGN", "Identifier", "WS", "COMMENT", "LINE_COMMENT",
87+
"NEWLINE", "NumericLiteral", "QUOTE", "HEREDOC_START", "PLUS", "AND",
88+
"EQ", "LT", "DOUBLE_COLON", "COLON", "LBRACK", "LPAREN", "MINUS", "OR",
89+
"NEQ", "GT", "QUESTION", "RBRACK", "RPAREN", "MUL", "NOT", "LEQ", "DOT",
90+
"DIV", "GEQ", "ARROW", "COMMA", "MOD", "ELLIPSIS", "TILDE", "TEMPLATE_INTERPOLATION_START",
91+
"TemplateStringLiteral", "TemplateStringLiteralChar", "HP_WS", "HP_COMMENT",
9092
"HP_LINE_COMMENT", "HTemplateLiteral", "HTemplateLiteralChar", "H_NEWLINE"
9193
};
9294
}
@@ -596,4 +598,4 @@ private boolean TemplateStringLiteralChar_sempred(RuleContext _localctx, int pre
596598
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
597599
}
598600
}
599-
}
601+
}

rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParser.java

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 the original author or authors.
2+
* Copyright 2026 the original author or authors.
33
* <p>
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// Generated from ~/git/rewrite/rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
16+
// Generated from rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
1717
package org.openrewrite.hcl.internal.grammar;
1818
import org.antlr.v4.runtime.atn.*;
1919
import org.antlr.v4.runtime.dfa.DFA;
@@ -32,63 +32,63 @@ public class HCLParser extends Parser {
3232
protected static final PredictionContextCache _sharedContextCache =
3333
new PredictionContextCache();
3434
public static final int
35-
FOR_BRACE=1, FOR_BRACK=2, IF=3, IN=4, BooleanLiteral=5, NULL=6, LBRACE=7,
36-
RBRACE=8, ASSIGN=9, Identifier=10, WS=11, COMMENT=12, LINE_COMMENT=13,
37-
NEWLINE=14, NumericLiteral=15, QUOTE=16, HEREDOC_START=17, PLUS=18, AND=19,
38-
EQ=20, LT=21, DOUBLE_COLON=22, COLON=23, LBRACK=24, LPAREN=25, MINUS=26,
39-
OR=27, NEQ=28, GT=29, QUESTION=30, RBRACK=31, RPAREN=32, MUL=33, NOT=34,
40-
LEQ=35, DOT=36, DIV=37, GEQ=38, ARROW=39, COMMA=40, MOD=41, ELLIPSIS=42,
41-
TILDE=43, TEMPLATE_INTERPOLATION_START=44, TemplateStringLiteral=45, TemplateStringLiteralChar=46,
42-
HP_WS=47, HP_COMMENT=48, HP_LINE_COMMENT=49, HTemplateLiteral=50, HTemplateLiteralChar=51,
35+
FOR_BRACE=1, FOR_BRACK=2, IF=3, IN=4, BooleanLiteral=5, NULL=6, LBRACE=7,
36+
RBRACE=8, ASSIGN=9, Identifier=10, WS=11, COMMENT=12, LINE_COMMENT=13,
37+
NEWLINE=14, NumericLiteral=15, QUOTE=16, HEREDOC_START=17, PLUS=18, AND=19,
38+
EQ=20, LT=21, DOUBLE_COLON=22, COLON=23, LBRACK=24, LPAREN=25, MINUS=26,
39+
OR=27, NEQ=28, GT=29, QUESTION=30, RBRACK=31, RPAREN=32, MUL=33, NOT=34,
40+
LEQ=35, DOT=36, DIV=37, GEQ=38, ARROW=39, COMMA=40, MOD=41, ELLIPSIS=42,
41+
TILDE=43, TEMPLATE_INTERPOLATION_START=44, TemplateStringLiteral=45, TemplateStringLiteralChar=46,
42+
HP_WS=47, HP_COMMENT=48, HP_LINE_COMMENT=49, HTemplateLiteral=50, HTemplateLiteralChar=51,
4343
H_NEWLINE=52;
4444
public static final int
45-
RULE_configFile = 0, RULE_body = 1, RULE_bodyContent = 2, RULE_attribute = 3,
46-
RULE_block = 4, RULE_blockLabel = 5, RULE_expression = 6, RULE_exprTerm = 7,
47-
RULE_blockExpr = 8, RULE_literalValue = 9, RULE_collectionValue = 10,
48-
RULE_tuple = 11, RULE_object = 12, RULE_objectelem = 13, RULE_qualifiedIdentifier = 14,
49-
RULE_forExpr = 15, RULE_forTupleExpr = 16, RULE_forObjectExpr = 17, RULE_forIntro = 18,
50-
RULE_forCond = 19, RULE_variableExpr = 20, RULE_functionCall = 21, RULE_functionName = 22,
51-
RULE_arguments = 23, RULE_index = 24, RULE_getAttr = 25, RULE_legacyIndexAttr = 26,
52-
RULE_splat = 27, RULE_attrSplat = 28, RULE_fullSplat = 29, RULE_operation = 30,
53-
RULE_unaryOp = 31, RULE_binaryOp = 32, RULE_binaryOperator = 33, RULE_compareOperator = 34,
54-
RULE_arithmeticOperator = 35, RULE_logicOperator = 36, RULE_templateExpr = 37,
55-
RULE_heredocTemplatePart = 38, RULE_heredocLiteral = 39, RULE_quotedTemplatePart = 40,
45+
RULE_configFile = 0, RULE_body = 1, RULE_bodyContent = 2, RULE_attribute = 3,
46+
RULE_block = 4, RULE_blockLabel = 5, RULE_expression = 6, RULE_exprTerm = 7,
47+
RULE_blockExpr = 8, RULE_literalValue = 9, RULE_collectionValue = 10,
48+
RULE_tuple = 11, RULE_object = 12, RULE_objectelem = 13, RULE_qualifiedIdentifier = 14,
49+
RULE_forExpr = 15, RULE_forTupleExpr = 16, RULE_forObjectExpr = 17, RULE_forIntro = 18,
50+
RULE_forCond = 19, RULE_variableExpr = 20, RULE_functionCall = 21, RULE_functionName = 22,
51+
RULE_arguments = 23, RULE_index = 24, RULE_getAttr = 25, RULE_legacyIndexAttr = 26,
52+
RULE_splat = 27, RULE_attrSplat = 28, RULE_fullSplat = 29, RULE_operation = 30,
53+
RULE_unaryOp = 31, RULE_binaryOp = 32, RULE_binaryOperator = 33, RULE_compareOperator = 34,
54+
RULE_arithmeticOperator = 35, RULE_logicOperator = 36, RULE_templateExpr = 37,
55+
RULE_heredocTemplatePart = 38, RULE_heredocLiteral = 39, RULE_quotedTemplatePart = 40,
5656
RULE_stringLiteral = 41, RULE_templateInterpolation = 42;
5757
private static String[] makeRuleNames() {
5858
return new String[] {
59-
"configFile", "body", "bodyContent", "attribute", "block", "blockLabel",
60-
"expression", "exprTerm", "blockExpr", "literalValue", "collectionValue",
61-
"tuple", "object", "objectelem", "qualifiedIdentifier", "forExpr", "forTupleExpr",
62-
"forObjectExpr", "forIntro", "forCond", "variableExpr", "functionCall",
63-
"functionName", "arguments", "index", "getAttr", "legacyIndexAttr", "splat",
64-
"attrSplat", "fullSplat", "operation", "unaryOp", "binaryOp", "binaryOperator",
65-
"compareOperator", "arithmeticOperator", "logicOperator", "templateExpr",
66-
"heredocTemplatePart", "heredocLiteral", "quotedTemplatePart", "stringLiteral",
59+
"configFile", "body", "bodyContent", "attribute", "block", "blockLabel",
60+
"expression", "exprTerm", "blockExpr", "literalValue", "collectionValue",
61+
"tuple", "object", "objectelem", "qualifiedIdentifier", "forExpr", "forTupleExpr",
62+
"forObjectExpr", "forIntro", "forCond", "variableExpr", "functionCall",
63+
"functionName", "arguments", "index", "getAttr", "legacyIndexAttr", "splat",
64+
"attrSplat", "fullSplat", "operation", "unaryOp", "binaryOp", "binaryOperator",
65+
"compareOperator", "arithmeticOperator", "logicOperator", "templateExpr",
66+
"heredocTemplatePart", "heredocLiteral", "quotedTemplatePart", "stringLiteral",
6767
"templateInterpolation"
6868
};
6969
}
7070
public static final String[] ruleNames = makeRuleNames();
7171

7272
private static String[] makeLiteralNames() {
7373
return new String[] {
74-
null, null, null, "'if'", "'in'", null, "'null'", "'{'", "'}'", "'='",
75-
null, null, null, null, null, null, null, null, "'+'", "'&&'", "'=='",
76-
"'<'", "'::'", "':'", "'['", "'('", "'-'", "'||'", "'!='", "'>'", "'?'",
77-
"']'", "')'", "'*'", "'!'", "'<='", "'.'", "'/'", "'>='", "'=>'", "','",
78-
"'%'", "'...'", "'~'", null, null, null, null, null, null, null, null,
74+
null, null, null, "'if'", "'in'", null, "'null'", "'{'", "'}'", "'='",
75+
null, null, null, null, null, null, null, null, "'+'", "'&&'", "'=='",
76+
"'<'", "'::'", "':'", "'['", "'('", "'-'", "'||'", "'!='", "'>'", "'?'",
77+
"']'", "')'", "'*'", "'!'", "'<='", "'.'", "'/'", "'>='", "'=>'", "','",
78+
"'%'", "'...'", "'~'", null, null, null, null, null, null, null, null,
7979
"'\\n'"
8080
};
8181
}
8282
private static final String[] _LITERAL_NAMES = makeLiteralNames();
8383
private static String[] makeSymbolicNames() {
8484
return new String[] {
85-
null, "FOR_BRACE", "FOR_BRACK", "IF", "IN", "BooleanLiteral", "NULL",
86-
"LBRACE", "RBRACE", "ASSIGN", "Identifier", "WS", "COMMENT", "LINE_COMMENT",
87-
"NEWLINE", "NumericLiteral", "QUOTE", "HEREDOC_START", "PLUS", "AND",
88-
"EQ", "LT", "DOUBLE_COLON", "COLON", "LBRACK", "LPAREN", "MINUS", "OR",
89-
"NEQ", "GT", "QUESTION", "RBRACK", "RPAREN", "MUL", "NOT", "LEQ", "DOT",
90-
"DIV", "GEQ", "ARROW", "COMMA", "MOD", "ELLIPSIS", "TILDE", "TEMPLATE_INTERPOLATION_START",
91-
"TemplateStringLiteral", "TemplateStringLiteralChar", "HP_WS", "HP_COMMENT",
85+
null, "FOR_BRACE", "FOR_BRACK", "IF", "IN", "BooleanLiteral", "NULL",
86+
"LBRACE", "RBRACE", "ASSIGN", "Identifier", "WS", "COMMENT", "LINE_COMMENT",
87+
"NEWLINE", "NumericLiteral", "QUOTE", "HEREDOC_START", "PLUS", "AND",
88+
"EQ", "LT", "DOUBLE_COLON", "COLON", "LBRACK", "LPAREN", "MINUS", "OR",
89+
"NEQ", "GT", "QUESTION", "RBRACK", "RPAREN", "MUL", "NOT", "LEQ", "DOT",
90+
"DIV", "GEQ", "ARROW", "COMMA", "MOD", "ELLIPSIS", "TILDE", "TEMPLATE_INTERPOLATION_START",
91+
"TemplateStringLiteral", "TemplateStringLiteralChar", "HP_WS", "HP_COMMENT",
9292
"HP_LINE_COMMENT", "HTemplateLiteral", "HTemplateLiteralChar", "H_NEWLINE"
9393
};
9494
}
@@ -515,7 +515,7 @@ public ExpressionContext(ParserRuleContext parent, int invokingState) {
515515
super(parent, invokingState);
516516
}
517517
@Override public int getRuleIndex() { return RULE_expression; }
518-
518+
519519
public ExpressionContext() { }
520520
public void copyFrom(ExpressionContext ctx) {
521521
super.copyFrom(ctx);
@@ -648,7 +648,7 @@ private ExpressionContext expression(int _p) throws RecognitionException {
648648
setState(127);
649649
expression(2);
650650
}
651-
}
651+
}
652652
}
653653
setState(133);
654654
_errHandler.sync(this);
@@ -673,7 +673,7 @@ public ExprTermContext(ParserRuleContext parent, int invokingState) {
673673
super(parent, invokingState);
674674
}
675675
@Override public int getRuleIndex() { return RULE_exprTerm; }
676-
676+
677677
public ExprTermContext() { }
678678
public void copyFrom(ExprTermContext ctx) {
679679
super.copyFrom(ctx);
@@ -1054,7 +1054,7 @@ private ExprTermContext exprTerm(int _p) throws RecognitionException {
10541054
}
10551055
break;
10561056
}
1057-
}
1057+
}
10581058
}
10591059
setState(159);
10601060
_errHandler.sync(this);
@@ -1303,7 +1303,7 @@ public final TupleContext tuple() throws RecognitionException {
13031303
setState(173);
13041304
expression(0);
13051305
}
1306-
}
1306+
}
13071307
}
13081308
setState(178);
13091309
_errHandler.sync(this);
@@ -2186,7 +2186,7 @@ public final ArgumentsContext arguments() throws RecognitionException {
21862186
setState(282);
21872187
expression(0);
21882188
}
2189-
}
2189+
}
21902190
}
21912191
setState(287);
21922192
_errHandler.sync(this);
@@ -2479,7 +2479,7 @@ public final AttrSplatContext attrSplat() throws RecognitionException {
24792479
setState(307);
24802480
getAttr();
24812481
}
2482-
}
2482+
}
24832483
}
24842484
setState(312);
24852485
_errHandler.sync(this);
@@ -2571,7 +2571,7 @@ public final FullSplatContext fullSplat() throws RecognitionException {
25712571
default:
25722572
throw new NoViableAltException(this);
25732573
}
2574-
}
2574+
}
25752575
}
25762576
setState(322);
25772577
_errHandler.sync(this);
@@ -3066,7 +3066,7 @@ public TemplateExprContext(ParserRuleContext parent, int invokingState) {
30663066
super(parent, invokingState);
30673067
}
30683068
@Override public int getRuleIndex() { return RULE_templateExpr; }
3069-
3069+
30703070
public TemplateExprContext() { }
30713071
public void copyFrom(TemplateExprContext ctx) {
30723072
super.copyFrom(ctx);
@@ -3148,7 +3148,7 @@ public final TemplateExprContext templateExpr() throws RecognitionException {
31483148
match(HEREDOC_START);
31493149
setState(351);
31503150
match(Identifier);
3151-
setState(359);
3151+
setState(359);
31523152
_errHandler.sync(this);
31533153
_la = _input.LA(1);
31543154
do {
@@ -3172,7 +3172,7 @@ public final TemplateExprContext templateExpr() throws RecognitionException {
31723172
}
31733173
}
31743174
}
3175-
setState(361);
3175+
setState(361);
31763176
_errHandler.sync(this);
31773177
_la = _input.LA(1);
31783178
} while ( _la==NEWLINE );
@@ -3768,4 +3768,4 @@ private boolean exprTerm_sempred(ExprTermContext _localctx, int predIndex) {
37683768
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
37693769
}
37703770
}
3771-
}
3771+
}

rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParserBaseListener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 the original author or authors.
2+
* Copyright 2026 the original author or authors.
33
* <p>
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// Generated from ~/git/rewrite/rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
16+
// Generated from rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
1717
package org.openrewrite.hcl.internal.grammar;
1818

1919
import org.antlr.v4.runtime.ParserRuleContext;
@@ -724,4 +724,4 @@ public class HCLParserBaseListener implements HCLParserListener {
724724
* <p>The default implementation does nothing.</p>
725725
*/
726726
@Override public void visitErrorNode(ErrorNode node) { }
727-
}
727+
}

0 commit comments

Comments
 (0)