FuncDec constructor

FuncDec(
  1. TypeNode returnType,
  2. IdentifierNode identifier,
  3. ParameterList params,
  4. BlockNode block,
)

Constructs a function declaration with all its components.

Parameters:

  • returnType: The function's return type (int, float, or void)
  • identifier: The function name
  • params: The parameter list
  • block: The function body block

Implementation

FuncDec(TypeNode returnType, IdentifierNode identifier,ParameterList params, BlockNode block)
    : super(null, [returnType, identifier, params, block]);