UNPKG

layaair2-cmd

Version:

layaair version 2 toolkit

102 lines (101 loc) 14.7 kB
{ "_args": [ [ { "raw": "acorn@^6.0.2", "scope": null, "escapedName": "acorn", "name": "acorn", "rawSpec": "^6.0.2", "spec": ">=6.0.2 <7.0.0", "type": "range" }, "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\acorn-node" ] ], "_from": "acorn@^6.0.2", "_hasShrinkwrap": false, "_id": "acorn@6.0.5", "_location": "/acorn", "_nodeVersion": "10.11.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/acorn_6.0.5_1546429664768_0.2904693881325544" }, "_npmUser": { "name": "marijn", "email": "marijnh@gmail.com" }, "_npmVersion": "6.5.0", "_phantomChildren": {}, "_requested": { "raw": "acorn@^6.0.2", "scope": null, "escapedName": "acorn", "name": "acorn", "rawSpec": "^6.0.2", "spec": ">=6.0.2 <7.0.0", "type": "range" }, "_requiredBy": [ "/acorn-node" ], "_resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz", "_shasum": "81730c0815f3f3b34d8efa95cb7430965f4d887a", "_shrinkwrap": null, "_spec": "acorn@^6.0.2", "_where": "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\acorn-node", "bin": { "acorn": "./bin/acorn" }, "bugs": { "url": "https://github.com/acornjs/acorn/issues" }, "dependencies": {}, "description": "ECMAScript parser", "devDependencies": {}, "directories": {}, "dist": { "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==", "shasum": "81730c0815f3f3b34d8efa95cb7430965f4d887a", "tarball": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz", "fileCount": 11, "unpackedSize": 1084980, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLKThCRA9TVsSAnZWagAAPdMQAJRvN+u8N+Brr9vEHhxL\nhhCFbe+WC8MA0OzCC7eYj9H8cP+HbmL9gXXteyl/OvKT8TL19JiHgrE2wREV\nte054iG3K7xmciPuJw9KYHTrxcQMYRBJdbFgRspikJqfcZTXI0bXSh7K7d6S\nYG4rQEt38J2Gxsz53acstm8/6P/qU2clUODmsJdUMmVJwW4UdZ6yDVOmrxfV\ncs8rQTUkamCsBaNcDfQNqnqoc9aigXuSCFNR6650XOAZMnYvEhX+vOgNBD49\ny1WNHmswvETnei2+aWENYbsjVBmKLSdKiCpmgB5S5VLhcHzB2/3dAxP+5mCA\n+fYp3PGdnilWKB/TYsgwe+odI8k2P5UTXqCVeQsHApS1Gz8xmRv7f2olh24D\n14YBwwZpZLOoC8DDyelcK1uJ9eHpv7wRD2961GSVN9Zm64tYXWm24472PFBk\nBFRwNgTG3qrKsEB4WbfY63wkHkomJtQby7EVMtRJaDVU561pYmKOXFhuNeXO\nvbKrfsxM1cOcdWpZDf4+Tl20ud6D+/YmxnwVBwsqVb+qHRZC52Sfse4McBUg\nkKS48IquB/U95vXqYhKnmB+PmV2ONR7X4z8h8GhQXQwnWvm2NMH2OIe+VN55\ne4j9F0sYYQ3zMhCbiz1BXT+2U0aAqCPbDXfn7xnEWHiLhXRVkQ4I89PisOQM\n72uj\r\n=PbvZ\r\n-----END PGP SIGNATURE-----\r\n" }, "engines": { "node": ">=0.4.0" }, "homepage": "https://github.com/acornjs/acorn", "license": "MIT", "main": "dist/acorn.js", "maintainers": [ { "name": "Marijn Haverbeke", "email": "marijnh@gmail.com", "url": "https://marijnhaverbeke.nl" }, { "name": "Ingvar Stepanyan", "email": "me@rreverser.com", "url": "https://rreverser.com/" }, { "name": "Adrian Heine", "url": "http://adrianheine.de" } ], "module": "dist/acorn.mjs", "name": "acorn", "optionalDependencies": {}, "readme": "# Acorn\n\nA tiny, fast JavaScript parser written in JavaScript.\n\n## Community\n\nAcorn is open source software released under an\n[MIT license](https://github.com/acornjs/acorn/blob/master/LICENSE).\n\nYou are welcome to\n[report bugs](https://github.com/acornjs/acorn/issues) or create pull\nrequests on [github](https://github.com/acornjs/acorn). For questions\nand discussion, please use the\n[Tern discussion forum](https://discuss.ternjs.net).\n\n## Installation\n\nThe easiest way to install acorn is from [`npm`](https://www.npmjs.com/):\n\n```sh\nnpm install acorn\n```\n\nAlternately, you can download the source and build acorn yourself:\n\n```sh\ngit clone https://github.com/acornjs/acorn.git\ncd acorn\nnpm install\n```\n\n## Interface\n\n**parse**`(input, options)` is the main interface to the library. The\n`input` parameter is a string, `options` can be undefined or an object\nsetting some of the options listed below. The return value will be an\nabstract syntax tree object as specified by the [ESTree\nspec](https://github.com/estree/estree).\n\n```javascript\nlet acorn = require(\"acorn\");\nconsole.log(acorn.parse(\"1 + 1\"));\n```\n\nWhen encountering a syntax error, the parser will raise a\n`SyntaxError` object with a meaningful message. The error object will\nhave a `pos` property that indicates the string offset at which the\nerror occurred, and a `loc` object that contains a `{line, column}`\nobject referring to that same position.\n\nOptions can be provided by passing a second argument, which should be\nan object containing any of these fields:\n\n- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be\n either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial\n support). This influences support for strict mode, the set of\n reserved words, and support for new syntax features. Default is 7.\n\n **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being\n implemented by Acorn. Other proposed new features can be implemented\n through plugins.\n\n- **sourceType**: Indicate the mode the code should be parsed in. Can be\n either `\"script\"` or `\"module\"`. This influences global strict mode\n and parsing of `import` and `export` declarations.\n\n- **onInsertedSemicolon**: If given a callback, that callback will be\n called whenever a missing semicolon is inserted by the parser. The\n callback will be given the character offset of the point where the\n semicolon is inserted as argument, and if `locations` is on, also a\n `{line, column}` object representing this position.\n\n- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing\n commas.\n\n- **allowReserved**: If `false`, using a reserved word will generate\n an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher\n versions. When given the value `\"never\"`, reserved words and\n keywords can also not be used as property names (as in Internet\n Explorer's old parser).\n\n- **allowReturnOutsideFunction**: By default, a return statement at\n the top level raises an error. Set this to `true` to accept such\n code.\n\n- **allowImportExportEverywhere**: By default, `import` and `export`\n declarations can only appear at a program's top level. Setting this\n option to `true` allows them anywhere where a statement is allowed.\n \n- **allowAwaitOutsideFunction**: By default, `await` expressions can\n only appear inside `async` functions. Setting this option to\n `true` allows to have top-level `await` expressions. They are\n still not allowed in non-`async` functions, though.\n\n- **allowHashBang**: When this is enabled (off by default), if the\n code starts with the characters `#!` (as in a shellscript), the\n first line will be treated as a comment.\n\n- **locations**: When `true`, each node has a `loc` object attached\n with `start` and `end` subobjects, each of which contains the\n one-based line and zero-based column numbers in `{line, column}`\n form. Default is `false`.\n\n- **onToken**: If a function is passed for this option, each found\n token will be passed in same format as tokens returned from\n `tokenizer().getToken()`.\n\n If array is passed, each found token is pushed to it.\n\n Note that you are not allowed to call the parser from the\n callback—that will corrupt its internal state.\n\n- **onComment**: If a function is passed for this option, whenever a\n comment is encountered the function will be called with the\n following parameters:\n\n - `block`: `true` if the comment is a block comment, false if it\n is a line comment.\n - `text`: The content of the comment.\n - `start`: Character offset of the start of the comment.\n - `end`: Character offset of the end of the comment.\n\n When the `locations` options is on, the `{line, column}` locations\n of the comment’s start and end are passed as two additional\n parameters.\n\n If array is passed for this option, each found comment is pushed\n to it as object in Esprima format:\n\n ```javascript\n {\n \"type\": \"Line\" | \"Block\",\n \"value\": \"comment text\",\n \"start\": Number,\n \"end\": Number,\n // If `locations` option is on:\n \"loc\": {\n \"start\": {line: Number, column: Number}\n \"end\": {line: Number, column: Number}\n },\n // If `ranges` option is on:\n \"range\": [Number, Number]\n }\n ```\n\n Note that you are not allowed to call the parser from the\n callback—that will corrupt its internal state.\n\n- **ranges**: Nodes have their start and end characters offsets\n recorded in `start` and `end` properties (directly on the node,\n rather than the `loc` object, which holds line/column data. To also\n add a\n [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)\n `range` property holding a `[start, end]` array with the same\n numbers, set the `ranges` option to `true`.\n\n- **program**: It is possible to parse multiple files into a single\n AST by passing the tree produced by parsing the first file as the\n `program` option in subsequent parses. This will add the toplevel\n forms of the parsed file to the \"Program\" (top) node of an existing\n parse tree.\n\n- **sourceFile**: When the `locations` option is `true`, you can pass\n this option to add a `source` attribute in every node’s `loc`\n object. Note that the contents of this option are not examined or\n processed in any way; you are free to use whatever format you\n choose.\n\n- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property\n will be added (regardless of the `location` option) directly to the\n nodes, rather than the `loc` object.\n\n- **preserveParens**: If this option is `true`, parenthesized expressions\n are represented by (non-standard) `ParenthesizedExpression` nodes\n that have a single `expression` property containing the expression\n inside parentheses.\n\n**parseExpressionAt**`(input, offset, options)` will parse a single\nexpression in a string, and return its AST. It will not complain if\nthere is more of the string left after the expression.\n\n**tokenizer**`(input, options)` returns an object with a `getToken`\nmethod that can be called repeatedly to get the next token, a `{start,\nend, type, value}` object (with added `loc` property when the\n`locations` option is enabled and `range` property when the `ranges`\noption is enabled). When the token's type is `tokTypes.eof`, you\nshould stop calling the method, since it will keep returning that same\ntoken forever.\n\nIn ES6 environment, returned result can be used as any other\nprotocol-compliant iterable:\n\n```javascript\nfor (let token of acorn.tokenizer(str)) {\n // iterate over the tokens\n}\n\n// transform code to array of tokens:\nvar tokens = [...acorn.tokenizer(str)];\n```\n\n**tokTypes** holds an object mapping names to the token type objects\nthat end up in the `type` properties of tokens.\n\n**getLineInfo**`(input, offset)` can be used to get a `{line,\ncolumn}` object for a given program string and offset.\n\n### The `Parser` class\n\nInstances of the **`Parser`** class contain all the state and logic\nthat drives a parse. It has static methods `parse`,\n`parseExpressionAt`, and `tokenizer` that match the top-level\nfunctions by the same name.\n\nWhen extending the parser with plugins, you need to call these methods\non the extended version of the class. To extend a parser with plugins,\nyou can use its static `extend` method.\n\n```javascript\nvar acorn = require(\"acorn\");\nvar jsx = require(\"acorn-jsx\");\nvar JSXParser = acorn.Parser.extend(jsx());\nJSXParser.parse(\"foo(<bar/>)\");\n```\n\nThe `extend` method takes any number of plugin values, and returns a\nnew `Parser` class that includes the extra parser logic provided by\nthe plugins.\n\n## Command line interface\n\nThe `bin/acorn` utility can be used to parse a file from the command\nline. It accepts as arguments its input file and the following\noptions:\n\n- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version\n to parse. Default is version 9.\n\n- `--module`: Sets the parsing mode to `\"module\"`. Is set to `\"script\"` otherwise.\n\n- `--locations`: Attaches a \"loc\" object to each node with \"start\" and\n \"end\" subobjects, each of which contains the one-based line and\n zero-based column numbers in `{line, column}` form.\n\n- `--allow-hash-bang`: If the code starts with the characters #! (as\n in a shellscript), the first line will be treated as a comment.\n\n- `--compact`: No whitespace is used in the AST output.\n\n- `--silent`: Do not output the AST, just return the exit status.\n\n- `--help`: Print the usage information and quit.\n\nThe utility spits out the syntax tree as JSON data.\n\n## Existing plugins\n\n - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)\n \nPlugins for ECMAScript proposals:\n \n - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling:\n - [`acorn-async-iteration`](https://github.com/acornjs/acorn-async-iteration): Parse [async iteration proposal](https://github.com/tc39/proposal-async-iteration)\n - [`acorn-bigint`](https://github.com/acornjs/acorn-bigint): Parse [BigInt proposal](https://github.com/tc39/proposal-bigint)\n - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields)\n - [`acorn-dynamic-import`](https://github.com/kesne/acorn-dynamic-import): Parse [import() proposal](https://github.com/tc39/proposal-dynamic-import)\n - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta)\n - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator)\n - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/acornjs/acorn.git" }, "scripts": { "prepare": "cd ..; npm run build:main && npm run build:bin" }, "version": "6.0.5" }