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

Unified Diff: third_party/pkg/angular/lib/core/parser/unparser.dart

Issue 1058283006: Update pubspecs and dependencies to get pkgbuild tests working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/lib/core/parser/unparser.dart
diff --git a/third_party/pkg/angular/lib/core/parser/unparser.dart b/third_party/pkg/angular/lib/core/parser/unparser.dart
deleted file mode 100644
index cbf968f2d83adf0bc3b7aa49962b7404e68be562..0000000000000000000000000000000000000000
--- a/third_party/pkg/angular/lib/core/parser/unparser.dart
+++ /dev/null
@@ -1,135 +0,0 @@
-library angular.core.parser.unparser;
-
-import 'package:angular/core/parser/syntax.dart';
-
-class Unparser extends Visitor {
- final StringBuffer buffer;
- Unparser(this.buffer);
-
- static String unparse(Expression expression) {
- StringBuffer buffer = new StringBuffer();
- Unparser unparser = new Unparser(buffer);
- unparser.visit(expression);
- return "$buffer";
- }
-
- write(String string) {
- buffer.write(string);
- }
-
- writeArguments(List<Expression> arguments) {
- write('(');
- for (int i = 0; i < arguments.length; i++) {
- if (i != 0) write(',');
- visit(arguments[i]);
- }
- write(')');
- }
-
- visitChain(Chain chain) {
- for (int i = 0; i < chain.expressions.length; i++) {
- if (i != 0) write(';');
- visit(chain.expressions[i]);
- }
- }
-
- visitFilter(Filter filter) {
- write('(');
- visit(filter.expression);
- write('|${filter.name}');
- for (int i = 0; i < filter.arguments.length; i++) {
- write(' :');
- visit(filter.arguments[i]);
- }
- write(')');
- }
-
- visitAssign(Assign assign) {
- visit(assign.target);
- write('=');
- visit(assign.value);
- }
-
- visitConditional(Conditional conditional) {
- visit(conditional.condition);
- write('?');
- visit(conditional.yes);
- write(':');
- visit(conditional.no);
- }
-
- visitAccessScope(AccessScope access) {
- write(access.name);
- }
-
- visitAccessMember(AccessMember access) {
- visit(access.object);
- write('.${access.name}');
- }
-
- visitAccessKeyed(AccessKeyed access) {
- visit(access.object);
- write('[');
- visit(access.key);
- write(']');
- }
-
- visitCallScope(CallScope call) {
- write(call.name);
- writeArguments(call.arguments);
- }
-
- visitCallFunction(CallFunction call) {
- visit(call.function);
- writeArguments(call.arguments);
- }
-
- visitCallMember(CallMember call) {
- visit(call.object);
- write('.${call.name}');
- writeArguments(call.arguments);
- }
-
- visitPrefix(Prefix prefix) {
- write('(${prefix.operation}');
- visit(prefix.expression);
- write(')');
- }
-
- visitBinary(Binary binary) {
- write('(');
- visit(binary.left);
- write(binary.operation);
- visit(binary.right);
- write(')');
- }
-
- visitLiteralPrimitive(LiteralPrimitive literal) {
- write("${literal.value}");
- }
-
- visitLiteralArray(LiteralArray literal) {
- write('[');
- for (int i = 0; i < literal.elements.length; i++) {
- if (i != 0) write(',');
- visit(literal.elements[i]);
- }
- write(']');
- }
-
- visitLiteralObject(LiteralObject literal) {
- write('{');
- List<String> keys = literal.keys;
- for (int i = 0; i < keys.length; i++) {
- if (i != 0) write(',');
- write("'${keys[i]}':");
- visit(literal.values[i]);
- }
- write('}');
- }
-
- visitLiteralString(LiteralString literal) {
- String escaped = literal.value.replaceAll("'", "\\'");
- write("'$escaped'");
- }
-}
« no previous file with comments | « third_party/pkg/angular/lib/core/parser/syntax.dart ('k') | third_party/pkg/angular/lib/core/parser/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698