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

Side by Side Diff: pkg/compiler/lib/src/js/builder.dart

Issue 804423003: dart2js: Change typedef encoding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comment. Created 6 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 | « no previous file | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Utilities for building JS ASTs at runtime. Contains a builder class 5 // Utilities for building JS ASTs at runtime. Contains a builder class
6 // and a parser that parses part of the language. 6 // and a parser that parses part of the language.
7 7
8 part of js; 8 part of js;
9 9
10 10
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 /// Creates a literal js string from [value]. 320 /// Creates a literal js string from [value].
321 /// 321 ///
322 /// Note that this function only puts quotes around [value]. It does not do 322 /// Note that this function only puts quotes around [value]. It does not do
323 /// any escaping, so use only when you can guarantee that [value] does not 323 /// any escaping, so use only when you can guarantee that [value] does not
324 /// contain newlines or backslashes. For escaping the string use 324 /// contain newlines or backslashes. For escaping the string use
325 /// [escapedString]. 325 /// [escapedString].
326 LiteralString string(String value) => new LiteralString('"$value"'); 326 LiteralString string(String value) => new LiteralString('"$value"');
327 327
328 LiteralNumber number(num value) => new LiteralNumber('$value'); 328 LiteralNumber number(num value) => new LiteralNumber('$value');
329 329
330 LiteralBool boolean(bool value) => new LiteralBool(value);
331
330 ArrayInitializer numArray(Iterable<int> list) => 332 ArrayInitializer numArray(Iterable<int> list) =>
331 new ArrayInitializer(list.map(number).toList()); 333 new ArrayInitializer(list.map(number).toList());
332 334
333 ArrayInitializer stringArray(Iterable<String> list) => 335 ArrayInitializer stringArray(Iterable<String> list) =>
334 new ArrayInitializer(list.map(string).toList()); 336 new ArrayInitializer(list.map(string).toList());
335 337
336 Comment comment(String text) => new Comment(text); 338 Comment comment(String text) => new Comment(text);
337 339
338 Call propertyCall(Expression receiver, 340 Call propertyCall(Expression receiver,
339 String fieldName, 341 String fieldName,
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 Catch parseCatch() { 1238 Catch parseCatch() {
1237 expectCategory(LPAREN); 1239 expectCategory(LPAREN);
1238 String identifier = lastToken; 1240 String identifier = lastToken;
1239 expectCategory(ALPHA); 1241 expectCategory(ALPHA);
1240 expectCategory(RPAREN); 1242 expectCategory(RPAREN);
1241 expectCategory(LBRACE); 1243 expectCategory(LBRACE);
1242 Block body = parseBlock(); 1244 Block body = parseBlock();
1243 return new Catch(new VariableDeclaration(identifier), body); 1245 return new Catch(new VariableDeclaration(identifier), body);
1244 } 1246 }
1245 } 1247 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698