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

Side by Side Diff: tests/language/string_interpolation9_test.dart

Issue 10911066: Make an empty identifier a scanning error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added more tests. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/scanner/scanner.dart ('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
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
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 // Almost valid string interpolation syntax.
6
7 main() {
8 var x;
9
10 x = "$"; /// 1: compile-time error
11 x = "x$"; /// 2: compile-time error
12 x = "$x$"; /// 3: compile-time error
13 x = "$$x"; /// 4: compile-time error
14 x = "$ "; /// 5: compile-time error
15
16 x = '$'; /// 6: compile-time error
17 x = 'x$'; /// 7: compile-time error
18 x = '$x$'; /// 8: compile-time error
19 x = '$$x'; /// 9: compile-time error
20 x = '$ '; /// 10: compile-time error
21
22 x = """$"""; /// 11: compile-time error
23 x = """x$"""; /// 12: compile-time error
24 x = """$x$"""; /// 13: compile-time error
25 x = """$$x"""; /// 14: compile-time error
26 x = """$ """; /// 15: compile-time error
27
28 x = '''$'''; /// 16: compile-time error
29 x = '''x$'''; /// 17: compile-time error
30 x = '''$x$'''; /// 18: compile-time error
31 x = '''$$x'''; /// 19: compile-time error
32 x = '''$ '''; /// 20: compile-time error
33
34 return x;
35 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/scanner/scanner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698