diff trunk/src/dil/semantic/SymbolTable.d @ 798:c24be8d4f6ab

Added documentation comments.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 01 Mar 2008 02:53:06 +0100
parents 041eae272362
children
line wrap: on
line diff
--- a/trunk/src/dil/semantic/SymbolTable.d	Fri Feb 29 22:51:24 2008 +0100
+++ b/trunk/src/dil/semantic/SymbolTable.d	Sat Mar 01 02:53:06 2008 +0100
@@ -8,14 +8,13 @@
 import dil.lexer.Identifier;
 import common;
 
-/++
-  Maps an identifier string to a Symbol.
-+/
+/// Maps an identifier string to a Symbol.
 struct SymbolTable
 {
-  Symbol[char[]] table;
+  Symbol[char[]] table; /// The table data structure.
 
-  /// Look up ident in the table.
+  /// Looks up ident in the table.
+  /// Returns: the symbol if there, otherwise null.
   Symbol lookup(Identifier* ident)
   {
     assert(ident !is null);
@@ -23,8 +22,9 @@
     return psym ? *psym : null;
   }
 
-  void insert(Symbol s, Identifier* ident)
+  /// Inserts a symbol into the table.
+  void insert(Symbol symbol, Identifier* ident)
   {
-    table[ident.str] = s;
+    table[ident.str] = symbol;
   }
 }