public
Description: Javascript Abstract Behavior Syntax
Clone URL: git://github.com/collin/jabs.git
def working(probably) that test is   probably flawed, will fix
collin (author)
Wed Aug 13 01:50:34 -0700 2008
commit  5fc8b3f599a7e251fafce79546dd32193b8bebe9
tree    d825c068f3a06e67da8354fedf799c2d59b969aa
parent  9b23b939913bf44e97d7b6b1714ce553144f8cb9
...
72
73
74
 
 
 
 
 
 
 
 
75
76
77
...
72
73
74
75
76
77
78
79
80
81
82
83
84
85
0
@@ -72,6 +72,14 @@ module Jabs
0
       [:function, name, arg_names, [:source_elements, render_children]]
0
     end
0
 
0
+ folds :Def, /^def / do
0
+ parts = text.split(/ /)
0
+ name, arg_names = parts.shift, parts.join('').gsub(' ', '').split(',')
0
+ [:assign_expr,
0
+ access(access([:name, "jQuery"], [:name, "fn"]), [:name, name]),
0
+ [:function, nil, arg_names, [:source_elements, [parse("var $this = this")] + render_children]]]
0
+ end
0
+
0
     folds :If, /^if / do
0
       _if = johnsonize [:if, parse(text),[:source_elements, render_children], nil]
0
       @waiting_else = _if

Comments

    No one has commented yet.