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

Side by Side Diff: third_party/pkg/angular/bin/parser_generator_for_spec.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « third_party/pkg/angular/analyze.sh ('k') | third_party/pkg/angular/cla.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import 'dart:io';
2 import 'package:di/di.dart'; 1 import 'package:di/di.dart';
3 import 'package:di/dynamic_injector.dart'; 2 import 'package:di/dynamic_injector.dart';
4 import 'package:angular/core/parser/parser_library.dart'; 3 import 'package:angular/core/module.dart';
5 import 'package:angular/tools/parser_generator/dart_code_gen.dart'; 4 import 'package:angular/core/parser/parser.dart';
6 import 'package:angular/tools/parser_generator/generator.dart'; 5 import 'package:angular/tools/parser_generator/generator.dart';
7 import 'package:angular/tools/parser_getter_setter/generator.dart'; 6 import 'package:angular/tools/parser_getter_setter/generator.dart';
8 7
9 main(arguments) { 8 main(arguments) {
10 var isGetter = !arguments.isEmpty; 9 var isGetter = !arguments.isEmpty;
11 10
12 Module module = new Module() 11 Module module = new Module()..type(Parser, implementedBy: DynamicParser);
13 ..type(ParserBackend, implementedBy: isGetter ? DartGetterSetterGen : DartCo deGen); 12 if (isGetter) {
14 13 module.type(ParserBackend, implementedBy: DartGetterSetterGen);
14 } else {
15 module.type(ParserBackend, implementedBy: DynamicParserBackend);
16 module.type(FilterMap, implementedBy: NullFilterMap);
17 }
15 Injector injector = new DynamicInjector(modules: [module], 18 Injector injector = new DynamicInjector(modules: [module],
16 allowImplicitInjection: true); 19 allowImplicitInjection: true);
17 20
18 // List generated using: 21 // List generated using:
19 // node node_modules/karma/bin/karma run | grep -Eo ":XNAY:.*:XNAY:" | sed -e 's/:XNAY://g' | sed -e "s/^/'/" | sed -e "s/$/',/" | sort | uniq > missing_expre ssions 22 // node node_modules/karma/bin/karma run | grep -Eo ":XNAY:.*:XNAY:" | sed -e 's/:XNAY://g' | sed -e "s/^/'/" | sed -e "s/$/',/" | sort | uniq > missing_expre ssions
20 injector.get(isGetter ? ParserGetterSetter : ParserGenerator).generateParser([ 23 injector.get(isGetter ? ParserGetterSetter : ParserGenerator).generateParser([
21 "foo == 'bar' ||\nbaz", 24 "foo == 'bar' ||\nbaz",
22 "this['a'].b", 25 "this['a'].b",
23 "const", 26 "const",
24 "null", 27 "null",
25 "[1, 2].length", 28 "[1, 2].length",
29
26 "doesNotExist", 30 "doesNotExist",
31 "doesNotExist()",
32 "doesNotExist(1)",
33 "doesNotExist(1, 2)",
34 "a.doesNotExist()",
35 "a.doesNotExist(1)",
36 "a.doesNotExist(1, 2)",
37
27 "a.b.c", 38 "a.b.c",
28 "x.b.c", 39 "x.b.c",
29 "e1.b", 40 "e1.b",
30 "o.f()", 41 "o.f()",
31 "1", "-1", "+1", 42 "1", "-1", "+1",
43 "true?1",
32 "!true", 44 "!true",
33 "3*4/2%5", "3+6-2", 45 "3*4/2%5", "3+6-2",
34 "2<3", "2>3", "2<=2", "2>=2", 46 "2<3", "2>3", "2<=2", "2>=2",
35 "2==3", "2!=3", 47 "2==3", "2!=3",
36 "true&&true", "true&&false", 48 "true&&true", "true&&false",
37 "true||true", "true||false", "false||false", 49 "true||true", "true||false", "false||false",
38 "'str ' + 4", "4 + ' str'", "4 + 4", "4 + 4 + ' str'", 50 "'str ' + 4", "4 + ' str'", "4 + 4", "4 + 4 + ' str'",
39 "'str ' + 4 + 4", 51 "'str ' + 4 + 4",
40 "a", "b.c" , "x.y.z", 52 "a", "b.c" , "x.y.z",
41 'ident.id(6)', 'ident.doubleId(4,5)', 53 'ident.id(6)', 'ident.doubleId(4,5)',
(...skipping 28 matching lines...) Expand all
70 '{a', 82 '{a',
71 'a[1]=2', 83 'a[1]=2',
72 'a=1;b=3;a+b', 84 'a=1;b=3;a+b',
73 'a.b', 85 'a.b',
74 'a(b', 86 'a(b',
75 '\'a\' + \'b c\'', 87 '\'a\' + \'b c\'',
76 'a().name', 88 'a().name',
77 'a[x()]()', 89 'a[x()]()',
78 'boo', 90 'boo',
79 '[].count(', 91 '[].count(',
80 'doesNotExist()',
81 'false', 92 'false',
82 'false && run()', 93 'false && run()',
83 '!false || true', 94 '!false || true',
84 'foo()', 95 'foo()',
85 '\$id', 96 '\$id',
86 'items[1] = "abc"', 97 'items[1] = "abc"',
87 'items[1].name', 98 'items[1].name',
88 'list[3] = 2', 99 'list[3] = 2',
89 'map["square"] = 6', 100 'map["square"] = 6',
90 'method', 101 'method',
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 '{a:\'-\'}', 141 '{a:\'-\'}',
131 '{a:a}', 142 '{a:a}',
132 '[{a:[]}, {b:1}]', 143 '[{a:[]}, {b:1}]',
133 '{true:"a", false:"b"}[!!true]', 144 '{true:"a", false:"b"}[!!true]',
134 145
135 '2>=1', 146 '2>=1',
136 'true==2<3', 147 'true==2<3',
137 '6[3]=2', 148 '6[3]=2',
138 149
139 'map.dot = 7', 150 'map.dot = 7',
151 'map.null',
140 'exists(doesNotExist())', 152 'exists(doesNotExist())',
141 'doesNotExists(exists())', 153 'doesNotExists(exists())',
142 'a[0]()', 154 'a[0]()',
143 '{}()', 155 '{}()',
144 'items[1]', 156 'items[1]',
145 "-0--1++2*-3/-4", 157 "-0--1++2*-3/-4",
146 "1/2*3", 158 "1/2*3",
147 "0||2", 159 "0||2",
148 "0||1&&2", 160 "0||1&&2",
149 'undefined+1', 161 'undefined+1',
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 '1?2:1&&1', 212 '1?2:1&&1',
201 '1?1:0||0', 213 '1?1:0||0',
202 '1?2:0||1', 214 '1?2:0||1',
203 'returnTrue() ? returnString() : returnInt()', 215 'returnTrue() ? returnString() : returnInt()',
204 'returnFalse() ? returnString() : returnInt()', 216 'returnFalse() ? returnString() : returnInt()',
205 'identity(returnFalse() ? returnString() : returnInt())', 217 'identity(returnFalse() ? returnString() : returnInt())',
206 "taxRate ~/ 100 * subTotal", 218 "taxRate ~/ 100 * subTotal",
207 "'fOo'|uppercase|lowercase", 219 "'fOo'|uppercase|lowercase",
208 "n = (name|lowercase)", 220 "n = (name|lowercase)",
209 "n", 221 "n",
210 "1|nonexistent" 222 "1|nonexistent",
223 "publicField",
224 "_privateField"
211 ]); 225 ]);
212 } 226 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/analyze.sh ('k') | third_party/pkg/angular/cla.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698