From 3981dfa133bd9ff7eb83bc0a2decbaea42cbf5bd Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 16 Jan 2013 17:43:27 +0100 Subject: [PATCH] [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 81f5f2fa48..f31c7eaaf1 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