From: Jürg Billeter Date: Thu, 29 Jun 2006 09:58:14 +0000 (+0000) Subject: add interface documentation X-Git-Tag: VALA_0_0_1~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44cb3169cc8a8a3ed5568be3521ff15845523814;p=thirdparty%2Fvala.git add interface documentation 2006-06-29 Jürg Billeter * vala/valacodenode.vala, vala/valaexpression.vala: add interface documentation svn path=/trunk/; revision=56 --- diff --git a/vala/ChangeLog b/vala/ChangeLog index 2908eb8ae..e54900534 100644 --- a/vala/ChangeLog +++ b/vala/ChangeLog @@ -1,3 +1,8 @@ +2006-06-29 Jürg Billeter + + * vala/valacodenode.vala, vala/valaexpression.vala: add interface + documentation + 2006-06-28 Jürg Billeter * vala/valasymbolbuilder.vala: add private add_symbol helper method diff --git a/vala/vala/valacodenode.vala b/vala/vala/valacodenode.vala index 8c4441723..900a9cb4f 100644 --- a/vala/vala/valacodenode.vala +++ b/vala/vala/valacodenode.vala @@ -23,13 +23,47 @@ using GLib; namespace Vala { + /** + * Represents a part of the parsed source code. + * + * Code nodes get created by the parser and are used throughout the + * whole compilation process. + */ public abstract class CodeNode { + /** + * Symbol that corresponds to this code node. + */ public Symbol symbol { get; set; } + + /** + * References the location in the source file where this code + * node has been written. + */ public SourceReference source_reference { get; set; } + + /** + * Contains all attributes that have been specified for this + * code node. + */ public List attributes; + + /** + * Generated CCodeNode that corresponds to this code node. + */ public CCodeNode ccodenode { get; set; } + + /** + * Specifies whether a fatal error has been detected in this + * code node. + */ public bool error { get; set; } - + + /** + * Visits this code node and all children with the specified + * CodeVisitor. + * + * @param visitor the visitor to be called while traversing + */ public abstract void accept (CodeVisitor! visitor); } } diff --git a/vala/vala/valaexpression.vala b/vala/vala/valaexpression.vala index 195e8748b..f3dd96fb9 100644 --- a/vala/vala/valaexpression.vala +++ b/vala/vala/valaexpression.vala @@ -23,24 +23,54 @@ using GLib; namespace Vala { + /** + * Base class for all code nodes that might be used as an expression. + */ public abstract class Expression : CodeNode { - /* filled by semantic analyzer, used by semantic analyzer, - * memory manager and code generator + /** + * The static type of this expression. + * + * The semantic analyzer computes this value. */ public TypeReference static_type { get; set; } - /* filled by semantic analyzer, used by lambda expressions in - * semantic analyzer + /* + * The static type this expression is expected to have. + * + * The semantic analyzer computes this value, lambda expressions + * use it. */ public TypeReference expected_type { get; set; } + /** + * The symbol this expression refers to. + */ public Symbol symbol_reference { get; set; } - /* set by memory manager, used by code generator */ + /** + * Specifies that this expression transfers ownership without a + * receiver being present. + * + * The memory manager computes this value, the code generator + * uses it. + */ public bool ref_leaked { get; set; } + + /** + * Specifies that this expression is expected to transfer + * ownership but doesn't. + * + * The memory manager computes this value, the code generator + * uses it. + */ public bool ref_missing { get; set; } - /* set and used by code generator */ + /** + * Contains all temporary variables this expression requires + * for execution. + * + * The code generator sets and uses them for memory management. + */ public List temp_vars; } }