{"name":"pug-lexer","version":"5.0.0-canary-2","description":"The pug lexer (takes a string and converts it to an array of tokens)","keywords":["pug"],"dependencies":{"character-parser":"^2.2.0","is-expression":"^4.0.0","pug-error":"2.0.0-canary-2"},"devDependencies":{"acorn":"^7.1.1","acorn-walk":"^7.1.1"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-lexer"},"author":{"name":"ForbesLindesay"},"license":"MIT","readme":"# pug-lexer\n\nThe pug lexer.  This module is responsible for taking a string and converting it into an array of tokens.\n\n[![Build Status](https://img.shields.io/travis/pugjs/pug-lexer/master.svg)](https://travis-ci.org/pugjs/pug-lexer)\n[![Dependencies Status](https://david-dm.org/pugjs/pug/status.svg?path=packages/pug-lexer)](https://david-dm.org/pugjs/pug?path=packages/pug-lexer)\n[![DevDependencies Status](https://david-dm.org/pugjs/pug/dev-status.svg?path=packages/pug-lexer)](https://david-dm.org/pugjs/pug?path=packages/pug-lexer&type=dev)\n[![NPM version](https://img.shields.io/npm/v/pug-lexer.svg)](https://www.npmjs.org/package/pug-lexer)\n[![Coverage Status](https://img.shields.io/codecov/c/github/pugjs/pug-lexer.svg)](https://codecov.io/gh/pugjs/pug-lexer)\n\n## Installation\n\n    npm install pug-lexer\n\n## Usage\n\n```js\nvar lex = require('pug-lexer');\n```\n\n### `lex(str, options)`\n\nConvert Pug string to an array of tokens.\n\n`options` can contain the following properties:\n\n- `filename` (string): The name of the Pug file; it is used in error handling if provided.\n- `plugins` (array): An array of plugins, in the order they should be applied.\n\n```js\nconsole.log(JSON.stringify(lex('div(data-foo=\"bar\")', {filename: 'my-file.pug'}), null, '  '))\n```\n\n```json\n[\n  {\n    \"type\": \"tag\",\n    \"line\": 1,\n    \"val\": \"div\",\n    \"selfClosing\": false\n  },\n  {\n    \"type\": \"attrs\",\n    \"line\": 1,\n    \"attrs\": [\n      {\n        \"name\": \"data-foo\",\n        \"val\": \"\\\"bar\\\"\",\n        \"escaped\": true\n      }\n    ]\n  },\n  {\n    \"type\": \"eos\",\n    \"line\": 1\n  }\n]\n```\n\n### `new lex.Lexer(str, options)`\n\nConstructor for a Lexer class. This is not meant to be used directly unless you know what you are doing.\n\n`options` may contain the following properties:\n\n- `filename` (string): The name of the Pug file; it is used in error handling if provided.\n- `interpolated` (boolean): if the Lexer is created as a child lexer for inline tag interpolation (e.g. `#[p Hello]`). Defaults to `false`.\n- `startingLine` (integer): the real line number of the first line in the input. It is also used for inline tag interpolation. Defaults to `1`.\n- `plugins` (array): An array of plugins, in the order they should be applied.\n\n## License\n\n  MIT\n","readmeFilename":"README.md","_id":"pug-lexer@5.0.0-canary-2","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-FJFAdpwo263ec7Hb1yMFQlNTdRUX14xmXQ7z7r7CLUMJpzXasZ1QRewbw3KdF5xJOLG9oCkg4sY4s4qXNzhijw==","shasum":"70901a73526220f12177c2ab9478d5622cde3955","tarball":"http://registry-npm.ywwl.com/pug-lexer/download/pug-lexer-5.0.0-canary-2.tgz","fileCount":5,"unpackedSize":49875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJey7exCRA9TVsSAnZWagAA0J4P/2x0p8mDcXKyQqF4C1g9\nhrEktl33PwqrMEF/2iC9W6Wg2BYHfgvuHyhI9dhruZJD5aF7T7I5j+RngLr9\n6ivthCKvBkl/mfqoJE4wh95ECfrJ8AVlFybd4DTSxH2ztNysNfUzx+rwCF8E\ndol+Al8TuzlGs0Kp2HJ2hvK8aW+Uck3R3Ngt0/VLA99B+y3/NO+j933Hehsv\nLh53wYuLBZ+tvDjxNwB7vKzhDKyLgLAubUKAVdFVtTz1pUp3yG6qxERIFIEr\ngE1IfsJ2+4PVuwFLysNdWAMSHMS4RO105HmuzGf6culVV0hOwnRFZuIG2OOj\n97ePO2rbLIJ+WTPM5ymarY7FGx4nQWetQmScyOocI55q7b0I7EjZGm4htzMl\n+HPheZVVP/kqotIfe3hD43NV17xwZC7oNKFGkhrwcvLsdv7QSVuvqe8x0krX\n8wShqQc6MHs19mMlWg18L1H2lokKbO/SNXA6x6T0MWQAq8YX4UlLR8wOltEj\nuXrgdO341he8ul6OIxy51l8MYhJ9b/C1o6D7y7UyGqjr/t/9zRgxhu254N/s\nr4OJ5TcIHW11E3hquOGql6orzO4dMp3zizsNrvY7s2DxgosTRcDj4OVdGfCE\nVItvl6uNLZrTlJR8W+ne+n6P03YSP9wnBwAMXpMsl4guAAP/QX+8FUzBDu+h\nQhcM\r\n=qn+F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbuw/YF/CHczLHaDc2gBkaKkEEUuTC54c9lfkRDkZ2oAIhAMj/6qdi6wMZskfUIEZCwhEDYOd629hdP8RBwCXnhKn4"}],"size":11999,"noattachment":false,"key":"/pug-lexer/-/pug-lexer-5.0.0-canary-2.tgz"},"maintainers":[{"email":"forbes@lindesay.co.uk","name":"forbeslindesay"},{"email":"pug-bot@rollingversions.com","name":"pug-bot"},{"email":"timothygu99@gmail.com","name":"timothygu"}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-lexer_5.0.0-canary-2_1590409137159_0.4023298409612275"},"_hasShrinkwrap":false,"publish_time":1590409137296,"_cnpm_publish_time":1590409137296,"dist-tags":{"canary":"5.0.1-canary-10","latest":"5.0.1"}}