'\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH acorn 1 1668059290 "" "" .SH NAME acorn \- parse JavaScript file .SH SYNOPSIS 'nh .fi .ad l \fBacorn\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [\fB--ecma3\fR | \fB--ecma5\fR | \fB--ecma6\fR | \fB--ecma7\fR | \fB...\fR | \fB--ecma2015\fR | \fB--ecma2016\fR] [\fB--tokenize\fR] [\fB--locations\fR] [\fB--allow-hash-bang\fR] [\fB--compact\fR] [\fB--silent\fR] [\fB--module\fR] [\fB--help\fR] [\fB--\fR] [\fBinfile\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBacorn\fR 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. .SH OPTIONS .TP \*(T<\fB\-\-ecma3\fR\*(T>, \*(T<\fB\-\-ecma5\fR\*(T>, \*(T<\fB\-\-ecma6\fR\*(T>, \*(T<\fB\-\-ecma7\fR\*(T>, \*(T<\fB...\fR\*(T>, \*(T<\fB\-\-ecma2015\fR\*(T>, \*(T<\fB\-\-ecma2016\fR\*(T> Sets the ECMAScript version to parse. Default is version 7. .TP \*(T<\fB\-\-tokenize\fR\*(T> Tokenizer mode of the parser. .TP \*(T<\fB\-\-locations\fR\*(T> 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. .TP \*(T<\fB\-\-allow\-hash\-bang\fR\*(T> If enabled, skip the leading hashbang line. .TP \*(T<\fB\-\-compact\fR\*(T> No whitespace is used in the AST output. .TP \*(T<\fB\-\-silent\fR\*(T> Do not output the AST, just return the exit status. .TP \*(T<\fB\-\-module\fR\*(T> Indicates the code shouldn't be parsed as a script but as a module. This influences global strict mode and 'import' and 'export' declarations. .TP \*(T<\fB\-\-help\fR\*(T> Print the usage information and quit.