@@ -21,7 +21,6 @@ private import internal.Parameter
2121private import internal.Parameters
2222private import internal.ParameterDeclaration
2323private import internal.OutputDeclaration
24- private import internal.UserDefinedFunction
2524// CFG
2625private import codeql.bicep.CFG
2726private import codeql.bicep.controlflow.internal.ControlFlowGraphImpl as CfgImpl
@@ -262,78 +261,6 @@ class OutputDeclaration extends Stmts instanceof OutputDeclarationImpl {
262261 Expr getValue ( ) { result = OutputDeclarationImpl .super .getValue ( ) }
263262}
264263
265- /**
266- * Represents a user-defined function in the AST.
267- *
268- * User-defined functions allow creating reusable pieces of logic in Bicep templates.
269- * They encapsulate calculations or transformations that can be called from multiple
270- * places in the template, promoting code reuse and maintainability.
271- */
272- class UserDefinedFunction extends Stmts instanceof UserDefinedFunctionImpl {
273- /**
274- * Gets the identifier of the user-defined function.
275- *
276- * This is the name token of the function as it appears in the source code.
277- *
278- * @return The identifier node of the function
279- */
280- Identifier getIdentifier ( ) { result = UserDefinedFunctionImpl .super .getName ( ) }
281-
282- /**
283- * Gets the name of the user-defined function as a string.
284- *
285- * This is a convenience method that returns the name from the identifier.
286- *
287- * @return The name of the function
288- */
289- string getName ( ) { result = this .getIdentifier ( ) .getName ( ) }
290-
291- /**
292- * Gets the return type of the user-defined function.
293- *
294- * This specifies what kind of value the function returns,
295- * such as 'string', 'int', 'bool', or more complex types.
296- *
297- * @return The return type node of the function
298- */
299- Type getReturnType ( ) { result = UserDefinedFunctionImpl .super .getReturnType ( ) }
300-
301- /**
302- * Gets the declared parameters node of the user-defined function.
303- *
304- * This contains all the parameter declarations for the function.
305- *
306- * @return The parameters node of the function
307- */
308- Parameters getDeclaredParameters ( ) { result = UserDefinedFunctionImpl .super .getParameters ( ) }
309-
310- /**
311- * Gets all individual parameters of the user-defined function.
312- *
313- * @return All parameter nodes of the function
314- */
315- Parameter getParameters ( ) { result = this .getDeclaredParameters ( ) .getParameter ( _) }
316-
317- /**
318- * Gets the parameter at the specified index.
319- *
320- * @param index The index of the parameter to retrieve
321- * @return The parameter at the specified index
322- */
323- Parameter getParameter ( int index ) { result = this .getDeclaredParameters ( ) .getParameter ( index ) }
324-
325- /**
326- * Gets the body of the user-defined function.
327- *
328- * This is the expression that defines the computation performed by the function.
329- * When the function is called, this expression is evaluated with the provided
330- * argument values bound to the function parameters.
331- *
332- * @return The body expression of the function
333- */
334- Expr getBody ( ) { result = UserDefinedFunctionImpl .super .getBody ( ) }
335- }
336-
337264/**
338265 * Represents a function parameter node in the AST.
339266 *
0 commit comments