Open mvcisback opened 10 years ago
Maybe we should consider handing this off to a http://ternjs.net/ server. The algorithm doesn't appear to be as sophisticated as CFA2 in doctorjs, but its actively maintained.
Relevant blog post: http://marijnhaverbeke.nl/blog/tern.html
And now we're using it in Firefox's new WebIDE, so we'd have mutual question-asking ability with the Dev Tools team. jlongster on IRC might be a good one to ask what he thinks of ternjs, or at least he'd know who knows.
Here's a test branch https://github.com/mvcisback/spiderflunky/tree/tern that uses ternjs to infer the types.
Annotate the Syntax Tree with types (this will be probabilistic in the general case, so we should support annotating multiple types for a given symbol)