{"name":"pug-lexer","version":"5.0.1-canary-9","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"},"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.1-canary-9","_nodeVersion":"12.20.2","_npmVersion":"6.14.11","dist":{"integrity":"sha512-zCY2cyS8z/9ZrJAPTmq8jdtWVQDClN8VRjrvjsYBDgw8bN1euJdk+NbklMjn2yTfZhoeX+5T3Btp65gaFuipbA==","shasum":"3b0ad7716efb896343629d5e36ab6772a7dd5703","tarball":"http://registry-npm.ywwl.com/pug-lexer/download/pug-lexer-5.0.1-canary-9.tgz","fileCount":6,"unpackedSize":59331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO+58CRA9TVsSAnZWagAAzEkP/Ro2Ay8QHyHXc4rPguhc\ntA+WlJhqYZRWyecyG9dmC2FjaHB8IdTZrvN97URN+QJNGFb/hGdg2NVN1az1\n5kDYsHdsETAAVoYp+mjrUt0F2gYyZ1nJ1/frMwX0TQN7MIn+GXkw7Z42uqys\nxRgHge0OkvE1aD65PumFz0rUtlGU8wapMDGECfr+XiKLUdCiO5GXkZBRZUsN\n+b9uSQmdIbX2gkK4jfLDvK7PN86C81QXDOTcQI5rnCWr465MDUR4uR8xnpBD\nk709cKi8vz6HwwYTjNReC5ypvFjIBK2CL5tQcYjeiRRfKedXQvZSNBNIhtaT\nxoSjUsKS4q7fKu04WtnOsV0+WdoiPxsSJCV1vBrJcdSE5Etl/Ev6Zcbqa7ux\nVuIacZa3cKWjDVkxereu6Y/X3PoLNW5gYnacZ/nb89N0IBuxZ2V0Yz773vRx\nE4dbvH6od7mW5b+vWRxvJAOvkY72baDPxtJV+9a3sk22MPAaPR8OR5GbsMRF\nIpvqZN15qCVwMxJC58v7OdmB47Q4ZFBuaZSk1thn15dRy3urL5AVxOG4Tgkv\n0BQuf4tB6XbrAkMQdrzr3aqGcET+BlQ35KCPJgQzL26xCiDXnTd+Bm037jxb\npLmWHXyTYaf6j4Kc+8ccndOVcUgsprFDxXw3FQP2joKUoOj+NOdFKxlw5t6k\no6px\r\n=FnFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUaIyll1l1ba9Z2DdL8gfmohue5iZS7PxuOp+eFnmI9AiEA58dgJ8Cup8GrM+U7za0IcgQKZZZeQU8z0bfDSpNd3aU="}],"size":13716,"noattachment":false,"key":"/pug-lexer/-/pug-lexer-5.0.1-canary-9.tgz"},"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":"pug-bot@rollingversions.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-lexer_5.0.1-canary-9_1614540412356_0.7291575103929222"},"_hasShrinkwrap":false,"publish_time":1614540412489,"_cnpm_publish_time":1614540412489,"dist-tags":{"canary":"5.0.1-canary-10","latest":"5.0.1"}}