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

Side by Side Diff: tools/dom/scripts/idlparser.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « tools/ddbg.dart ('k') | tools/dom/src/AttributeMap.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // IDL grammar variants. 5 // IDL grammar variants.
6 const int WEBIDL_SYNTAX = 0; 6 const int WEBIDL_SYNTAX = 0;
7 const int WEBKIT_SYNTAX = 1; 7 const int WEBKIT_SYNTAX = 1;
8 const int FREMONTCUT_SYNTAX = 2; 8 const int FREMONTCUT_SYNTAX = 2;
9 9
10 /** 10 /**
(...skipping 16 matching lines...) Expand all
27 class IDLModule extends IDLNode { 27 class IDLModule extends IDLNode {
28 String id; 28 String id;
29 List interfaces; 29 List interfaces;
30 List typedefs; 30 List typedefs;
31 List implementsStatements; 31 List implementsStatements;
32 32
33 IDLModule(String this.id, IDLExtAttrs extAttrs, IDLAnnotations annotations, 33 IDLModule(String this.id, IDLExtAttrs extAttrs, IDLAnnotations annotations,
34 List<IDLNode> elements) { 34 List<IDLNode> elements) {
35 setExtAttrs(extAttrs); 35 setExtAttrs(extAttrs);
36 this.annotations = annotations; 36 this.annotations = annotations;
37 this.interfaces = elements.filter((e) => e is IDLInterface); 37 this.interfaces = elements.where((e) => e is IDLInterface).toList();
38 this.typedefs = elements.filter((e) => e is IDLTypeDef); 38 this.typedefs = elements.where((e) => e is IDLTypeDef).toList();
39 this.implementsStatements = 39 this.implementsStatements =
40 elements.filter((e) => e is IDLImplementsStatement); 40 elements.where((e) => e is IDLImplementsStatement).toList();
41 } 41 }
42 42
43 toString() => '<IDLModule $id $extAttrs $annotations>'; 43 toString() => '<IDLModule $id $extAttrs $annotations>';
44 } 44 }
45 45
46 class IDLNode { 46 class IDLNode {
47 IDLExtAttrs extAttrs; 47 IDLExtAttrs extAttrs;
48 IDLAnnotations annotations; 48 IDLAnnotations annotations;
49 IDLNode(); 49 IDLNode();
50 50
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 bool isSupplemental; 94 bool isSupplemental;
95 bool isNoInterfaceObject; 95 bool isNoInterfaceObject;
96 bool isFcSuppressed; 96 bool isFcSuppressed;
97 97
98 IDLInterface(String this.id, IDLExtAttrs ea, IDLAnnotations ann, 98 IDLInterface(String this.id, IDLExtAttrs ea, IDLAnnotations ann,
99 List this.parents, List members) { 99 List this.parents, List members) {
100 setExtAttrs(ea); 100 setExtAttrs(ea);
101 this.annotations = ann; 101 this.annotations = ann;
102 if (this.parents == null) this.parents = []; 102 if (this.parents == null) this.parents = [];
103 103
104 operations = members.filter((e) => e is IDLOperation); 104 operations = members.where((e) => e is IDLOperation).toList();
105 attributes = members.filter((e) => e is IDLAttribute); 105 attributes = members.where((e) => e is IDLAttribute).toList();
106 constants = members.filter((e) => e is IDLConstant); 106 constants = members.where((e) => e is IDLConstant).toList();
107 snippets = members.filter((e) => e is IDLSnippet); 107 snippets = members.where((e) => e is IDLSnippet).toList();
108 108
109 isSupplemental = extAttrs.has('Supplemental'); 109 isSupplemental = extAttrs.has('Supplemental');
110 isNoInterfaceObject = extAttrs.has('NoInterfaceObject'); 110 isNoInterfaceObject = extAttrs.has('NoInterfaceObject');
111 isFcSuppressed = extAttrs.has('Suppressed'); 111 isFcSuppressed = extAttrs.has('Suppressed');
112 } 112 }
113 113
114 toString() => '<IDLInterface $id $extAttrs $annotations>'; 114 toString() => '<IDLInterface $id $extAttrs $annotations>';
115 } 115 }
116 116
117 class IDLMember extends IDLNode { 117 class IDLMember extends IDLNode {
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 OR([MANY(CHAR(' \t\r\n')), 540 OR([MANY(CHAR(' \t\r\n')),
541 ['//', MANY0([NOT(CHAR('\r\n')), CHAR()])], 541 ['//', MANY0([NOT(CHAR('\r\n')), CHAR()])],
542 ['#', MANY0([NOT(CHAR('\r\n')), CHAR()])], 542 ['#', MANY0([NOT(CHAR('\r\n')), CHAR()])],
543 ['/*', MANY0([NOT('*/'), CHAR()]), '*/']]); 543 ['/*', MANY0([NOT('*/'), CHAR()]), '*/']]);
544 544
545 // Top level - at least one definition. 545 // Top level - at least one definition.
546 return MANY(Definition); 546 return MANY(Definition);
547 547
548 } 548 }
549 } 549 }
OLDNEW
« no previous file with comments | « tools/ddbg.dart ('k') | tools/dom/src/AttributeMap.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698