Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division becomes a single-line comment #29

Closed
RGustBardon opened this issue Jul 20, 2012 · 2 comments
Closed

Division becomes a single-line comment #29

RGustBardon opened this issue Jul 20, 2012 · 2 comments

Comments

@RGustBardon
Copy link
Contributor

With options.format.compact enabled, the problem described at http://code.google.com/p/closure-compiler/issues/detail?id=620 can be observed.

TEMP=$(mktemp)
echo '/ / / / /' | tee "$TEMP"
node <<ENDH
console.log(require("util").inspect(
    require(process.env.HOME + "/github/ariya/esprima/esprima.js").parse(
        "/ / / / /", {comment: true}), null, null))
ENDH
v8 \
  "$HOME/github/ariya/esprima/esprima.js" \
  "$HOME/github/Constellation/escodegen/escodegen.js" \
  /dev/stdin > "$TEMP" <<'ENDH'
print(escodegen.generate(esprima.parse("/ / / / /"), {format: {compact:true}}))
ENDH
cat "$TEMP"
node <<ENDH
console.log(require("util").inspect(
    require(process.env.HOME + "/github/ariya/esprima/esprima.js").parse(
        require("fs").readFileSync("$TEMP"), {comment: true}), null, null))
ENDH

Tested on Ubuntu 12.04 LTS with ariya/esprima@465a4ea and 5de45f6

@Constellation
Copy link
Member

Thanks, I've fixed it!

@Constellation
Copy link
Member

subsequent commit d37058a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants