GithubHelp home page GithubHelp logo

Add support for quirks about escodegen HOT 3 OPEN

estools avatar estools commented on May 16, 2024
Add support for quirks

from escodegen.

Comments (3)

Constellation avatar Constellation commented on May 16, 2024

putting a do-while statement of an if statement in a block (if(x)do{foo()}while(y);),
putting sole functions in a block (if (true) function foo(){return}),

We need garantee that parse(escodegen.generate(parse(code))) structurally equals to parse(code) for modulability, so adding block is out of escodegen works.

from escodegen.

RGustBardon avatar RGustBardon commented on May 16, 2024

@Constellation: True.

from escodegen.

RGustBardon avatar RGustBardon commented on May 16, 2024

Does Safari 1.2 throw 42 on the following Web page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title><script type="text/javascript">function foo(){throw 42
{}}try{foo()}catch(e){alert(e)}</script></head><body></body></html>

In other words, would an automatic semicolon insertion be an alternative to terminating the throw statement with a semicolon in such cases? In cases such as throw 42 U+000A +42 a semicolon would still have to be used.

Breaking lines after an arbitrary number of characters would be of lower priority once #26 is implemented.

from escodegen.

Related Issues (20)

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.