Correct symbol_reserved_word_test.dart, splitting it into two tests.

Also add one new test symbol_arbitrary_string_test.dart.

Change-Id: I12b07218a098a37b83d99525d2be3ec356ef1fd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195503
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
Erik Ernst 2021-06-01 15:55:03 +00:00 committed by commit-bot@chromium.org
parent 8eba520115
commit e4647026a1
3 changed files with 831 additions and 109 deletions

View file

@ -0,0 +1,111 @@
// Copyright (c) 2021, 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.
// Note that this library violates the formatting provided by `dartfmt` in
// a few locations, to verify that `"""...""""z"` can be parsed as two
// consecutive strings, `dartfmt` will insert whitespace before `"z"`.
import 'package:expect/expect.dart';
main() {
const string = "X";
const integer = 42;
const boolean = true;
const none = null;
var s00 = new Symbol('');
var s01 = new Symbol(r'@!#$%^&*(()\\|_-][');
var s02 = new Symbol('\x00');
var s03 = new Symbol('a');
var s04 = new Symbol('ab');
var s05 = new Symbol('\x80');
var s06 = new Symbol('\xff');
var s07 = new Symbol('\u2028');
var s08 = new Symbol('abcdef\u2028');
var s09 = new Symbol('\u{10002}');
var s10 = new Symbol('\ud800');
var s11 = new Symbol('\udfff');
var s12 = new Symbol('\u{10FFFF}');
var s13 = new Symbol('abcdef\u{10002}');
var s14 = new Symbol('🇺🇸 😊 🇩🇰');
var s15 = new Symbol('\udc00');
// The multi-line string below is "abcd\ne:X42truenullz".
var s16 = new Symbol("""
a${"b" // line break
"c"}d
e:$string$integer$boolean$none""""z");
Expect.isTrue(s00 == new Symbol(''));
Expect.isTrue(s01 == new Symbol(r'@!#$%^&*(()\\|_-]['));
Expect.isTrue(s02 == new Symbol('\x00'));
Expect.isTrue(s03 == new Symbol('a'));
Expect.isTrue(s04 == new Symbol('ab'));
Expect.isTrue(s05 == new Symbol('\x80'));
Expect.isTrue(s06 == new Symbol('\xff'));
Expect.isTrue(s07 == new Symbol('\u2028'));
Expect.isTrue(s08 == new Symbol('abcdef\u2028'));
Expect.isTrue(s09 == new Symbol('\u{10002}'));
Expect.isTrue(s10 == new Symbol('\ud800'));
Expect.isTrue(s11 == new Symbol('\udfff'));
Expect.isTrue(s12 == new Symbol('\u{10FFFF}'));
Expect.isTrue(s13 == new Symbol('abcdef\u{10002}'));
Expect.isTrue(s14 == new Symbol('🇺🇸 😊 🇩🇰'));
Expect.isTrue(s15 == new Symbol('\udc00'));
// The multi-line string below is "abcd\ne:X42truenullz".
Expect.isTrue(s16 ==
new Symbol("""
a${"b" // line break
"c"}d
e:$string$integer$boolean$none""""z"));
const s00c = const Symbol('');
const s01c = const Symbol(r'@!#$%^&*(()\\|_-][');
const s02c = const Symbol('\x00');
const s03c = const Symbol('a');
const s04c = const Symbol('ab');
const s05c = const Symbol('\x80');
const s06c = const Symbol('\xff');
const s07c = const Symbol('\u2028');
const s08c = const Symbol('abcdef\u2028');
const s09c = const Symbol('\u{10002}');
const s10c = const Symbol('\ud800');
const s11c = const Symbol('\udfff');
const s12c = const Symbol('\u{10FFFF}');
const s13c = const Symbol('abcdef\u{10002}');
const s14c = const Symbol('🇺🇸 😊 🇩🇰');
const s15c = const Symbol('\udc00');
// The multi-line string below is "abcd\ne:X42truenullz".
const s16c = const Symbol("""
a${"b" // line break
"c"}d
e:$string$integer$boolean$none""""z");
Expect.isTrue(identical(s00c, const Symbol('')));
Expect.isTrue(identical(s01c, const Symbol(r'@!#$%^&*(()\\|_-][')));
Expect.isTrue(identical(s02c, const Symbol('\x00')));
Expect.isTrue(identical(s03c, const Symbol('a')));
Expect.isTrue(identical(s04c, const Symbol('ab')));
Expect.isTrue(identical(s05c, const Symbol('\x80')));
Expect.isTrue(identical(s06c, const Symbol('\xff')));
Expect.isTrue(identical(s07c, const Symbol('\u2028')));
Expect.isTrue(identical(s08c, const Symbol('abcdef\u2028')));
Expect.isTrue(identical(s09c, const Symbol('\u{10002}')));
Expect.isTrue(identical(s10c, const Symbol('\ud800')));
Expect.isTrue(identical(s11c, const Symbol('\udfff')));
Expect.isTrue(identical(s12c, const Symbol('\u{10FFFF}')));
Expect.isTrue(identical(s13c, const Symbol('abcdef\u{10002}')));
Expect.isTrue(identical(s14c, const Symbol('🇺🇸 😊 🇩🇰')));
Expect.isTrue(identical(s15c, const Symbol('\udc00')));
// The multi-line string below is "abcd\ne:X42truenullz".
Expect.isTrue(identical(
s16c,
const Symbol("""
a${"b" // line break
"c"}d
e:$string$integer$boolean$none""""z")));
}

View file

@ -0,0 +1,507 @@
// Copyright (c) 2021, 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.
main() {
// ----- 'void' is allowed as a symbol name.
#void;
const Symbol('void');
new Symbol('void');
// ----- 'void' is not allowed in a dot-separated multi-part symbol literal.
#void.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.void;
//^
// [analyzer] unspecified
// [cfe] unspecified
// ----- All other reserved words are disallowed.
#assert;
//^
// [analyzer] unspecified
// [cfe] unspecified
#break;
//^
// [analyzer] unspecified
// [cfe] unspecified
#case;
//^
// [analyzer] unspecified
// [cfe] unspecified
#catch;
//^
// [analyzer] unspecified
// [cfe] unspecified
#class;
//^
// [analyzer] unspecified
// [cfe] unspecified
#const;
//^
// [analyzer] unspecified
// [cfe] unspecified
#continue;
//^
// [analyzer] unspecified
// [cfe] unspecified
#default;
//^
// [analyzer] unspecified
// [cfe] unspecified
#do;
//^
// [analyzer] unspecified
// [cfe] unspecified
#else;
//^
// [analyzer] unspecified
// [cfe] unspecified
#enum;
//^
// [analyzer] unspecified
// [cfe] unspecified
#extends;
//^
// [analyzer] unspecified
// [cfe] unspecified
#false;
//^
// [analyzer] unspecified
// [cfe] unspecified
#final;
//^
// [analyzer] unspecified
// [cfe] unspecified
#finally;
//^
// [analyzer] unspecified
// [cfe] unspecified
#for;
//^
// [analyzer] unspecified
// [cfe] unspecified
#if;
//^
// [analyzer] unspecified
// [cfe] unspecified
#in;
//^
// [analyzer] unspecified
// [cfe] unspecified
#is;
//^
// [analyzer] unspecified
// [cfe] unspecified
#new;
//^
// [analyzer] unspecified
// [cfe] unspecified
#null;
//^
// [analyzer] unspecified
// [cfe] unspecified
#rethrow;
//^
// [analyzer] unspecified
// [cfe] unspecified
#return;
//^
// [analyzer] unspecified
// [cfe] unspecified
#super;
//^
// [analyzer] unspecified
// [cfe] unspecified
#switch;
//^
// [analyzer] unspecified
// [cfe] unspecified
#this;
//^
// [analyzer] unspecified
// [cfe] unspecified
#throw;
//^
// [analyzer] unspecified
// [cfe] unspecified
#true;
//^
// [analyzer] unspecified
// [cfe] unspecified
#try;
//^
// [analyzer] unspecified
// [cfe] unspecified
#var;
//^
// [analyzer] unspecified
// [cfe] unspecified
#while;
//^
// [analyzer] unspecified
// [cfe] unspecified
#with;
//^
// [analyzer] unspecified
// [cfe] unspecified
// ----- Reserved words also disallowed in dot-separated multi-part symbol.
#foo.assert;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.break;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.case;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.catch;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.class;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.const;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.continue;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.default;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.do;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.else;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.enum;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.extends;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.false;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.final;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.finally;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.for;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.if;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.in;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.is;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.new;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.null;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.rethrow;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.return;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.super;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.switch;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.this;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.throw;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.true;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.try;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.var;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.while;
//^
// [analyzer] unspecified
// [cfe] unspecified
#foo.with;
//^
// [analyzer] unspecified
// [cfe] unspecified
#assert.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#break.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#case.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#catch.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#class.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#const.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#continue.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#default.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#do.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#else.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#enum.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#extends.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#false.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#final.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#finally.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#for.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#if.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#in.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#is.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#new.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#null.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#rethrow.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#return.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#super.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#switch.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#this.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#throw.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#true.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#try.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#var.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#while.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
#with.foo;
//^
// [analyzer] unspecified
// [cfe] unspecified
}

View file

@ -4,121 +4,225 @@
import "package:expect/expect.dart";
void checkBadSymbol(String s) {
Expect.throwsArgumentError(() => new Symbol(s));
var b = true;
@pragma("vm:never-inline")
void checkSymbol(String string) {
// Just check that it can be created.
new Symbol(string);
// Prevent inlining.
try {} finally {}
}
main() {
var x;
// 'void' is allowed as a symbol name.
x = const Symbol('void'); // //# 01: ok
x = #void; // //# 02: ok
x = new Symbol('void'); // //# 03: ok
x = const Symbol('void');
x = #void;
x = new Symbol('void');
// However, it is not allowed as a part of a symbol name.
x = const Symbol('void.foo'); // //# 04: compile-time error
x = #void.foo; // //# 05: compile-time error
checkBadSymbol('void.foo'); // //# 06: ok
x = const Symbol('foo.void'); // //# 07: compile-time error
x = #foo.void; // //# 08: compile-time error
checkBadSymbol('foo.void'); // //# 09: ok
// 'void' can be part of a dotted symbol name, via the constructor.
checkSymbol('void.foo');
checkSymbol('foo.void');
// All other reserved words are disallowed.
x = const Symbol('assert'); // //# 10: compile-time error
x = const Symbol('break'); // //# 10: continued
x = const Symbol('case'); // //# 10: continued
x = const Symbol('catch'); // //# 10: continued
x = const Symbol('class'); // //# 10: continued
x = const Symbol('const'); // //# 10: continued
x = const Symbol('continue'); // //# 10: continued
x = const Symbol('default'); // //# 10: continued
x = const Symbol('do'); // //# 10: continued
x = const Symbol('else'); // //# 10: continued
x = const Symbol('enum'); // //# 10: continued
x = const Symbol('extends'); // //# 10: continued
x = #assert; // //# 11: compile-time error
x = const Symbol('false'); // //# 10: continued
x = const Symbol('final'); // //# 10: continued
x = const Symbol('finally'); // //# 10: continued
x = const Symbol('for'); // //# 10: continued
x = const Symbol('if'); // //# 10: continued
x = const Symbol('in'); // //# 10: continued
x = const Symbol('is'); // //# 10: continued
x = const Symbol('new'); // //# 10: continued
x = const Symbol('null'); // //# 10: continued
x = const Symbol('rethrow'); // //# 10: continued
x = const Symbol('return'); // //# 10: continued
x = const Symbol('super'); // //# 10: continued
x = const Symbol('switch'); // //# 10: continued
x = const Symbol('this'); // //# 10: continued
x = const Symbol('throw'); // //# 10: continued
x = const Symbol('true'); // //# 10: continued
x = const Symbol('try'); // //# 10: continued
x = const Symbol('var'); // //# 10: continued
x = const Symbol('while'); // //# 10: continued
x = const Symbol('with'); // //# 10: continued
x = #break; // //# 11: continued
x = #case; // //# 11: continued
x = #catch; // //# 11: continued
x = #class; // //# 11: continued
x = #const; // //# 11: continued
x = #continue; // //# 11: continued
x = #default; // //# 11: continued
x = #do; // //# 11: continued
x = #else; // //# 11: continued
x = #enum; // //# 11: continued
x = #extends; // //# 11: continued
x = #false; // //# 11: continued
x = #final; // //# 11: continued
x = #finally; // //# 11: continued
x = #for; // //# 11: continued
x = #if; // //# 11: continued
x = #in; // //# 11: continued
x = #is; // //# 11: continued
x = #new; // //# 11: continued
x = #null; // //# 11: continued
x = #rethrow; // //# 11: continued
x = #return; // //# 11: continued
x = #super; // //# 11: continued
x = #switch; // //# 11: continued
x = #this; // //# 11: continued
x = #throw; // //# 11: continued
x = #true; // //# 11: continued
x = #try; // //# 11: continued
x = #var; // //# 11: continued
x = #while; // //# 11: continued
x = #with; // //# 11: continued
checkBadSymbol('assert'); // //# 12: ok
checkBadSymbol('break'); // //# 12: continued
checkBadSymbol('case'); // //# 12: continued
checkBadSymbol('catch'); // //# 12: continued
checkBadSymbol('class'); // //# 12: continued
checkBadSymbol('const'); // //# 12: continued
checkBadSymbol('continue'); // //# 12: continued
checkBadSymbol('default'); // //# 12: continued
checkBadSymbol('do'); // //# 12: continued
checkBadSymbol('else'); // //# 12: continued
checkBadSymbol('enum'); // //# 12: continued
checkBadSymbol('extends'); // //# 12: continued
checkBadSymbol('false'); // //# 12: continued
checkBadSymbol('final'); // //# 12: continued
checkBadSymbol('finally'); // //# 12: continued
checkBadSymbol('for'); // //# 12: continued
checkBadSymbol('if'); // //# 12: continued
checkBadSymbol('in'); // //# 12: continued
checkBadSymbol('is'); // //# 12: continued
checkBadSymbol('new'); // //# 12: continued
checkBadSymbol('null'); // //# 12: continued
checkBadSymbol('rethrow'); // //# 12: continued
checkBadSymbol('return'); // //# 12: continued
checkBadSymbol('super'); // //# 12: continued
checkBadSymbol('switch'); // //# 12: continued
checkBadSymbol('this'); // //# 12: continued
checkBadSymbol('throw'); // //# 12: continued
checkBadSymbol('true'); // //# 12: continued
checkBadSymbol('try'); // //# 12: continued
checkBadSymbol('var'); // //# 12: continued
checkBadSymbol('while'); // //# 12: continued
checkBadSymbol('with'); // //# 12: continued
// Reserved words are allowed, via the constructor.
checkSymbol('assert');
checkSymbol('break');
checkSymbol('case');
checkSymbol('catch');
checkSymbol('class');
checkSymbol('const');
checkSymbol('continue');
checkSymbol('default');
checkSymbol('do');
checkSymbol('else');
checkSymbol('enum');
checkSymbol('extends');
checkSymbol('false');
checkSymbol('final');
checkSymbol('finally');
checkSymbol('for');
checkSymbol('if');
checkSymbol('in');
checkSymbol('is');
checkSymbol('new');
checkSymbol('null');
checkSymbol('rethrow');
checkSymbol('return');
checkSymbol('super');
checkSymbol('switch');
checkSymbol('this');
checkSymbol('throw');
checkSymbol('true');
checkSymbol('try');
checkSymbol('var');
checkSymbol('while');
checkSymbol('with');
// Reserved words can also be part of a dot separated list, via constructor.
checkSymbol('foo.assert');
checkSymbol('foo.break');
checkSymbol('foo.case');
checkSymbol('foo.catch');
checkSymbol('foo.class');
checkSymbol('foo.const');
checkSymbol('foo.continue');
checkSymbol('foo.default');
checkSymbol('foo.do');
checkSymbol('foo.else');
checkSymbol('foo.enum');
checkSymbol('foo.extends');
checkSymbol('foo.false');
checkSymbol('foo.final');
checkSymbol('foo.finally');
checkSymbol('foo.for');
checkSymbol('foo.if');
checkSymbol('foo.in');
checkSymbol('foo.is');
checkSymbol('foo.new');
checkSymbol('foo.null');
checkSymbol('foo.rethrow');
checkSymbol('foo.return');
checkSymbol('foo.super');
checkSymbol('foo.switch');
checkSymbol('foo.this');
checkSymbol('foo.throw');
checkSymbol('foo.true');
checkSymbol('foo.try');
checkSymbol('foo.var');
checkSymbol('foo.while');
checkSymbol('foo.with');
checkSymbol('assert.foo');
checkSymbol('break.foo');
checkSymbol('case.foo');
checkSymbol('catch.foo');
checkSymbol('class.foo');
checkSymbol('const.foo');
checkSymbol('continue.foo');
checkSymbol('default.foo');
checkSymbol('do.foo');
checkSymbol('else.foo');
checkSymbol('enum.foo');
checkSymbol('extends.foo');
checkSymbol('false.foo');
checkSymbol('final.foo');
checkSymbol('finally.foo');
checkSymbol('for.foo');
checkSymbol('if.foo');
checkSymbol('in.foo');
checkSymbol('is.foo');
checkSymbol('new.foo');
checkSymbol('null.foo');
checkSymbol('rethrow.foo');
checkSymbol('return.foo');
checkSymbol('super.foo');
checkSymbol('switch.foo');
checkSymbol('this.foo');
checkSymbol('throw.foo');
checkSymbol('true.foo');
checkSymbol('try.foo');
checkSymbol('var.foo');
checkSymbol('while.foo');
checkSymbol('with.foo');
// A constant symbol with a reserved word is allowed, via constructor.
x = const Symbol('void.foo');
x = const Symbol('foo.void');
x = const Symbol('assert');
x = const Symbol('break');
x = const Symbol('case');
x = const Symbol('catch');
x = const Symbol('class');
x = const Symbol('const');
x = const Symbol('continue');
x = const Symbol('default');
x = const Symbol('do');
x = const Symbol('else');
x = const Symbol('enum');
x = const Symbol('extends');
x = const Symbol('false');
x = const Symbol('final');
x = const Symbol('finally');
x = const Symbol('for');
x = const Symbol('if');
x = const Symbol('in');
x = const Symbol('is');
x = const Symbol('new');
x = const Symbol('null');
x = const Symbol('rethrow');
x = const Symbol('return');
x = const Symbol('super');
x = const Symbol('switch');
x = const Symbol('this');
x = const Symbol('throw');
x = const Symbol('true');
x = const Symbol('try');
x = const Symbol('var');
x = const Symbol('while');
x = const Symbol('with');
x = const Symbol('foo.assert');
x = const Symbol('foo.break');
x = const Symbol('foo.case');
x = const Symbol('foo.catch');
x = const Symbol('foo.class');
x = const Symbol('foo.const');
x = const Symbol('foo.continue');
x = const Symbol('foo.default');
x = const Symbol('foo.do');
x = const Symbol('foo.else');
x = const Symbol('foo.enum');
x = const Symbol('foo.extends');
x = const Symbol('foo.false');
x = const Symbol('foo.final');
x = const Symbol('foo.finally');
x = const Symbol('foo.for');
x = const Symbol('foo.if');
x = const Symbol('foo.in');
x = const Symbol('foo.is');
x = const Symbol('foo.new');
x = const Symbol('foo.null');
x = const Symbol('foo.rethrow');
x = const Symbol('foo.return');
x = const Symbol('foo.super');
x = const Symbol('foo.switch');
x = const Symbol('foo.this');
x = const Symbol('foo.throw');
x = const Symbol('foo.true');
x = const Symbol('foo.try');
x = const Symbol('foo.var');
x = const Symbol('foo.while');
x = const Symbol('foo.with');
x = const Symbol('assert.foo');
x = const Symbol('break.foo');
x = const Symbol('case.foo');
x = const Symbol('catch.foo');
x = const Symbol('class.foo');
x = const Symbol('const.foo');
x = const Symbol('continue.foo');
x = const Symbol('default.foo');
x = const Symbol('do.foo');
x = const Symbol('else.foo');
x = const Symbol('enum.foo');
x = const Symbol('extends.foo');
x = const Symbol('false.foo');
x = const Symbol('final.foo');
x = const Symbol('finally.foo');
x = const Symbol('for.foo');
x = const Symbol('if.foo');
x = const Symbol('in.foo');
x = const Symbol('is.foo');
x = const Symbol('new.foo');
x = const Symbol('null.foo');
x = const Symbol('rethrow.foo');
x = const Symbol('return.foo');
x = const Symbol('super.foo');
x = const Symbol('switch.foo');
x = const Symbol('this.foo');
x = const Symbol('throw.foo');
x = const Symbol('true.foo');
x = const Symbol('try.foo');
x = const Symbol('var.foo');
x = const Symbol('while.foo');
x = const Symbol('with.foo');
}