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

Side by Side Diff: tests/language/src/PseudoKWTest.dart

Issue 8968021: One small step towards sanity (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « runtime/vm/token.h ('k') | no next file » | 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 // Check that we can use pseudo keywords as names in function level code. 4 // Check that we can use pseudo keywords as names in function level code.
5 5
6 6
7 class PseudoKWTest { 7 class PseudoKWTest {
8 static testMain() { 8 static testMain() {
9 9
10 // This list is taken from the 'identifier' production 10 // This list is taken from the 'identifier' production
11 // of the Dart grammar. It lists all the pseudo-keywords 11 // of the Dart grammar. It lists all the pseudo-keywords
12 // that are legal identifiers at the function level. 12 // that are legal identifiers at the function level.
13 13
14 var abstract = 0; 14 var abstract = 0;
15 var class = 0;
16 var extends = 0;
srdjan 2011/12/16 19:03:58 How about adding failing tests for using class and
hausner 2011/12/16 19:15:36 I think that's a good idea once we have exact sema
17 var factory = 0; 15 var factory = 0;
18 var get = 0; 16 var get = 0;
19 var implements = 0; 17 var implements = 0;
20 var import = 0; 18 var import = 0;
21 var interface = 0; 19 var interface = 0;
22 var library = 0; 20 var library = 0;
23 var native = 0; 21 var native = 0;
24 var negate = 0; 22 var negate = 0;
25 var operator = 0; 23 var operator = 0;
26 var set = 0; 24 var set = 0;
27 var source = 0; 25 var source = 0;
28 var static = 0; 26 var static = 0;
29 { 27 {
30 void factory(set) { 28 void factory(set) {
31 return 0; 29 return 0;
32 } 30 }
33 } 31 }
34 32
35 get: while (extends > 0) { 33 get: while (import > 0) {
36 break get; 34 break get;
37 } 35 }
38 36
39 return static + library * class; 37 return static + library * operator;
40 } 38 }
41 } 39 }
42 40
43 41
44 main() { 42 main() {
45 PseudoKWTest.testMain(); 43 PseudoKWTest.testMain();
46 } 44 }
OLDNEW
« no previous file with comments | « runtime/vm/token.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698