{
    "mode": "man",
    "parameter": "acorn",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/acorn/1/json",
    "generated": "2026-05-30T06:07:02Z",
    "synopsis": "acorn [--ecma3 | --ecma5 | --ecma6 | --ecma7 | ... | --ecma2015 | --ecma2016] [--tokenize]\n[--locations] [--allow-hash-bang] [--compact] [--silent] [--module] [--help] [--]\n[infile]",
    "sections": {
        "NAME": {
            "content": "acorn - parse JavaScript file\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "acorn [--ecma3 | --ecma5 | --ecma6 | --ecma7 | ... | --ecma2015 | --ecma2016] [--tokenize]\n[--locations] [--allow-hash-bang] [--compact] [--silent] [--module] [--help] [--]\n[infile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "acorn is a utility to parse a JavaScript file from the command line.  It accepts as arguments\nthe input file.  The utility spits out the syntax tree as JSON data.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--ecma3, --ecma5, --ecma6, --ecma7, ..., --ecma2015, --ecma2016\nSets the ECMAScript version to parse.  Default is version 7.\n",
            "subsections": [
                {
                    "name": "--tokenize",
                    "content": "Tokenizer mode of the parser.\n",
                    "long": "--tokenize"
                },
                {
                    "name": "--locations",
                    "content": "Attaches a \"loc\" object to each node with \"start\" and \"end\" subobjects, each of  which\ncontains the one-based line and zero-based column numbers in {line, column} form.\n",
                    "long": "--locations"
                },
                {
                    "name": "--allow-hash-bang",
                    "content": "If enabled, skip the leading hashbang line.\n",
                    "long": "--allow-hash-bang"
                },
                {
                    "name": "--compact",
                    "content": "No whitespace is used in the AST output.\n",
                    "long": "--compact"
                },
                {
                    "name": "--silent",
                    "content": "Do not output the AST, just return the exit status.\n",
                    "long": "--silent"
                },
                {
                    "name": "--module",
                    "content": "Indicates  the  code shouldn't be parsed as a script but as a module.  This influences\nglobal strict mode and 'import' and 'export' declarations.\n\n--help Print the usage information and quit.\n\n\n\n1640710263                                     acorn(1)",
                    "long": "--module"
                }
            ]
        }
    },
    "summary": "acorn - parse JavaScript file",
    "flags": [
        {
            "flag": "",
            "long": "--tokenize",
            "arg": null,
            "description": "Tokenizer mode of the parser."
        },
        {
            "flag": "",
            "long": "--locations",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": "--allow-hash-bang",
            "arg": null,
            "description": "If enabled, skip the leading hashbang line."
        },
        {
            "flag": "",
            "long": "--compact",
            "arg": null,
            "description": "No whitespace is used in the AST output."
        },
        {
            "flag": "",
            "long": "--silent",
            "arg": null,
            "description": "Do not output the AST, just return the exit status."
        },
        {
            "flag": "",
            "long": "--module",
            "arg": null,
            "description": "Indicates the code shouldn't be parsed as a script but as a module. This influences global strict mode and 'import' and 'export' declarations. --help Print the usage information and quit. 1640710263 acorn(1)"
        }
    ],
    "examples": [],
    "see_also": []
}