Giter VIP home page Giter VIP logo

treehugger's People

Contributors

bnoordhuis avatar fjakobs avatar hyandell avatar lazyval avatar lennartcl avatar mostafaeweda avatar nightwing avatar orthographic-pedant avatar zefhemel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

treehugger's Issues

New NPM release

I'd love to be able to declare this as a dependency in my node library, but a new version hasn't been released in 2 years. Any chance we could get a version bump and a package deploy?

Include function arguments in the demo as declared variables and update acorn

Just a tweak to the example.

ast.traverseTopDown(
    'VarDecl(x)',
    function(b) {
        declared[b.x.value] = true;
    },
    'VarDeclInit(x, _)',
    function(b) {
        declared[b.x.value] = true;
    },
    'FArg(x)',
    function(b) {
        declared[b.x.value] = true;
    },
    'Var(x)',
    function(b) {
        if (!declared[b.x.value]) {
            log("Variable " + b.x.value + " is not declared.");
        }
    }
);

And requesting that acorn be updated (with a link to the commit that you're modifying somewhere before modification to make it easier to track down just what changes you're doing for future updates). Acorn now handles ECMA 3-6 where 0.4.1 didn't.

Great program, looking forward to working on it.

The "Not yet supported" message is crashing chrome

In parse.js there is a console.log("Not yet supported: " + nodeName) line, which feeds chrome's log buffer until it crashes. I had to comment that line to keep cloud9 usable. For me it prints these two:

  • Not yet supported: TemplateLiteral
  • Not yet supported: Super

Maybe, if you really want to keep that message, it would be nice to log each unsupported node type just once?

something parse wrong.

function fn(){};
(function fn(){});

all of those are parse as

  Function(
      "fn",
      [],
      []
  )

but

(function fn(){  /* fn is *Effective* in this Scope */  }());
console.log(typeof fn);// undefined  -->  but lost effective when out of "(   )";

Preserve comments?

From using your online demo, it seems that comments don't appear in the AST. I am aware that the standard version of Narcissus does not preserve comments, but other products, like JsShaper do preserve comments. Is this possible with treehugger?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.