From 44cb3169cc8a8a3ed5568be3521ff15845523814 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Thu, 29 Jun 2006 09:58:14 +0000 Subject: [PATCH] add interface documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2006-06-29 Jürg Billeter * vala/valacodenode.vala, vala/valaexpression.vala: add interface documentation svn path=/trunk/; revision=56 --- vala/ChangeLog | 5 +++++ vala/vala/valacodenode.vala | 36 +++++++++++++++++++++++++++++++++++- vala/vala/valaexpression.vala | 42 ++++++++++++++++++++++++++++++++++++------ 3 files changed, 76 insertions(+), 7 deletions(-) diff --git a/vala/ChangeLog b/vala/ChangeLog index 2908eb8..e549005 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 8c44417..900a9cb 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 195e874..f3dd96f 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; } } -- 2.7.4