Permalink
Browse files

reorganize serializer parsing code; added support for iterators

  • Loading branch information...
1 parent 5a94190 commit 9000303ad62234df9183abc384bbb11a5b7a9367 @dontcallmedom committed Jun 28, 2012
Showing with 392 additions and 117 deletions.
  1. +14 −1 doc/widlproc.html
  2. +2 −0 src/lex.h
  3. +209 −116 src/parse.c
  4. +35 −0 test/valid/idl/iterator.widl
  5. +132 −0 test/valid/xml/iterator.widlprocxml
View
@@ -541,7 +541,7 @@ <h3 id="html">HTML in comments</h3>
<pre class="dtd">
&lt;!ELEMENT Interface (webidl, descriptive?, ExtendedAttributeList?,
- InterfaceInheritance?, (Const | Stringifier | Attribute | Operation | Serializer)* ) >
+ InterfaceInheritance?, (Const | Attribute | Operation | Stringifier* | Serializer* | Iterator | IteratorObject)* ) >
&lt;!ATTLIST Interface name CDATA #REQUIRED
partial (partial) #IMPLIED
callback (callback) #IMPLIED
@@ -862,6 +862,19 @@ <h3 id="html">HTML in comments</h3>
</pre>
+<h4>Iterator</h4>
+<p>An <em>Iterator</em> element defines whether the interface has a custom iterator; the type of the iterated objects is defined in the <em>Type</em> child. If that interator implements a particular interface, the name of that interface is set in the <em>interface</em> attribute.</p>
+<pre class="dtd">
+&lt;!ELEMENT Iterator (webidl, descriptive?, ExtendedAttributeList?, Type) >
+&lt;!ATTLIST Iterator interface CDATA #IMPLIED>
+</pre>
+
+<h4>IteratorObject</h4>
+<p>An <em>IteratorObject</em> element denotes that the interface serves as an iterator object interface; the type of the iterated objects is defined in the <em>Type</em> child.</p>
+
+<pre class="dtd">
+&lt;!ELEMENT IteratorObject (webidl, descriptive?, ExtendedAttributeList?, Type) >
+</pre>
<h4>DictionaryMember</h4>
View
@@ -28,6 +28,7 @@
"float\0" \
"Infinity\0" \
"-Infinity\0" \
+ "iterator\0" \
"long\0" \
"NaN\0" \
"null\0" \
@@ -78,6 +79,7 @@ enum toktype {
TOK_float,
TOK_infinity,
TOK_minusinfinity,
+ TOK_iterator,
TOK_long,
TOK_NaN,
TOK_null,
Oops, something went wrong.

0 comments on commit 9000303

Please sign in to comment.