OLD | NEW |
1 #library("util"); | 1 #library("util"); |
2 | 2 |
3 #import("dart:io"); | 3 #import("dart:io"); |
4 #import("dart:json"); | 4 #import("dart:json"); |
5 | 5 |
6 Map<String, Map> _allProps; | 6 Map<String, Map> _allProps; |
7 | 7 |
8 Map<String, Map> get allProps { | 8 Map<String, Map> get allProps { |
9 if (_allProps == null) { | 9 if (_allProps == null) { |
10 // Database of expected property names for each type in WebKit. | 10 // Database of expected property names for each type in WebKit. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 */ | 50 */ |
51 num scoreEntry(Map entry, String type) { | 51 num scoreEntry(Map entry, String type) { |
52 num score = 0; | 52 num score = 0; |
53 // TODO(jacobr): consider removing skipped entries completely instead of | 53 // TODO(jacobr): consider removing skipped entries completely instead of |
54 // just giving them lower scores. | 54 // just giving them lower scores. |
55 if (!entry.containsKey('skipped')) { | 55 if (!entry.containsKey('skipped')) { |
56 score++; | 56 score++; |
57 } | 57 } |
58 if (entry.containsKey("members")) { | 58 if (entry.containsKey("members")) { |
59 Map members = getMembersMap(entry); | 59 Map members = getMembersMap(entry); |
60 for (String name in members.getKeys()) { | 60 for (String name in members.keys) { |
61 if (hasAny(type, name)) { | 61 if (hasAny(type, name)) { |
62 score++; | 62 score++; |
63 } | 63 } |
64 } | 64 } |
65 } | 65 } |
66 return score; | 66 return score; |
67 } | 67 } |
68 | 68 |
69 /** | 69 /** |
70 * Given a list of candidates for the documentation for a type, find the one | 70 * Given a list of candidates for the documentation for a type, find the one |
(...skipping 16 matching lines...) Expand all Loading... |
87 | 87 |
88 /** | 88 /** |
89 * Helper for sync creation of a whole file from a string. | 89 * Helper for sync creation of a whole file from a string. |
90 */ | 90 */ |
91 void writeFileSync(String filename, String data) { | 91 void writeFileSync(String filename, String data) { |
92 File f = new File(filename); | 92 File f = new File(filename); |
93 RandomAccessFile raf = f.openSync(FileMode.WRITE); | 93 RandomAccessFile raf = f.openSync(FileMode.WRITE); |
94 raf.writeStringSync(data); | 94 raf.writeStringSync(data); |
95 raf.closeSync(); | 95 raf.closeSync(); |
96 } | 96 } |
OLD | NEW |