<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -477,11 +477,12 @@ class Compiler
   # Compiles a class definition.
   # Takes the current scope, the name of the class as well as a list of expressions
   # that belong to the class.
-  def compile_class(scope, name, *exps)
+  def compile_class(scope, name,superclass, *exps)
     @e.comment(&quot;=== class #{name} ===&quot;)
 
     cscope = ClassScope.new(scope, name, @vtableoffsets)
 
+    # FIXME: Need to be able to handle re-opening of classes
     # FIXME: (If this class has a superclass, copy the vtable from the superclass as a starting point)
     # FIXME: Fill in all unused vtable slots with __method_missing
     # FIXME: Need to generate &quot;thunks&quot; for __method_missing that knows the name of the slot they are in, and</diff>
      <filename>compiler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -80,7 +80,7 @@ Feature: Parser
 
 	Examples:
 	  | expr                          | tree                                          | notes                                         |
-      | &quot;class Foo; end&quot;              | [:do, [:class, :Foo, []]]                     |                                               |
+      | &quot;class Foo; end&quot;              | [:do, [:class, :Foo, :Object, []]]            |                                               |
       | &quot;class Foo &lt; Bar; end&quot;        | [:do, [:class, :Foo, :Bar, []]]               |                                               |
 
     @control</diff>
      <filename>features/parser.feature</filename>
    </modified>
    <modified>
      <diff>@@ -257,11 +257,10 @@ class Parser &lt; ParserBase
     if expect(&quot;&lt;&quot;)
       ws
       superclass = expect(Atom) or expected(&quot;superclass&quot;)
-      # FIXME: Include superclass in tree
     end
     exps = zero_or_more(:exp)
     expect(:end) or expected(&quot;expression or 'end'&quot;)
-    return E[pos, type.to_sym, name, exps]
+    return E[pos, type.to_sym, name, superclass || :Object, exps]
   end
 
 </diff>
      <filename>parser.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e125f0057cc203ee37d328e49b7c179a503dbc1e</id>
    </parent>
  </parents>
  <author>
    <name>Vidar Hokstad</name>
    <email>vidar@hokstad.com</email>
  </author>
  <url>http://github.com/vidarh/writing-a-compiler-in-ruby/commit/83d2d1e3b31990a7d6696629be914c928f84fee9</url>
  <id>83d2d1e3b31990a7d6696629be914c928f84fee9</id>
  <committed-date>2009-07-28T04:26:44-07:00</committed-date>
  <authored-date>2009-07-28T04:26:44-07:00</authored-date>
  <message>Added superclass name to parse tree (defaulting to Object)</message>
  <tree>81fca7c6afd52fb6d97fe684ca800ed55ccd5626</tree>
  <committer>
    <name>Vidar Hokstad</name>
    <email>vidar@hokstad.com</email>
  </committer>
</commit>
