Skip to content

Instantly share code, notes, and snippets.

@gjtorikian
Created September 20, 2012 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gjtorikian/3758012 to your computer and use it in GitHub Desktop.
Save gjtorikian/3758012 to your computer and use it in GitHub Desktop.
ruby blob of jsduck
if exp && ext_define?(exp)
make_class(to_value(exp["arguments"][0]), exp)
# foo = Ext.extend("Parent", {})
elsif exp && assignment?(exp) && ext_extend?(exp["right"])
make_class(to_s(exp["left"]), exp["right"])
# Foo = ...
elsif exp && assignment?(exp) && class_name?(to_s(exp["left"]))
make_class(to_s(exp["left"]), exp["right"])
else
make_property()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment