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

Side by Side Diff: dart/frog/tests/leg/src/ResolverTest.dart

Issue 9004025: Parse field modifiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleaned up for commit Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « dart/frog/leg/tree/nodes.dart ('k') | dart/tests/language/language-leg.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import("../../../leg/leg.dart"); 5 #import("../../../leg/leg.dart");
6 #import("../../../leg/elements/elements.dart"); 6 #import("../../../leg/elements/elements.dart");
7 #import("../../../leg/tree/tree.dart"); 7 #import("../../../leg/tree/tree.dart");
8 #import("../../../leg/util/util.dart"); 8 #import("../../../leg/util/util.dart");
9 #import("mock_compiler.dart"); 9 #import("mock_compiler.dart");
10 #import("parser_helper.dart"); 10 #import("parser_helper.dart");
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 compiler.parseScript("var b, c;"); 367 compiler.parseScript("var b, c;");
368 Element bElement = compiler.universe.find(buildSourceString("b")); 368 Element bElement = compiler.universe.find(buildSourceString("b"));
369 Element cElement = compiler.universe.find(buildSourceString("c")); 369 Element cElement = compiler.universe.find(buildSourceString("c"));
370 Expect.equals(ElementKind.FIELD, bElement.kind); 370 Expect.equals(ElementKind.FIELD, bElement.kind);
371 Expect.equals(ElementKind.FIELD, cElement.kind); 371 Expect.equals(ElementKind.FIELD, cElement.kind);
372 Expect.isTrue(bElement != cElement); 372 Expect.isTrue(bElement != cElement);
373 373
374 VariableDefinitions bNode = bElement.parseNode(compiler, compiler); 374 VariableDefinitions bNode = bElement.parseNode(compiler, compiler);
375 VariableDefinitions cNode = cElement.parseNode(compiler, compiler); 375 VariableDefinitions cNode = cElement.parseNode(compiler, compiler);
376 Expect.equals(bNode, cNode); 376 Expect.equals(bNode, cNode);
377 Expect.equals(bNode.type.typeName.source.stringValue, 'var'); 377 Expect.isNull(bNode.type);
378 Expect.isTrue(bNode.modifiers.isVar());
378 } 379 }
379 380
380 length(Link link) => link.isEmpty() ? 0 : length(link.tail) + 1; 381 length(Link link) => link.isEmpty() ? 0 : length(link.tail) + 1;
381 382
382 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1); 383 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1);
OLDNEW
« no previous file with comments | « dart/frog/leg/tree/nodes.dart ('k') | dart/tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698