visitDeclarationGroup method

  1. @override
void visitDeclarationGroup(
  1. DeclarationGroup node
)
override

Implementation

@override
void visitDeclarationGroup(DeclarationGroup node) {
  var declarations = node.declarations;
  var declarationsLength = declarations.length;
  for (var i = 0; i < declarationsLength; i++) {
    if (i > 0) emit(_newLine);
    emit('$_sp$_sp');
    declarations[i].visit(this);
    // Don't emit the last semicolon in compact mode.
    if (prettyPrint || i < declarationsLength - 1) {
      emit(';');
    }
  }
  if (declarationsLength > 0) emit(_newLine);
}