Skip to content

Commit

Permalink
Remove old 'Mozilla Parser API' terminology
Browse files Browse the repository at this point in the history
Closes #1258
  • Loading branch information
marijnh committed Nov 3, 2023
1 parent c3ec702 commit 494ecc8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions acorn-loose/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// parse anything as JavaScript, repairing syntax error the best it
// can. There are circumstances in which it will raise an error and
// give up, but they are very rare. The resulting AST will be a mostly
// valid JavaScript AST (as per the [Mozilla parser API][api], except
// valid JavaScript AST (as per the [ESTree spec][estree], except
// that:
//
// - Return outside functions is allowed
Expand All @@ -16,7 +16,7 @@
// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
// the parser got too confused to return anything meaningful.
//
// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
// [estree]: https://github.com/estree/estree
//
// The expected use for this is to *first* try `acorn.parse`, and only
// if that fails switch to the loose parser. The loose parser might
Expand Down
4 changes: 2 additions & 2 deletions acorn-walk/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// AST walker module for Mozilla Parser API compatible trees
// AST walker module for ESTree compatible trees

// A simple walk is one where you simply specify callbacks to be
// called on specific nodes. The last two arguments are optional. A
Expand All @@ -8,7 +8,7 @@
// Expression: function(node) { ... }
// });
//
// to do something with all expressions. All Parser API node types
// to do something with all expressions. All ESTree node types
// can be used to identify node types, as well as Expression and
// Statement, which denote categories of nodes.
//
Expand Down
7 changes: 3 additions & 4 deletions acorn/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ Parser.acorn = {
}

// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
// returns an abstract syntax tree as specified by [Mozilla parser
// API][api].
// browser) is a `parse` function that takes a code string and returns
// an abstract syntax tree as specified by the [ESTree spec][estree].
//
// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
// [estree]: https://github.com/estree/estree

export function parse(input, options) {
return Parser.parse(input, options)
Expand Down

0 comments on commit 494ecc8

Please sign in to comment.