visitParamDecl method

  1. @override
String visitParamDecl(
  1. ParamDecl stmt
)
override

Implementation

@override
String visitParamDecl(ParamDecl stmt) {
  final output = StringBuffer();
  output.write(stmt.id.id);
  if (stmt.declType != null) {
    final typeString = formatAST(stmt.declType!);
    output.write('${_lexicon.typeIndicator} $typeString');
  }
  if (stmt.initializer != null) {
    final initString = formatAST(stmt.initializer!);
    output.write(' ${_lexicon.assign} $initString');
  }
  return output.toString();
}