Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: pkg/front_end/lib/src/fasta/parser/dart2js_native.dart

Issue 2832353002: Add support for building patched_sdk and platform.dill for dart2js: (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
ahe 2017/04/27 13:34:34 Can this live in package:compiler somehow?
Siggi Cherem (dart-lang) 2017/04/28 21:37:20 Done.
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// Implements support for Dart2js native method bodies of this form:
6 ///
7 /// methodDeclaration() native;
8 ///
9 /// This support is kept separate from parser.dart as this isn't specified in
10 /// the Dart Language Specification, we hope to remove this syntax and replace
11 /// it with the external modifier.
12 library fasta.parser.dart2js_native;
13
14 import '../scanner/token.dart' show Token;
15
16 import 'parser.dart' show optional;
17
18 /// When parsing a Dart2js library file, we may encounter a native clause
19 /// instead of a function body. This method skips such a clause.
20 ///
21 /// This method is designed to be called when encountering
22 /// [ErrorKind.ExpectedBlockToSkip] in [Listener.handleUnrecoverableError].
23 Token skipDart2jsNativeClause(Token token) {
24 if (!optional("native", token)) return null;
25 if (!optional(";", token.next)) return null;
26 return token;
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698