]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
add some basic documentation for statements, extend documentation
authorJuerg Billeter <j@bitron.ch>
Thu, 29 Nov 2007 13:00:23 +0000 (13:00 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Thu, 29 Nov 2007 13:00:23 +0000 (13:00 +0000)
2007-11-29  Juerg 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

svn path=/trunk/; revision=735

15 files changed:
ChangeLog
doc/vala/Makefile.am
doc/vala/classes.xml
doc/vala/default.css
doc/vala/delegates.xml
doc/vala/enums.xml
doc/vala/exceptions.xml [new file with mode: 0644]
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

index 13d1a91c04d1bfe6b4ba1af4de4ed210b464452f..8456d6ae4edc715906744284b53fe329f26671c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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,
index 66882683f99930f9dcc1e51eb1f70a9a16a4d3ee..2c1a7bf10d2d98dd9796afdb71d0797a95bb7e09 100644 (file)
@@ -11,6 +11,7 @@ chapter_data = \
        interfaces.html \
        enums.html \
        delegates.html \
+       exceptions.html \
        $(NULL)
 
 built_data = \
@@ -46,6 +47,7 @@ book_sources = \
        interfaces.xml \
        enums.xml \
        delegates.xml \
+       exceptions.xml \
        $(NULL)
 
 MOSTLYCLEANFILES = $(built_data)
index 812bebbf7561e62ccadbc46de7cb3d655c148a94..85feab50914d0767c2c87d5095c89dd4a8cad67b 100644 (file)
@@ -44,5 +44,21 @@ class NamespaceName.ClassName {
        &lt;class-member&gt;
 }</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>
 
index 756949b1c261629c38db2cb64aa05aeb1bb01cba..b4dfc407d68d8804ab6815eac55d84480d0a7a1f 100644 (file)
@@ -63,3 +63,8 @@ pre {
        margin: 0 2em 1em 2em;
 }
 
+blockquote {
+       font-style: italic;
+       white-space: pre;
+}
+
index 0517ed965aa755f63b65fde6e0c895aa27f2d730..4734e00c020c266c0f747b7355e0372eb9617ecb 100644 (file)
@@ -1,5 +1,9 @@
 <?xml version="1.0"?>
 <section id="delegates">
        <h>Delegates</h>
+       <section id="declaration">
+               <h>Delegate declarations</h>
+               <p>Documentation</p>
+       </section>
 </section>
 
index 5b136752daa74260594ecdf3de247208d42b0a25..357514619395a7f46e99428eea76606816ff7c83 100644 (file)
@@ -1,5 +1,17 @@
 <?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>
 
diff --git a/doc/vala/exceptions.xml b/doc/vala/exceptions.xml
new file mode 100644 (file)
index 0000000..377bc84
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<section id="exceptions">
+       <h>Exceptions</h>
+       <section id="handling">
+               <h>Exception handling</h>
+               <p>Documentation</p>
+       </section>
+</section>
+
index 95e937e386e9c5bbeeb5348caccbbf43276c326e..e2a66ea610db496fe5d112e9fea168ae01f0320c 100644 (file)
@@ -1,5 +1,21 @@
 <?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>
 
index 1a45706be3fd3bb660e3d19cb350eab05a07c63b..e93939f81d0ae12d5e1706185b1bf16f8839f7b0 100644 (file)
@@ -15,6 +15,7 @@
                <xi:include href="interfaces.xml"/>
                <xi:include href="enums.xml"/>
                <xi:include href="delegates.xml"/>
+               <xi:include href="exceptions.xml"/>
        </body>
 </html>
 
index a6925117f0e4df0ca4fb5ba07551447a33b23f7d..6f5f2baa2d9eda2cd4fc32b274f148cbe8d93d32 100644 (file)
@@ -1,5 +1,21 @@
 <?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>
 
index da568ff5550ceac6c51d2c289908b84ac4be8301..683430d130d3eaac85b9e481d6c0f1229b657141 100644 (file)
@@ -1,5 +1,9 @@
 <?xml version="1.0"?>
 <section id="namespaces">
        <h>Namespaces</h>
+       <section id="declaration">
+               <h>Namespace declarations</h>
+               <p>Documentation</p>
+       </section>
 </section>
 
index 421bc9478f5c3e109cb317ade42f7a97bb398fe2..ec124e1e49c879b4322bbc2e2a9e83a02124f606 100644 (file)
@@ -1,5 +1,102 @@
 <?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>
 
index c3ef1cd7d352ca8ba4c3aca03a30a76f5d20340e..378cdea314605603109844090530bc0c982bfe21 100644 (file)
@@ -20,5 +20,17 @@ struct NamespaceName.StructName {
        &lt;struct-member&gt;
 }</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>
 
index 3d6f44b376bade0bf5c2e22add4cd1e06ded2ed3..75a554d3f19dd3d0756d642d1cd07d152c82838f 100644 (file)
@@ -3,5 +3,13 @@
        <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>
 
index 4b62878993036852780d51b341de17ddaa4966fb..006e29048a5ab20b0edb0d00b741d814090d076e 100644 (file)
                <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>
@@ -81,5 +81,8 @@
        <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>