acorn(1)

NAME
acorn - parse JavaScript file

SYNOPSIS
\FCacorn\F[]
[\FC--ecma3\F[] | \FC--ecma5\F[] | \FC--ecma6\F[] | \FC--ecma7\F[] | \FC...\F[] | \FC--ecma2015\F[] | \FC--ecma2016\F[]] [\FC--tokenize\F[]] [\FC--locations\F[]] [\FC--allow-hash-bang\F[]] [\FC--compact\F[]] [\FC--silent\F[]] [\FC--module\F[]] [\FC--help\F[]] [\FC--\F[]] [\FCinfile\F[]]

DESCRIPTION
acorn is a utility to parse a JavaScript file from the command line. It accepts as arguments the input file. The utility spits out the syntax tree as JSON data.

OPTIONS

\FC--ecma3\F[], \FC--ecma5\F[], \FC--ecma6\F[], \FC--ecma7\F[], \FC...\F[], \FC--ecma2015\F[], \FC--ecma2016\F[]
    Sets the ECMAScript version to parse. Default is version 7.

\FC--tokenize\F[]
    Tokenizer mode of the parser.

\FC--locations\F[]
    Attaches a "loc" object to each node with "start" and "end" subobjects, each of which contains the one-based line and zero-based column numbers in {line, column} form.

\FC--allow-hash-bang\F[]
    If enabled, skip the leading hashbang line.

\FC--compact\F[]
    No whitespace is used in the AST output.

\FC--silent\F[]
    Do not output the AST, just return the exit status.

\FC--module\F[]
    Indicates the code shouldn't be parsed as a script but as a module. This influences global strict mode and 'import' and 'export' declarations.

\FC--help\F[]
    Print the usage information and quit.