+2007-11-29 Jürg Billeter <j@bitron.ch>
+
+ * doc/vala/Makefile.am, doc/vala/classes.xml, doc/vala/default.css,
+ doc/vala/delegates.xml, doc/vala/enums.xml, doc/vala/exceptions.xml,
+ doc/vala/expressions.xml, doc/vala/index.xml, doc/vala/interfaces.xml,
+ doc/vala/namespaces.xml, doc/vala/statements.xml,
+ doc/vala/structs.xml, doc/vala/types.xml, doc/vala/xhtml.xsl: add some
+ basic documentation for statements, extend documentation structure
+
2007-11-28 Jürg Billeter <j@bitron.ch>
* vala/parser.y, vala/scanner.l, vala/valamethod.vala,
interfaces.html \
enums.html \
delegates.html \
+ exceptions.html \
$(NULL)
built_data = \
interfaces.xml \
enums.xml \
delegates.xml \
+ exceptions.xml \
$(NULL)
MOSTLYCLEANFILES = $(built_data)
<class-member>
}</blockcode>
</section>
+ <section id="fields">
+ <h>Fields</h>
+ <p>Documentation</p>
+ </section>
+ <section id="methods">
+ <h>Methods</h>
+ <p>Documentation</p>
+ </section>
+ <section id="properties">
+ <h>Properties</h>
+ <p>Documentation</p>
+ </section>
+ <section id="signals">
+ <h>Signals</h>
+ <p>Documentation</p>
+ </section>
</section>
margin: 0 2em 1em 2em;
}
+blockquote {
+ font-style: italic;
+ white-space: pre;
+}
+
<?xml version="1.0"?>
<section id="delegates">
<h>Delegates</h>
+ <section id="declaration">
+ <h>Delegate declarations</h>
+ <p>Documentation</p>
+ </section>
</section>
<?xml version="1.0"?>
<section id="enums">
<h>Enums</h>
+ <section id="declaration">
+ <h>Enum declarations</h>
+ <p>Documentation</p>
+ </section>
+ <section id="members">
+ <h>Enum members</h>
+ <p>Documentation</p>
+ </section>
+ <section id="methods">
+ <h>Methods</h>
+ <p>Documentation</p>
+ </section>
</section>
--- /dev/null
+<?xml version="1.0"?>
+<section id="exceptions">
+ <h>Exceptions</h>
+ <section id="handling">
+ <h>Exception handling</h>
+ <p>Documentation</p>
+ </section>
+</section>
+
<?xml version="1.0"?>
<section id="expressions">
<h>Expressions</h>
+ <section id="arithmetic">
+ <h>Arithmetic operations</h>
+ <p>Documentation</p>
+ </section>
+ <section id="relational">
+ <h>Relational operations</h>
+ <p>Documentation</p>
+ </section>
+ <section id="logical">
+ <h>Logical operations</h>
+ <p>Documentation</p>
+ </section>
+ <section id="assignments">
+ <h>Assignments</h>
+ <p>Documentation</p>
+ </section>
</section>
<xi:include href="interfaces.xml"/>
<xi:include href="enums.xml"/>
<xi:include href="delegates.xml"/>
+ <xi:include href="exceptions.xml"/>
</body>
</html>
<?xml version="1.0"?>
<section id="interfaces">
<h>Interfaces</h>
+ <section id="declaration">
+ <h>Interface declarations</h>
+ <p>Documentation</p>
+ </section>
+ <section id="methods">
+ <h>Methods</h>
+ <p>Documentation</p>
+ </section>
+ <section id="properties">
+ <h>Properties</h>
+ <p>Documentation</p>
+ </section>
+ <section id="signals">
+ <h>Signals</h>
+ <p>Documentation</p>
+ </section>
</section>
<?xml version="1.0"?>
<section id="namespaces">
<h>Namespaces</h>
+ <section id="declaration">
+ <h>Namespace declarations</h>
+ <p>Documentation</p>
+ </section>
</section>
<?xml version="1.0"?>
<section id="statements">
<h>Statements</h>
+ <section id="selection">
+ <h>Selection statements</h>
+ <p>The if statement selects a statement for execution based on the value of a boolean expression.</p>
+ <blockquote>
+if-statement:
+ if ( boolean-expression ) embedded-statement
+ if ( boolean-expression ) embedded-statement else embedded-statement
+ </blockquote>
+ </section>
+ <section id="iteration">
+ <h>Iteration statements</h>
+ <p>The while statement conditionally executes an embedded statement zero or more times.</p>
+ <blockquote>
+while-statement:
+ while ( boolean-expression ) embedded-statement
+ </blockquote>
+ <p>The do statement conditionally executes an embedded statement one or more times.</p>
+ <blockquote>
+do-statement:
+ do embedded-statement while ( boolean-expression ) ;
+ </blockquote>
+ <p>The for statement evaluates a sequence of initialization expressions and then, while a condition is true, repeatedly executes an embedded statement and evaluates a sequence of iteration expressions.</p>
+ <blockquote>
+for-statement:
+ for ( [for-initializer] ; [for-condition] ; [for-iterator] ) embedded-statement
+
+for-initializer:
+ local-variable-declaration
+ statement-expression-list
+
+for-condition:
+ boolean-expression
+
+for-iterator:
+ statement-expression-list
+
+statement-expression-list:
+ statement-expression
+ statement-expression-list , statement-expression
+ </blockquote>
+ <p>Within the embedded statement of a for statement, a break statement can be used to transfer control to the end point of the for statement (thus ending iteration of the embedded statement), and a continue statement can be used to transfer control to the end point of the embedded statement (thus executing another iteration of the for statement).</p>
+ <p>The foreach statement enumerates the elements of a collection, executing an embedded statement for each element of the collection.</p>
+ <blockquote>
+foreach-statement:
+ foreach ( type identifier in expression ) embedded-statement
+ </blockquote>
+ </section>
+ <section id="jump">
+ <h>Jump statements</h>
+ <p>The break statement exits the nearest enclosing switch, while, do, for, or foreach statement.</p>
+ <blockquote>
+break-statement:
+ break ;
+ </blockquote>
+ <p>The continue statement starts a new iterataion of the nearest enclosing while, do, for, or foreach statement.</p>
+ <blockquote>
+continue-statement:
+ continue ;
+ </blockquote>
+ <p>When multiple while, do, for, or foreach statements are nested within each other, a continue statement applies only to the innermost statement. If a continue statement is not eclosed by a while, do, for, or foreach statement, a compile-time error occurs.</p>
+ <p>The return statement returns control to the caller of the function member in which the return statement appears.</p>
+ <blockquote>
+return-statement:
+ return [expression] ;
+ </blockquote>
+ <p>The throw statement throws an exception.</p>
+ <blockquote>
+throw-statement:
+ throw expression ;
+ </blockquote>
+ </section>
+ <section id="try">
+ <h>Try statement</h>
+ <p>The try statement provides a mechanism for catching exceptions that occur during execution of a block. Furthermore, the try statement provides the ability to specify a block of code that is always executed when control leaves the try statement.</p>
+ <blockquote>
+try-statement:
+ try block catch-clauses
+ try block [catch-clauses] finally-clause
+
+catch-clauses:
+ specific-catch-clause
+ [specific-catch-clauses] general-catch-clause
+
+specific-catch-clause:
+ specific-catch-clause
+ specific-catch-clauses specific-catch-clause
+
+specific-catch-clause:
+ catch ( error-type identifier ) block
+
+general-catch-clause:
+ catch block
+
+finally-clause:
+ finally block
+ </blockquote>
+ </section>
</section>
<struct-member>
}</blockcode>
</section>
+ <section id="fields">
+ <h>Fields</h>
+ <p>Documentation</p>
+ </section>
+ <section id="methods">
+ <h>Methods</h>
+ <p>Documentation</p>
+ </section>
+ <section id="properties">
+ <h>Properties</h>
+ <p>Documentation</p>
+ </section>
</section>
<h>Types</h>
<p>Vala supports two kinds of data types: value types and reference types. Value types include simple types (e.g. char, int, and float), enum types, and struct types. Reference types include class types, interface types, and array types.</p>
<p>Value types differ from reference types in that variables of the value types directly contain their data, whereas variables of the reference types store references to their data, the latter being known as objects. With reference types, it is possible for two variables to reference the same object, and thus possible for operations on one variable to affect the object referenced by the other variable. With value types, the variables each have their own copy of the data, and it is not possible for operations on one to affect the other.</p>
+ <section id="valuetypes">
+ <h>Value types</h>
+ <p>Documentation</p>
+ </section>
+ <section id="referencetypes">
+ <h>Reference types</h>
+ <p>Documentation</p>
+ </section>
</section>
<h2><xsl:value-of select="text()"/></h2>
</xsl:template>
<xsl:template match="body/section/section">
- <xsl:apply-templates select="h|p|div|blockcode|section"/>
+ <xsl:apply-templates select="h|p|div|blockcode|blockquote|section"/>
</xsl:template>
<xsl:template match="body/section/section/h">
<h3><xsl:value-of select="text()"/><a id="{../@id}"><xsl:text> </xsl:text></a></h3>
</xsl:template>
<xsl:template match="div[@role='note']">
- <div class="note"><xsl:apply-templates select="h|p|blockcode"/></div>
+ <div class="note"><xsl:apply-templates select="h|p|blockcode|blockquote"/></div>
</xsl:template>
<xsl:template match="div/h">
<h4><xsl:value-of select="text()"/></h4>
<xsl:template match="blockcode">
<pre><xsl:value-of select="text()"/></pre>
</xsl:template>
+ <xsl:template match="blockquote">
+ <blockquote><xsl:value-of select="text()"/></blockquote>
+ </xsl:template>
</xsl:stylesheet>