blob: 54cc86515f0bf2c4165caec4a6a82a5520c3e13a [file] [log] [blame]
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import '../ast.dart';
import '../block_parser.dart';
import '../patterns.dart';
import 'block_syntax.dart';
class EmptyBlockSyntax extends BlockSyntax {
@override
RegExp get pattern => emptyPattern;
const EmptyBlockSyntax();
@override
Node? parse(BlockParser parser) {
parser.encounteredBlankLine = true;
parser.advance();
// Don't actually emit anything.
return null;
}
}