<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,10 +4,10 @@ Treetop.load_from_string &lt;&lt;-GRAMMAR
 module SimpleAssignment
   grammar Grammar
     rule assignment
-      lhs:variable space* &quot;=&quot; space* rhs:variable &lt;create_node(:assignment)&gt;
+      lhs:variable space* &quot;=&quot; space* rhs:variable &lt;node(:assignment)&gt;
     end
     rule variable
-      [a-z]+ &lt;create_node(:variable)&gt;
+      [a-z]+ &lt;node(:variable)&gt;
     end
     rule space
       [ ]+</diff>
      <filename>examples/simple_assignment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ module TireSwing::NodeDefinition
     # You can define the grammar as
     #
     #   rule variable
-    #     [a-z]+ &lt;create_node(:variable)&gt;
+    #     [a-z]+ &lt;node(:variable)&gt;
     #   end
     #
     # Also note that you can specify alternate namespaces:
@@ -28,6 +28,16 @@ module TireSwing::NodeDefinition
     #
     #   &lt;AST.create_node(:variable)&gt;
     #
+    # When you're using the parser extension:
+    #
+    #   TireSwing.parses_grammar(Grammar, AST)
+    #
+    # you can use
+    #
+    #   &lt;node(...)&gt;
+    #
+    # Which is an instance method wrapper for the create_node class method.
+    #
     def create_node(name)
       TireSwing::NodeCreator.new(name, const_get(name.to_s.camelize))
     end
@@ -82,7 +92,7 @@ module TireSwing::NodeDefinition
     # Simple example:
     #
     #   rule assignment
-    #     variable:lhs &quot;=&quot; variable:rhs &lt;create_node(:assignment)&gt;
+    #     variable:lhs &quot;=&quot; variable:rhs &lt;node(:assignment)&gt;
     #   end
     #   rule variable
     #     [a-z]+
@@ -109,7 +119,7 @@ module TireSwing::NodeDefinition
     # arrays of different kind of nodes, some of which you want to ignore, e.g.:
     #
     #   rule assignments
-    #     assignment* &lt;create_node(:assignments)&gt;
+    #     assignment* &lt;node(:assignments)&gt;
     #   end
     #
     #   node :assignments, :assignments =&gt; array_of(:assignment)
@@ -177,20 +187,13 @@ module TireSwing::NodeDefinition
 
   end
 
-  # Include this module to get access to the node and create_node methods.
-  # A good place to include this is in a separate AST module, e.g.
+  # Include this module to get access to the node and create_node class methods.
   #
   #   module AST
   #     include NodeDefinition
   #     node :foo
   #   end
   #
-  # And then in your grammar:
-  #
-  #   rule foo
-  #     &quot;foo&quot; &lt;AST.create_node(:foo)&gt;
-  #   end
-  #
   def self.included(base)
     base.extend ModuleMethods
   end</diff>
      <filename>lib/tire_swing/node_definition.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,8 +17,8 @@ module TireSwing
   # Extends the treetop-provided grammar parser with a .ast class method for simple parsing and building of
   # an AST defined by TireSwing. Takes the grammar module as an argument.
   #
-  # Additionally, in case you are using bare &lt;create_node(...)&gt; calls in your grammar, this defines a method on
-  # the grammar parser to delegate to the grammar so create_node calls happen correctly.
+  # Additionally, this defines a #node method on the grammar to delegate to the class or the AST to create
+  # new nodes, e.g. &lt;node(:variable)&gt; instead of &lt;AST.create_node(:variable)&gt;
   #
   # You can specify an alternate module which contains the AST if desired.
   def self.parses_grammar(grammar, ast=nil)
@@ -26,7 +26,7 @@ module TireSwing
     ast ||= grammar
     parser.module_eval do
       extend ParserExtension
-      define_method(:create_node) { |*args| ast.create_node(*args) }
+      define_method(:node) { |*args| ast.create_node(*args) }
     end
   end
 </diff>
      <filename>lib/tire_swing/parser_extension.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,15 +5,15 @@ Treetop.load_from_string &lt;&lt;-GRAMMAR
 module Lists
   grammar Grammar
     rule lists
-      (list [\n])+ &lt;create_node(:lists)&gt;
+      (list [\n])+ &lt;node(:lists)&gt;
     end
     
     rule list
-      &quot;[&quot; whitespace* number (&quot;,&quot; whitespace* number)* &quot;]&quot; &lt;create_node(:list)&gt;
+      &quot;[&quot; whitespace* number (&quot;,&quot; whitespace* number)* &quot;]&quot; &lt;node(:list)&gt;
     end
 
     rule number
-      [1-9] [0-9]* &lt;create_node(:number)&gt;
+      [1-9] [0-9]* &lt;node(:number)&gt;
     end
 
     rule whitespace</diff>
      <filename>spec/grammars/lists.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,10 @@ Treetop.load_from_string &lt;&lt;-GRAMMAR
 module MagicAssignments
   grammar Grammar
     rule assignments
-      ( blank_line / assignment )* &lt;create_node(:assignments)&gt;
+      ( blank_line / assignment )* &lt;node(:assignments)&gt;
     end
     rule assignment
-      lhs:variable whitespace* &quot;=&quot; whitespace* rhs:variable [\\n] &lt;create_node(:assignment)&gt;
+      lhs:variable whitespace* &quot;=&quot; whitespace* rhs:variable [\\n] &lt;node(:assignment)&gt;
     end
     rule variable
       [a-z]+</diff>
      <filename>spec/grammars/magic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,16 +16,16 @@ describe TireSwing::ParserExtension do
       FooParser.should respond_to(:ast)
     end
 
-    it &quot;defines a create_node method on the parser that delegates to the grammar&quot; do
+    it &quot;defines a node method on the parser that delegates to the grammar&quot; do
       TireSwing.parses_grammar(Foo)
       Foo.should_receive(:create_node).with(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
-      FooParser.new.create_node(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
+      FooParser.new.node(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
     end
 
     it &quot;defines a create_node method on the parser that delegates to the given AST, if provided&quot; do
       TireSwing.parses_grammar(Foo, AST)
       AST.should_receive(:create_node).with(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
-      FooParser.new.create_node(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
+      FooParser.new.node(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
     end
 
   end
@@ -37,10 +37,10 @@ describe TireSwing::ParserExtension do
 module TestGramma
   grammar Grammar
     rule letters
-      letter* &lt;create_node(:letters)&gt;
+      letter* &lt;node(:letters)&gt;
     end
     rule letter
-      value:[a-z] [\n]? &lt;create_node(:letter)&gt;
+      value:[a-z] [\n]? &lt;node(:letter)&gt;
     end
   end
 end</diff>
      <filename>spec/parser_extension_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3f498bf0a085b2aaae470f109f0f4020d3265172</id>
    </parent>
  </parents>
  <author>
    <name>Nathan Witmer</name>
    <email>nwitmer@gmail.com</email>
  </author>
  <url>http://github.com/aniero/tire_swing/commit/66662475c9179d39547b397172f53c36882c9c5a</url>
  <id>66662475c9179d39547b397172f53c36882c9c5a</id>
  <committed-date>2008-08-11T06:59:45-07:00</committed-date>
  <authored-date>2008-08-11T06:59:45-07:00</authored-date>
  <message>Replaced #create_node helper in grammar with #node and updated documentation.</message>
  <tree>8ec03608777e97e58fd72b82a905f3618899e321</tree>
  <committer>
    <name>Nathan Witmer</name>
    <email>nwitmer@gmail.com</email>
  </committer>
</commit>
