diff trunk/src/dil/SourceText.d @ 798:c24be8d4f6ab

Added documentation comments.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 01 Mar 2008 02:53:06 +0100
parents 90668b83ae5e
children
line wrap: on
line diff
--- a/trunk/src/dil/SourceText.d	Fri Feb 29 22:51:24 2008 +0100
+++ b/trunk/src/dil/SourceText.d	Sat Mar 01 02:53:06 2008 +0100
@@ -18,6 +18,7 @@
   string filePath; /// The file path to the source text. Mainly used for error messages.
   char[] data; /// The UTF-8, zero-terminated source text.
 
+  /// Constructs a SourceText object.
   /// Params:
   ///   filePath = file path to the source file.
   ///   loadFile = whether to load the file in the constructor.
@@ -27,6 +28,7 @@
     loadFile && load();
   }
 
+  /// Constructs a SourceText object.
   /// Params:
   ///   filePath = file path for error messages.
   ///   data = memory buffer.
@@ -37,6 +39,7 @@
     addSentinelCharacter();
   }
 
+  /// Loads the source text from a file.
   void load(InfoManager infoMan = null)
   {
     if (!infoMan)
@@ -50,6 +53,7 @@
     addSentinelCharacter();
   }
 
+  /// Adds '\0' to the text (if not already there.)
   private void addSentinelCharacter()
   {
     if (data.length == 0 || data[$-1] != 0)