changeset 519:9ebc799c7dc5

Fixes in dil.Parser.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 15 Dec 2007 19:00:23 +0100
parents 8f86bb9ef715
children f203c5248d0b
files trunk/src/dil/Lexer.d trunk/src/dil/Parser.d
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/dil/Lexer.d	Sat Dec 15 18:55:06 2007 +0100
+++ b/trunk/src/dil/Lexer.d	Sat Dec 15 19:00:23 2007 +0100
@@ -2531,12 +2531,12 @@
     return d;
   }
 
-  private void encodeUTF8(ref char[] str, dchar d)
+  static void encodeUTF8(ref char[] str, dchar d)
   {
-    char[6] b = void;
     assert(!isascii(d), "check for ASCII char before calling encodeUTF8().");
     assert(isValidChar(d), "check if character is valid before calling encodeUTF8().");
 
+    char[6] b = void;
     if (d < 0x800)
     {
       b[0] = 0xC0 | (d >> 6);
--- a/trunk/src/dil/Parser.d	Sat Dec 15 18:55:06 2007 +0100
+++ b/trunk/src/dil/Parser.d	Sat Dec 15 19:00:23 2007 +0100
@@ -2160,7 +2160,6 @@
         if (next == T.Comma || next == T.Semicolon || next == T.RParen)
         {
           ident = requireIdentifier(MSG.ExpectedVariableName);
-          nT();
           break;
         }
         // fall through
@@ -4465,7 +4464,7 @@
     auto ExpectedTemplateName = "expected template name, not '{}'";
     auto ExpectedAnIdentifier = "expected an identifier, not '{}'";
     auto IllegalStatement = "illegal Statement found: ";
-    auto ExpectedNonEmptyStatement = "didn't expect ';', use { } instead";
+    auto ExpectedNonEmptyStatement = "didn't expect ';', use {{ }} instead";
     auto ExpectedScopeIdentifier = "expected 'exit', 'success' or 'failure', not '{}'";
     auto InvalidScopeIdentifier = "'exit', 'success', 'failure' are valid scope identifiers, but not '{}';";
     auto ExpectedIntegerAfterAlign = "expected an integer after align, not '{}'";