@@ -6,6 +6,7 @@ private import AstNodes
66private import internal.AstNodes
77private import internal.TreeSitter
88private import internal.Expr
9+ private import internal.Arguments
910private import internal.AssignmentExpression
1011private import internal.BinaryExpression
1112private import internal.Expression
@@ -29,7 +30,31 @@ private import Resources
2930 * Expressions can be nested and can appear in various contexts such as assignments,
3031 * parameter values, and return statements.
3132 */
32- final class Expr extends AstNode instanceof ExprImpl { }
33+ class Expr extends AstNode instanceof ExprImpl { }
34+
35+ /**
36+ * Represents a collection of arguments in a function call.
37+ *
38+ * This class models the set of arguments passed to a function, allowing
39+ * access to individual arguments by index or to the complete set of arguments.
40+ * Arguments are expressions that are passed to a function or method call.
41+ */
42+ class Arguments extends Expr instanceof ArgumentsImpl {
43+ /**
44+ * Gets the argument at the specified index.
45+ *
46+ * @param index The zero-based index of the argument to retrieve
47+ * @return The expression node of the argument at the specified index
48+ */
49+ Expr getArgument ( int index ) { result = ArgumentsImpl .super .getArgument ( index ) }
50+
51+ /**
52+ * Gets all arguments in the collection.
53+ *
54+ * @return All argument expressions in this arguments collection
55+ */
56+ Expr getArguments ( ) { result = ArgumentsImpl .super .getArguments ( ) }
57+ }
3358
3459/**
3560 * An assignment expression in the AST.
@@ -94,7 +119,7 @@ class BinaryExpression extends Expr instanceof BinaryExpressionImpl {
94119 * specific expression categories. It serves as a base implementation for
95120 * expressions in the Bicep language.
96121 */
97- final class Expression extends Expr instanceof ExpressionImpl { }
122+ class Expression extends Expr instanceof ExpressionImpl { }
98123
99124/**
100125 * An interpolation expression in the AST.
@@ -103,7 +128,7 @@ final class Expression extends Expr instanceof ExpressionImpl { }
103128 * string literals. Interpolations allow embedding dynamic values or expressions
104129 * within string literals.
105130 */
106- final class Interpolation extends Expr instanceof InterpolationImpl {
131+ class Interpolation extends Expr instanceof InterpolationImpl {
107132 /**
108133 * Gets the expression contained within the interpolation.
109134 *
@@ -131,7 +156,7 @@ final class Interpolation extends Expr instanceof InterpolationImpl {
131156 * filters, or other functional programming patterns. A lambda expression
132157 * consists of parameters and a body that defines the computation to be performed.
133158 */
134- final class LambdaExpression extends Expr instanceof LambdaExpressionImpl { }
159+ class LambdaExpression extends Expr instanceof LambdaExpressionImpl { }
135160
136161/**
137162 * A member expression in the AST.
@@ -171,7 +196,7 @@ class MemberExpression extends Expr instanceof MemberExpressionImpl {
171196 *
172197 * This alias provides a shorter name for convenience.
173198 */
174- final class MemberExpr = MemberExpression ;
199+ class MemberExpr = MemberExpression ;
175200
176201/**
177202 * A nullable type expression in the AST.
@@ -180,7 +205,7 @@ final class MemberExpr = MemberExpression;
180205 * after the type name (e.g., `string?`). Nullable types explicitly allow
181206 * the value to be null in addition to values of the underlying type.
182207 */
183- final class NullableType extends Expr instanceof NullableTypeImpl { }
208+ class NullableType extends Expr instanceof NullableTypeImpl { }
184209
185210/**
186211 * A parenthesized expression in the AST.
@@ -219,7 +244,7 @@ class ParenthesizedExpression extends Expr instanceof ParenthesizedExpressionImp
219244 * identifier, or other fundamental expression type. Primary expressions
220245 * serve as the building blocks for more complex expressions.
221246 */
222- final class PrimaryExpression extends Expr instanceof PrimaryExpressionImpl { }
247+ class PrimaryExpression extends Expr instanceof PrimaryExpressionImpl { }
223248
224249/**
225250 * A resource expression in the AST.
@@ -228,7 +253,7 @@ final class PrimaryExpression extends Expr instanceof PrimaryExpressionImpl { }
228253 * Resource expressions are fundamental to Bicep as they define the
229254 * infrastructure resources to be provisioned.
230255 */
231- final class ResourceExpression extends Expr instanceof ResourceExpressionImpl { }
256+ class ResourceExpression extends Expr instanceof ResourceExpressionImpl { }
232257
233258/**
234259 * A ternary expression in the AST.
@@ -237,7 +262,7 @@ final class ResourceExpression extends Expr instanceof ResourceExpressionImpl {
237262 * The expression evaluates the condition and returns one of two values based on whether
238263 * the condition is true or false.
239264 */
240- final class TernaryExpression extends Expr instanceof TernaryExpressionImpl { }
265+ class TernaryExpression extends Expr instanceof TernaryExpressionImpl { }
241266
242267/**
243268 * A unary expression in the AST.
@@ -246,4 +271,4 @@ final class TernaryExpression extends Expr instanceof TernaryExpressionImpl { }
246271 * Examples include negation (`!expr`), numeric negation (`-expr`),
247272 * and other operations that apply to a single value.
248273 */
249- final class UnaryExpression extends Expr instanceof UnaryExpressionImpl { }
274+ class UnaryExpression extends Expr instanceof UnaryExpressionImpl { }
0 commit comments