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

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

Issue 870353004: cps-ir: Implement string concatenation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 List<Expression> arguments) { 342 List<Expression> arguments) {
343 return new Call(new PropertyAccess.field(receiver, fieldName), arguments); 343 return new Call(new PropertyAccess.field(receiver, fieldName), arguments);
344 } 344 }
345 } 345 }
346 346
347 LiteralString string(String value) => js.string(value); 347 LiteralString string(String value) => js.string(value);
348 LiteralNumber number(num value) => js.number(value); 348 LiteralNumber number(num value) => js.number(value);
349 ArrayInitializer numArray(Iterable<int> list) => js.numArray(list); 349 ArrayInitializer numArray(Iterable<int> list) => js.numArray(list);
350 ArrayInitializer stringArray(Iterable<String> list) => js.stringArray(list); 350 ArrayInitializer stringArray(Iterable<String> list) => js.stringArray(list);
351 Call propertyCall(Expression receiver, 351 Call propertyCall(Expression receiver,
352 String fieldName, 352 String fieldName,
353 List<Expression> arguments) { 353 List<Expression> arguments) {
354 return js.propertyCall(receiver, fieldName, arguments); 354 return js.propertyCall(receiver, fieldName, arguments);
355 } 355 }
356 356
357 class MiniJsParserError { 357 class MiniJsParserError {
358 MiniJsParserError(this.parser, this.message) { } 358 MiniJsParserError(this.parser, this.message) { }
359 359
360 final MiniJsParser parser; 360 final MiniJsParser parser;
361 final String message; 361 final String message;
362 362
363 String toString() { 363 String toString() {
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 Catch parseCatch() { 1315 Catch parseCatch() {
1316 expectCategory(LPAREN); 1316 expectCategory(LPAREN);
1317 String identifier = lastToken; 1317 String identifier = lastToken;
1318 expectCategory(ALPHA); 1318 expectCategory(ALPHA);
1319 expectCategory(RPAREN); 1319 expectCategory(RPAREN);
1320 expectCategory(LBRACE); 1320 expectCategory(LBRACE);
1321 Block body = parseBlock(); 1321 Block body = parseBlock();
1322 return new Catch(new VariableDeclaration(identifier), body); 1322 return new Catch(new VariableDeclaration(identifier), body);
1323 } 1323 }
1324 } 1324 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698