[Swift-commit] r2585 - trunk/resources

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Feb 22 11:27:01 CST 2009


Author: benc
Date: 2009-02-22 11:27:01 -0600 (Sun, 22 Feb 2009)
New Revision: 2585

Modified:
   trunk/resources/swiftscript.g
Log:
Lexer treats "bool" as a token, but it should have "boolean" in that place.
In execution, this turns out to not cause a problem because boolean
declarations are passed through as if they were user-declared types, and
the rest of the stack does not distinguish between inbuilt and
user-declared types in a way that causes a problem.

Modified: trunk/resources/swiftscript.g
===================================================================
--- trunk/resources/swiftscript.g	2009-02-22 17:26:27 UTC (rev 2584)
+++ trunk/resources/swiftscript.g	2009-02-22 17:27:01 UTC (rev 2585)
@@ -453,13 +453,15 @@
         }
     ;
 
+// TODO unnecessary complexity here - this should work ok matching
+// only ID
 type returns [StringTemplate code=null]
 {String s = null;}
     :
      ( ( "int" {s="int"; } )
      | ( "float" {s="float"; } )
      | ( "string" {s="string"; } )
-     | ( "bool" {s="bool"; } )
+     | ( "boolean" {s="boolean"; } )
      | ( id:ID {s=id.getText();} )
      ) 
         {




More information about the Swift-commit mailing list