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

Side by Side Diff: pkg/compiler/lib/src/parser/class_element_parser.dart

Issue 1313073007: Move parser and token related libraries into their own subfolder. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix unittests and try Created 5 years, 3 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
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.parser.classes; 5 library dart2js.parser.classes;
6 6
7 import '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../diagnostics/diagnostic_listener.dart' show 9 import '../diagnostics/diagnostic_listener.dart' show
10 DiagnosticListener; 10 DiagnosticListener;
11 import '../diagnostics/messages.dart' show 11 import '../diagnostics/messages.dart' show
12 MessageKind; 12 MessageKind;
13 import '../diagnostics/invariant.dart' show 13 import '../diagnostics/invariant.dart' show
14 invariant; 14 invariant;
15 import '../elements/elements.dart' show 15 import '../elements/elements.dart' show
16 CompilationUnitElement, 16 CompilationUnitElement,
17 Element, 17 Element,
18 ElementKind, 18 ElementKind,
19 Elements, 19 Elements,
20 MetadataAnnotation, 20 MetadataAnnotation,
21 STATE_NOT_STARTED, 21 STATE_NOT_STARTED,
22 STATE_DONE; 22 STATE_DONE;
23 import '../elements/modelx.dart' show 23 import '../elements/modelx.dart' show
24 ClassElementX, 24 ClassElementX,
25 ElementX, 25 ElementX,
26 FieldElementX, 26 FieldElementX,
27 VariableList; 27 VariableList;
28 import '../elements/visitor.dart' show 28 import '../elements/visitor.dart' show
29 ElementVisitor; 29 ElementVisitor;
30 import '../tokens/token.dart' show
31 Token;
30 import '../tree/tree.dart'; 32 import '../tree/tree.dart';
31 import '../util/util.dart' show 33 import '../util/util.dart' show
32 Link; 34 Link;
33 35
34 import 'listener.dart' show 36 import 'listener.dart' show
35 Listener, 37 Listener,
36 NodeListener, 38 NodeListener,
37 ParserError, 39 ParserError,
38 PartialConstructorElement, 40 PartialConstructorElement,
39 PartialElement, 41 PartialElement,
40 PartialFunctionElement, 42 PartialFunctionElement,
41 PartialMetadataAnnotation; 43 PartialMetadataAnnotation;
42 import 'parser.dart' show 44 import 'parser.dart' show
43 Parser; 45 Parser;
44 import 'partial_parser.dart' show 46 import 'partial_parser.dart' show
45 PartialParser; 47 PartialParser;
46 import 'token.dart' show
47 Token;
48 48
49 class ClassElementParser extends PartialParser { 49 class ClassElementParser extends PartialParser {
50 ClassElementParser(Listener listener) : super(listener); 50 ClassElementParser(Listener listener) : super(listener);
51 51
52 Token parseClassBody(Token token) => fullParseClassBody(token); 52 Token parseClassBody(Token token) => fullParseClassBody(token);
53 } 53 }
54 54
55 class PartialClassElement extends ClassElementX with PartialElement { 55 class PartialClassElement extends ClassElementX with PartialElement {
56 ClassNode cachedNode; 56 ClassNode cachedNode;
57 57
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) { 278 void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
279 popNode(); // Discard arguments. 279 popNode(); // Discard arguments.
280 if (periodBeforeName != null) { 280 if (periodBeforeName != null) {
281 popNode(); // Discard name. 281 popNode(); // Discard name.
282 } 282 }
283 popNode(); // Discard node (Send or Identifier). 283 popNode(); // Discard node (Send or Identifier).
284 pushMetadata(new PartialMetadataAnnotation(beginToken, endToken)); 284 pushMetadata(new PartialMetadataAnnotation(beginToken, endToken));
285 } 285 }
286 } 286 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/native.dart ('k') | pkg/compiler/lib/src/parser/diet_parser_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698