<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,12 +11,9 @@ Test cases:
 * parse errors
 
 Parser:
-* null (void?)
-* Any (*)
 * can property name be string?
 
 Conformance:
-* Any = (null, undefined, Object)
 * byte
 
 Future:</diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -39,7 +39,7 @@ module JCON
       end
     end
     
-    class StructureType &lt; Type
+    class RecordType &lt; Type
       def contains?(value)
         return false unless value.is_a?(Hash)
         value.each do |k, v|</diff>
      <filename>lib/jcon/conformance.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,6 +42,9 @@ module JCON
     end
     
     def add_builtin_definitions
+      deftype(:*) do true end
+      deftype(:null) do |x| x.nil? end
+      deftype(:undefined) do |x| x.nil? end
       deftype(:Object) do true end
       deftype(:Array)
       deftype(:Date)
@@ -50,11 +53,11 @@ module JCON
       deftype(:String)
       deftype(:Number, Numeric)
       deftype(:boolean, [false,true])
-      deftype(:string) do |value| value.is_a?(String) end
-      deftype(:int) do |value| value.is_a?(Integer) end
-      deftype(:uint) do |value| value.is_a?(Integer) and value &gt; 0 end
-      deftype(:double) do |value| value.is_a?(Numeric) end
-      deftype(:decimal) do |value| value.is_a?(Numeric) end
+      deftype(:string) do |x| x.is_a?(String) end
+      deftype(:int) do |x| x.is_a?(Integer) end
+      deftype(:uint) do |x| x.is_a?(Integer) and x &gt; 0 end
+      deftype(:double) do |x| x.is_a?(Numeric) end
+      deftype(:decimal) do |x| x.is_a?(Numeric) end
       deftype :AnyString, union(:string, String)
       deftype :AnyBoolean, union(:boolean, :Boolean) 
       deftype :AnyNumber, union(:byte, :int, :uint, :double, :decimal,:Number) </diff>
      <filename>lib/jcon/dictionary.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,16 +52,19 @@ module JCON
     end
     
     def parse_type
+      skip(IGNORE)
       type = case
-             when id = sscan(IDENTIFIER)
+             when id = scan(IDENTIFIER)
                simple_type(id)
-             when sscan(/\[/)
+             when scan(/\*/)
+               simple_type('*')
+             when scan(/\[/)
                types = parse_types_until(/\]/)
                list(*types)
-             when sscan(/\(/)
+             when scan(/\(/)
                types = parse_types_until(/\)/)
                union(*types)
-             when sscan(/\{/)
+             when scan(/\{/)
                parse_structure_type
              else
                parse_error
@@ -103,7 +106,7 @@ module JCON
         type = parse_type
         map[name.intern] = type
       end
-      StructureType.new(map)
+      RecordType.new(map)
     end
     
     def expect(name, pattern)</diff>
      <filename>lib/jcon/parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,7 +49,7 @@ module JCON
       def to_s; &quot;(#{types.join(', ')})&quot;; end
     end
     
-    class StructureType &lt; Type
+    class RecordType &lt; Type
       attr_reader :properties
       def initialize(properties);
         @properties = properties</diff>
      <filename>lib/jcon/types.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,17 +2,24 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
 
 describe JCON do
   describe :conforms? do
-    it &quot;should test boolean types&quot; do
-      type = JCON::parse('boolean')
+    it &quot;should test the Any type&quot; do
+      type = JCON::parse('*')
       type.contains?(false).should == true
-      type.contains?(true).should == true
-      type.contains?('s').should == false
-      type.contains?(nil).should == false
-      
-      type = JCON::parse('Boolean')
-      type.contains?(false).should == true
-      type.contains?(true).should == true
-      type.contains?('s').should == false
+      type.contains?(0).should == true
+      type.contains?(1).should == true
+    end
+    
+    it &quot;should test the null type&quot; do
+      type = JCON::parse('null')
+      type.contains?(false).should == false
+      type.contains?(0).should == false
+      type.contains?(nil).should == true
+    end
+    
+    it &quot;should test the undefined type&quot; do
+      type = JCON::parse('undefined')
+      type.contains?(false).should == false
+      type.contains?(0).should == false
       type.contains?(nil).should == true
     end
     
@@ -126,7 +133,7 @@ describe JCON do
       type.contains?(['s',true,3]).should == false
     end
     
-    it &quot;should test structure types&quot; do
+    it &quot;should test record types&quot; do
       type = JCON::parse('{a:int, b:string}')
       type.contains?('s').should == false
       
@@ -145,10 +152,9 @@ describe JCON do
       type.contains?({'a' =&gt; 1, 'b' =&gt; 's', :c =&gt; false}).should == false
     end
     
-    it &quot;should test null type&quot;
     it &quot;should test type definitions&quot;
     
-    it &quot;should test unknown types&quot; do
+    it &quot;should raise an error when for unknown&quot; do
       type = JCON::parse('S')
       lambda { type.contains?('s') }.should raise_error('No definition for S')
     end</diff>
      <filename>spec/conformance_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,9 +35,12 @@ describe JCON::Matchers do
       [].should_not conform_to_js('[Array, (int, boolean)]')
       [1, 2].should_not conform_to_js('[Array, (int, boolean)]')
       [[1], nil].should_not conform_to_js('[Array, (int, boolean)]')
-      
-      pending { {'x' =&gt; 1, 'y' =&gt; 2}.should conform_to_js('{x: double, y: double, z: double?}') }
       {'x' =&gt; 1, 'y' =&gt; 2, 'z' =&gt; 3}.should conform_to_js('{x: double, y: double, z: double?}')
+      [[[1], 2], {'x' =&gt; 1, 'y' =&gt; 2, 'z' =&gt; 3}].should conform_to_js('[[Array, (int, boolean)], {x: double, y: double, z: double?}]')
+    end
+    
+    it &quot;should test optional properties&quot; do
+      pending { {'x' =&gt; 1, 'y' =&gt; 2}.should conform_to_js('{x: double, y: double, z: double?}') }
     end
   end
 end</diff>
      <filename>spec/matchers_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,9 +33,9 @@ describe JCON::Parser do
       type.should be_an_instance_of(JCON::Types::OptionalType)
     end
     
-    it &quot;should parse a structure type&quot; do
+    it &quot;should parse a record type&quot; do
       type = JCON::Parser.parse('type T = {a:string?, b:int}')[:T]
-      type.should be_an_instance_of(JCON::Types::StructureType)
+      type.should be_an_instance_of(JCON::Types::RecordType)
     end
     
     it &quot;should parse a basic type definition&quot; do</diff>
      <filename>spec/parser_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>782f65740af0a61eb90747f2ff627c93ccc2b87a</id>
    </parent>
  </parents>
  <author>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </author>
  <url>http://github.com/osteele/jcon/commit/db1b84ae6aace29866f8f9f9c2761cdfa5750229</url>
  <id>db1b84ae6aace29866f8f9f9c2761cdfa5750229</id>
  <committed-date>2008-04-15T07:20:26-07:00</committed-date>
  <authored-date>2008-04-15T07:17:48-07:00</authored-date>
  <message>Any type; StructureType -&gt; RecordType</message>
  <tree>df0508944296ec0f4a368fc6ed93e297deb3c30f</tree>
  <committer>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </committer>
</commit>
