[Pkg-javascript-commits] [node-acorn-jsx] 78/484: [loose parser] Add note about imprecision

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-acorn-jsx.

commit 3981dfa133bd9ff7eb83bc0a2decbaea42cbf5bd
Author: Marijn Haverbeke <marijnh at gmail.com>
Date:   Wed Jan 16 17:43:27 2013 +0100

    [loose parser] Add note about imprecision
---
 acorn_loose.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/acorn_loose.js b/acorn_loose.js
index 81f5f2f..f31c7ea 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -18,6 +18,11 @@
 //
 // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
 //
+// The expected use for this is to *first* try `acorn.parse`, and only
+// if that fails switch to `parse_dammit`. The loose parser might
+// parse badly indented code incorrectly, so **don't** use it as
+// your default parser.
+//
 // Quite a lot of acorn.js is duplicated here. The alternative was to
 // add a *lot* of extra cruft to that file, making it less readable
 // and slower. Copying and editing the code allowed me to make

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git



More information about the Pkg-javascript-commits mailing list