{
	"name": "rst-selector-parser",
	"versions": {
		"2.0.0": {
			"author": {
				"name": "Gajus Kuizinas",
				"email": "gajus@gajus.com",
				"url": "http://gajus.com"
			},
			"ava": {
				"babel": "inherit",
				"require": [
					"babel-register"
				]
			},
			"dependencies": {
				"lodash.flattendeep": "^4.4.0",
				"nearley": "^2.7.10"
			},
			"description": "A CSS-based selector parser for React Standard Tree (RST) traversal",
			"devDependencies": {
				"ava": "^0.17.0",
				"babel-cli": "^6.22.2",
				"babel-loader": "^6.2.10",
				"babel-plugin-transform-flow-comments": "^6.22.0",
				"babel-preset-env": "^1.1.8",
				"babel-register": "^6.22.0",
				"eslint": "^3.13.1",
				"eslint-config-canonical": "^7.1.0",
				"flow-bin": "^0.38.0",
				"husky": "^0.13.0-1",
				"semantic-release": "^6.3.2",
				"webpack": "^2.2.0"
			},
			"engines": {
				"node": ">=5"
			},
			"keywords": [
				"css",
				"selector",
				"parser"
			],
			"license": "BSD-3-Clause",
			"main": "./dist/index.js",
			"name": "rst-selector-parser",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/aweary/rst-selector-parser.git"
			},
			"scripts": {
				"build": "npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps",
				"compile-grammar": "nearleyc ./src/grammar.ne --out ./src/grammar.js",
				"lint": "eslint ./src ./test && flow",
				"precommit": "npm run lint && npm run test",
				"test": "ava --verbose"
			},
			"version": "2.0.0",
			"gitHead": "fc106ddbb0c714a92a1fb0343af879e1283201a1",
			"bugs": {
				"url": "https://github.com/aweary/rst-selector-parser/issues"
			},
			"homepage": "https://github.com/aweary/rst-selector-parser#readme",
			"_id": "rst-selector-parser@2.0.0",
			"_npmVersion": "5.3.0",
			"_nodeVersion": "8.2.1",
			"_npmUser": {
				"name": "aweary",
				"email": "Kierkegaurd@gmail.com"
			},
			"dist": {
				"integrity": "sha512-3OgCY03fagTt10mtoMRwKfc/QM01fGJB0cITjbZ6VKDNTnPClklD+TKQ9/3ymuU/9qYFCTwI31OfXE7+Jw2LCg==",
				"shasum": "94bf309d52b6880de7871b2e70c8f1bd0ae176d7",
				"tarball": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.0.0.tgz"
			},
			"maintainers": [
				{
					"name": "aweary",
					"email": "Kierkegaurd@gmail.com"
				}
			],
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/rst-selector-parser-2.0.0.tgz_1503411570514_0.20896189962513745"
			},
			"directories": {},
			"contributors": []
		},
		"2.1.0": {
			"author": {
				"name": "Gajus Kuizinas",
				"email": "gajus@gajus.com",
				"url": "http://gajus.com"
			},
			"ava": {
				"babel": "inherit",
				"require": [
					"babel-register"
				]
			},
			"dependencies": {
				"lodash.flattendeep": "^4.4.0",
				"nearley": "^2.7.10"
			},
			"description": "A CSS-based selector parser for React Standard Tree (RST) traversal",
			"devDependencies": {
				"ava": "^0.17.0",
				"babel-cli": "^6.22.2",
				"babel-loader": "^6.2.10",
				"babel-plugin-transform-flow-comments": "^6.22.0",
				"babel-preset-env": "^1.1.8",
				"babel-register": "^6.22.0",
				"eslint": "^3.13.1",
				"eslint-config-canonical": "^7.1.0",
				"flow-bin": "^0.38.0",
				"husky": "^0.13.0-1",
				"semantic-release": "^6.3.2",
				"webpack": "^2.2.0"
			},
			"engines": {
				"node": ">=5"
			},
			"keywords": [
				"css",
				"selector",
				"parser"
			],
			"license": "BSD-3-Clause",
			"main": "./dist/index.js",
			"name": "rst-selector-parser",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/aweary/rst-selector-parser.git"
			},
			"scripts": {
				"build": "npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps",
				"compile-grammar": "nearleyc ./src/grammar.ne --out ./src/grammar.js",
				"lint": "eslint ./src ./test && flow",
				"precommit": "npm run lint && npm run test",
				"test": "ava --verbose"
			},
			"version": "2.1.0",
			"gitHead": "245a8a9e1a65848a0d31867c07e5986dae08274a",
			"bugs": {
				"url": "https://github.com/aweary/rst-selector-parser/issues"
			},
			"homepage": "https://github.com/aweary/rst-selector-parser#readme",
			"_id": "rst-selector-parser@2.1.0",
			"_npmVersion": "5.3.0",
			"_nodeVersion": "8.2.1",
			"_npmUser": {
				"name": "aweary",
				"email": "Kierkegaurd@gmail.com"
			},
			"dist": {
				"integrity": "sha512-2PfqDucHj9ArVWykMfSM+02U6bvZNRCrXmzpwp76dc9kLwWX+ZcK1ILh16RQ2qYGyOccxQABONOY720B4mXmtg==",
				"shasum": "7c420e037ee9fd740fa9855c7858ba060af6ccaf",
				"tarball": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.1.0.tgz"
			},
			"maintainers": [
				{
					"name": "aweary",
					"email": "Kierkegaurd@gmail.com"
				}
			],
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/rst-selector-parser-2.1.0.tgz_1503414498358_0.2506903938483447"
			},
			"directories": {},
			"contributors": []
		},
		"2.2.0": {
			"author": {
				"name": "Gajus Kuizinas",
				"email": "gajus@gajus.com",
				"url": "http://gajus.com"
			},
			"ava": {
				"babel": "inherit",
				"require": [
					"babel-register"
				]
			},
			"dependencies": {
				"lodash.flattendeep": "^4.4.0",
				"nearley": "^2.7.10"
			},
			"description": "A CSS-based selector parser for React Standard Tree (RST) traversal",
			"devDependencies": {
				"ava": "^0.17.0",
				"babel-cli": "^6.22.2",
				"babel-loader": "^6.2.10",
				"babel-plugin-transform-flow-comments": "^6.22.0",
				"babel-preset-env": "^1.1.8",
				"babel-register": "^6.22.0",
				"eslint": "^3.13.1",
				"eslint-config-canonical": "^7.1.0",
				"flow-bin": "^0.38.0",
				"husky": "^0.13.0-1",
				"semantic-release": "^6.3.2",
				"webpack": "^2.2.0"
			},
			"engines": {
				"node": ">=5"
			},
			"keywords": [
				"css",
				"selector",
				"parser"
			],
			"license": "BSD-3-Clause",
			"main": "./dist/index.js",
			"name": "rst-selector-parser",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/aweary/rst-selector-parser.git"
			},
			"scripts": {
				"build": "npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps",
				"compile-grammar": "nearleyc ./src/grammar.ne --out ./src/grammar.js",
				"lint": "eslint ./src ./test && flow",
				"precommit": "npm run lint && npm run test",
				"test": "ava --verbose"
			},
			"version": "2.2.0",
			"gitHead": "2c7d00919e0901f8b0699f0634bd8b63baa17c29",
			"bugs": {
				"url": "https://github.com/aweary/rst-selector-parser/issues"
			},
			"homepage": "https://github.com/aweary/rst-selector-parser#readme",
			"_id": "rst-selector-parser@2.2.0",
			"_npmVersion": "5.3.0",
			"_nodeVersion": "8.2.1",
			"_npmUser": {
				"name": "aweary",
				"email": "Kierkegaurd@gmail.com"
			},
			"dist": {
				"integrity": "sha512-oEsVo2TuHBXpiIS1YONVLzT/v61k1TTTtKxB/2/kkv5jFkn7vwn5qUUhxKO5UunHhm+YdZGncd7Ys4mVsGL0AQ==",
				"shasum": "23fc2311de96cb4dbf0ad7e2cb63c0f54768c244",
				"tarball": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.0.tgz"
			},
			"maintainers": [
				{
					"name": "aweary",
					"email": "Kierkegaurd@gmail.com"
				}
			],
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/rst-selector-parser-2.2.0.tgz_1503415881753_0.3051461880095303"
			},
			"directories": {},
			"contributors": []
		},
		"2.2.1": {
			"author": {
				"name": "Gajus Kuizinas",
				"email": "gajus@gajus.com",
				"url": "http://gajus.com"
			},
			"ava": {
				"babel": "inherit",
				"require": [
					"babel-register"
				]
			},
			"dependencies": {
				"lodash.flattendeep": "^4.4.0",
				"nearley": "^2.7.10"
			},
			"description": "A CSS-based selector parser for React Standard Tree (RST) traversal",
			"devDependencies": {
				"ava": "^0.17.0",
				"babel-cli": "^6.22.2",
				"babel-loader": "^6.2.10",
				"babel-plugin-transform-flow-comments": "^6.22.0",
				"babel-preset-env": "^1.1.8",
				"babel-register": "^6.22.0",
				"eslint": "^3.13.1",
				"eslint-config-canonical": "^7.1.0",
				"flow-bin": "^0.38.0",
				"husky": "^0.13.0-1",
				"semantic-release": "^6.3.2",
				"webpack": "^2.2.0"
			},
			"engines": {
				"node": ">=5"
			},
			"keywords": [
				"css",
				"selector",
				"parser"
			],
			"license": "BSD-3-Clause",
			"main": "./dist/index.js",
			"name": "rst-selector-parser",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/aweary/rst-selector-parser.git"
			},
			"scripts": {
				"build": "npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps",
				"compile-grammar": "nearleyc ./src/grammar.ne --out ./src/grammar.js",
				"lint": "eslint ./src ./test && flow",
				"precommit": "npm run lint && npm run test",
				"test": "ava --verbose"
			},
			"version": "2.2.1",
			"gitHead": "bdce827fe1d9564ed3ac9106aa5337f0cddce25d",
			"bugs": {
				"url": "https://github.com/aweary/rst-selector-parser/issues"
			},
			"homepage": "https://github.com/aweary/rst-selector-parser#readme",
			"_id": "rst-selector-parser@2.2.1",
			"_npmVersion": "5.4.2",
			"_nodeVersion": "8.4.0",
			"_npmUser": {
				"name": "aweary",
				"email": "Kierkegaurd@gmail.com"
			},
			"dist": {
				"integrity": "sha512-1xVsEpnaiNsz4zVJFTUyiOk4UG1UiLOGGaA75J/McWlpgRa+Ze5S2bnPQS0tcLbbo3vhFvIX5mpC0V1pBLzaoQ==",
				"shasum": "6fd271194e410dbbc72c2b1fac4d8a148b227fc5",
				"tarball": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.1.tgz"
			},
			"maintainers": [
				{
					"name": "aweary",
					"email": "Kierkegaurd@gmail.com"
				}
			],
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/rst-selector-parser-2.2.1.tgz_1505665679691_0.03746066917665303"
			},
			"directories": {},
			"contributors": []
		},
		"2.2.2": {
			"author": {
				"name": "Gajus Kuizinas",
				"email": "gajus@gajus.com",
				"url": "http://gajus.com"
			},
			"ava": {
				"babel": "inherit",
				"require": [
					"babel-register"
				]
			},
			"dependencies": {
				"lodash.flattendeep": "^4.4.0",
				"nearley": "^2.7.10"
			},
			"description": "A CSS-based selector parser for React Standard Tree (RST) traversal",
			"devDependencies": {
				"ava": "^0.17.0",
				"babel-cli": "^6.22.2",
				"babel-loader": "^6.2.10",
				"babel-plugin-transform-flow-comments": "^6.22.0",
				"babel-preset-env": "^1.1.8",
				"babel-register": "^6.22.0",
				"eslint": "^3.13.1",
				"eslint-config-canonical": "^7.1.0",
				"flow-bin": "^0.38.0",
				"husky": "^0.13.0-1",
				"semantic-release": "^6.3.2",
				"webpack": "^2.2.0"
			},
			"engines": {
				"node": ">=5"
			},
			"keywords": [
				"css",
				"selector",
				"parser"
			],
			"license": "BSD-3-Clause",
			"main": "./dist/index.js",
			"name": "rst-selector-parser",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/aweary/rst-selector-parser.git"
			},
			"scripts": {
				"build": "npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps",
				"compile-grammar": "nearleyc ./src/grammar.ne --out ./src/grammar.js",
				"lint": "eslint ./src ./test && flow",
				"precommit": "npm run lint && npm run test",
				"test": "ava --verbose"
			},
			"version": "2.2.2",
			"gitHead": "6a676d45cfc04237dd23c061a33a0255e1db4faf",
			"bugs": {
				"url": "https://github.com/aweary/rst-selector-parser/issues"
			},
			"homepage": "https://github.com/aweary/rst-selector-parser#readme",
			"_id": "rst-selector-parser@2.2.2",
			"_npmVersion": "5.4.2",
			"_nodeVersion": "8.4.0",
			"_npmUser": {
				"name": "aweary",
				"email": "Kierkegaurd@gmail.com"
			},
			"dist": {
				"integrity": "sha512-T5yd2bsA+FVQ5xP8Ga62gXjOnEaMsYhbbslVB+Fe4R9lAZiF7DfTHRyBpV9xEZ772LwstCdDdkHkvkWIr47X8g==",
				"shasum": "9927b619bd5af8dc23a76c64caef04edf90d2c65",
				"tarball": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.2.tgz"
			},
			"maintainers": [
				{
					"name": "aweary",
					"email": "Kierkegaurd@gmail.com"
				}
			],
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/rst-selector-parser-2.2.2.tgz_1506441442284_0.7224349768366665"
			},
			"directories": {},
			"contributors": []
		},
		"2.2.3": {
			"author": {
				"name": "Gajus Kuizinas",
				"email": "gajus@gajus.com",
				"url": "http://gajus.com"
			},
			"ava": {
				"babel": "inherit",
				"require": [
					"babel-register"
				]
			},
			"dependencies": {
				"lodash.flattendeep": "^4.4.0",
				"nearley": "^2.7.10"
			},
			"description": "A CSS-based selector parser for React Standard Tree (RST) traversal",
			"devDependencies": {
				"ava": "^0.17.0",
				"babel-cli": "^6.22.2",
				"babel-loader": "^6.2.10",
				"babel-plugin-transform-flow-comments": "^6.22.0",
				"babel-preset-env": "^1.1.8",
				"babel-register": "^6.22.0",
				"eslint": "^3.13.1",
				"eslint-config-canonical": "^7.1.0",
				"flow-bin": "^0.38.0",
				"husky": "^0.13.0-1",
				"semantic-release": "^6.3.2",
				"webpack": "^2.2.0"
			},
			"keywords": [
				"css",
				"selector",
				"parser"
			],
			"license": "BSD-3-Clause",
			"main": "./dist/index.js",
			"name": "rst-selector-parser",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/aweary/rst-selector-parser.git"
			},
			"scripts": {
				"build": "npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps",
				"compile-grammar": "nearleyc ./src/grammar.ne --out ./src/grammar.js",
				"lint": "eslint ./src ./test && flow",
				"precommit": "npm run lint && npm run test",
				"test": "ava --verbose"
			},
			"version": "2.2.3",
			"gitHead": "6ff4af1a2d0e769e3b8a04ac6ba7e98fd12be0f9",
			"bugs": {
				"url": "https://github.com/aweary/rst-selector-parser/issues"
			},
			"homepage": "https://github.com/aweary/rst-selector-parser#readme",
			"_id": "rst-selector-parser@2.2.3",
			"_shasum": "81b230ea2fcc6066c89e3472de794285d9b03d91",
			"_from": ".",
			"_npmVersion": "2.15.11",
			"_nodeVersion": "0.12.18",
			"_npmUser": {
				"name": "aweary",
				"email": "Kierkegaurd@gmail.com"
			},
			"dist": {
				"shasum": "81b230ea2fcc6066c89e3472de794285d9b03d91",
				"tarball": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz"
			},
			"maintainers": [
				{
					"name": "aweary",
					"email": "Kierkegaurd@gmail.com"
				}
			],
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/rst-selector-parser-2.2.3.tgz_1508517197328_0.4197701341472566"
			},
			"directories": {},
			"contributors": []
		}
	},
	"time": {
		"modified": "2017-10-20T16:33:17.449Z",
		"created": "2017-08-22T14:19:31.530Z",
		"2.0.0": "2017-08-22T14:19:31.530Z",
		"2.1.0": "2017-08-22T15:08:19.556Z",
		"2.2.0": "2017-08-22T15:31:22.905Z",
		"2.2.1": "2017-09-17T16:27:59.795Z",
		"2.2.2": "2017-09-26T15:57:22.388Z",
		"2.2.3": "2017-10-20T16:33:17.449Z"
	},
	"users": {},
	"dist-tags": {
		"latest": "2.2.3"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"dad2c247c6272c14436d30ca6066b2dd\"",
			"fetched": 1593324398355
		}
	},
	"_distfiles": {
		"rst-selector-parser-2.0.0.tgz": {
			"url": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.0.0.tgz",
			"sha": "94bf309d52b6880de7871b2e70c8f1bd0ae176d7",
			"registry": "npmjs"
		},
		"rst-selector-parser-2.1.0.tgz": {
			"url": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.1.0.tgz",
			"sha": "7c420e037ee9fd740fa9855c7858ba060af6ccaf",
			"registry": "npmjs"
		},
		"rst-selector-parser-2.2.0.tgz": {
			"url": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.0.tgz",
			"sha": "23fc2311de96cb4dbf0ad7e2cb63c0f54768c244",
			"registry": "npmjs"
		},
		"rst-selector-parser-2.2.1.tgz": {
			"url": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.1.tgz",
			"sha": "6fd271194e410dbbc72c2b1fac4d8a148b227fc5",
			"registry": "npmjs"
		},
		"rst-selector-parser-2.2.2.tgz": {
			"url": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.2.tgz",
			"sha": "9927b619bd5af8dc23a76c64caef04edf90d2c65",
			"registry": "npmjs"
		},
		"rst-selector-parser-2.2.3.tgz": {
			"url": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz",
			"sha": "81b230ea2fcc6066c89e3472de794285d9b03d91",
			"registry": "npmjs"
		}
	},
	"_attachments": {
		"rst-selector-parser-2.2.3.tgz": {
			"shasum": "81b230ea2fcc6066c89e3472de794285d9b03d91"
		}
	},
	"_rev": "2-004213125b1a3bb3",
	"_id": "rst-selector-parser",
	"readme": "# rst-selector-parser\n\nThis is a fork of [scalpel](https://github.com/gajus/scalpel/) intended for use with [enzyme](https://github.com/airbnb/enzyme/) for traversing\na React Standard Tree (RST) using [CSS selectors](https://www.w3.org/TR/css3-selectors/), with minor divergences.\n\n* [Usage](#usage)\n* [Token types](#token-types)\n* [Fields](#fields)\n  * [`adjacentSiblingCombinator`](#adjacentsiblingcombinator)\n  * [`attributePresenceSelector`](#attributepresenceselector)\n  * [`attributeValueSelector`](#attributevalueselector)\n  * [`childCombinator`](#childcombinator)\n  * [`classSelector`](#classselector)\n  * [`descendantCombinator`](#descendantcombinator)\n  * [`generalSiblingCombinator`](#generalsiblingcombinator)\n  * [`idSelector`](#idselector)\n  * [`pseudoClassSelector`](#pseudoclassselector)\n  * [`pseudoElementSelector`](#pseudoelementselector)\n  * [`typeSelector`](#typeselector)\n  * [`universalSelector`](#universalselector)\n* [Development](#development)\n\n## Usage\n\n```js\nimport {\n  createGenerator,\n  createParser\n} from 'rst-selector-parser';\n\nconst generator = createGenerator();\nconst parser = createParser();\n\nconst tokens: Array<SelectorTokenType | CombinatorTokenType> = parser.parse('.foo.bar');\n\n// [\n//   {\n//     type: 'selector',\n//     body: [\n//       {\n//         type: 'classSelector',\n//         name: 'foo'\n//       },\n//       {\n//         type: 'classSelector',\n//         name: 'bar'\n//       }\n//     ]\n//   }\n// ]\n\nconst selector: string = generator.generate(token);\n\n// .foo.bar\n\n```\n\n> Note:\n>\n> For programmatic type definitions, refer to [`./src/types.js`](./src/types.js).\n\n## Token types\n\n|Type|Description|Example|\n|---|---|---|\n|[`adjacentSiblingCombinator`](#adjacentsiblingcombinator)|An [adjacent sibling combinator](https://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators).|`.baz0 + .baz1`|\n|[`attributePresenceSelector`](#attributepresenceselector)|An [attribute presence selector](https://www.w3.org/TR/css3-selectors/#attribute-selectors).|`[qux]`|\n|[`attributeValueSelector`](#attributevalueselector)|An [attribute value selector](https://www.w3.org/TR/css3-selectors/#attribute-selectors).|`[qux=val]`, `[qux~=val]`|\n|[`childCombinator`](#childcombinator)|A [child combinator](https://www.w3.org/TR/css3-selectors/#child-combinators).|`.baz0 > .baz1`|\n|[`classSelector`](#classselector)|A [class selector](https://www.w3.org/TR/css3-selectors/#class-html).|`.baz`|\n|[`descendantCombinator`](#descendantcombinator)|A [descendant combinator](https://www.w3.org/TR/css3-selectors/#descendant-combinators).|`.baz0 .baz1`|\n|[`generalSiblingCombinator`](#generalsiblingcombinator)|A [general sibling combinator](https://www.w3.org/TR/css3-selectors/#general-sibling-combinators).|`.baz0 ~ .baz1`|\n|[`idSelector`](#idselector)|An [ID selector](https://www.w3.org/TR/css3-selectors/#id-selectors)|`#bar`|\n|[`pseudoClassSelector`](#pseudoclassselector)|A [pseudo-class selector](https://www.w3.org/TR/css3-selectors/#pseudo-classes).|`:corge`, `:corge()`, `:corge(val0, 'val1', \"val2\")`|\n|[`pseudoElementSelector`](#pseudoelementselector)|A [pseudo-element selector](https://www.w3.org/TR/css3-selectors/#pseudo-elements).|`::grault`|\n|[`typeSelector`](#typeselector)|A [type selector](https://www.w3.org/TR/css3-selectors/#type-selectors).|`foo`|\n|[`universalSelector`](#universalselector)|A [universal selector](https://www.w3.org/TR/css3-selectors/#universal-selector).|`*`|\n\n## Fields\n\nTokens have fields that describe additional information about the token. Fields are [token type](#token-types) specific.\n\n### `adjacentSiblingCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"adjacentSiblingCombinator\"|\n\n### `attributePresenceSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the element attribute.|\"qux\" in `[qux]`|\n|`type`|Name of the token type.|\"attributePresenceSelector\"|\n\n### `attributeValueSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the element attribute.|\"qux\" in `[qux]`|\n|`operator`|Operator of the expression.|\"\\*=\" in `[qux*=val]`|\n|`type`|Name of the token type.|\"attributeValueSelector\"|\n|`value`|Value of the expression.|\"val\" in `[qux=val]`|\n\n### `childCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"childCombinator\"|\n\n### `classSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Class name.|\"baz\" in `.baz[qux]`|\n|`type`|Name of the token type.|\"classSelector\"|\n\n### `descendantCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"descendantCombinator\"|\n\n### `generalSiblingCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"generalSiblingCombinator\"|\n\n### `idSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the ID.|\"bar\" in `#bar:corge()`|\n|`type`|Name of the token type.|\"idSelector\"|\n\n### `pseudoClassSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the pseudo-class.|\"corge\" in `#bar:corge()`|\n|`parameters`|Array of parameter values.|\"var0\", \"var1\" and \"var2\" in `:corge(var0, 'var1', \"var2\")`|\n|`type`|Name of the token type.|\"pseudoClassSelector\"|\n\n### `pseudoElementSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the pseudo-element.|\"grault\" in `#bar::grault`|\n|`type`|Name of the token type.|\"pseudoElementSelector\"|\n\n### `typeSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the node.|\"foo\" in `foo#bar.baz`|\n|`type`|Name of the token type.|\"typeSelector\"|\n\n### `universalSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"universalSelector\"|\n\n## Development\n\n```bash\ngit pull git@github.com:gajus/scalpel.git\ncd ./scalpel\nnpm install\nnpm run test\n```\n\nThe parser grammar is in the [`./src/grammar.ne`](./src/grammar.ne) file. After making changes to the parser grammar, you need to compile the parser using `npm run compile-grammar` command.\n\n> Note:\n>\n> This parser could be extended to support the entire CSS grammar.\n> I don't have such a use case. However, should you want to add new grammar, [raise an issue](https://github.com/gajus/scalpel/issues/new).\n\n* [Usage](#usage)\n* [Token types](#token-types)\n* [Fields](#fields)\n  * [`adjacentSiblingCombinator`](#adjacentsiblingcombinator)\n  * [`attributePresenceSelector`](#attributepresenceselector)\n  * [`attributeValueSelector`](#attributevalueselector)\n  * [`childCombinator`](#childcombinator)\n  * [`classSelector`](#classselector)\n  * [`descendantCombinator`](#descendantcombinator)\n  * [`generalSiblingCombinator`](#generalsiblingcombinator)\n  * [`idSelector`](#idselector)\n  * [`pseudoClassSelector`](#pseudoclassselector)\n  * [`pseudoElementSelector`](#pseudoelementselector)\n  * [`typeSelector`](#typeselector)\n  * [`universalSelector`](#universalselector)\n* [Development](#development)\n\n## Usage\n\n```js\nimport {\n  createGenerator,\n  createParser\n} from 'scalpel';\n\nconst generator = createGenerator();\nconst parser = createParser();\n\nconst tokens: Array<SelectorTokenType | CombinatorTokenType> = parser.parse('.foo.bar');\n\n// [\n//   {\n//     type: 'selector',\n//     body: [\n//       {\n//         type: 'classSelector',\n//         name: 'foo'\n//       },\n//       {\n//         type: 'classSelector',\n//         name: 'bar'\n//       }\n//     ]\n//   }\n// ]\n\nconst selector: string = generator.generate(token);\n\n// .foo.bar\n\n```\n\n> Note:\n>\n> For programmatic type definitions, refer to [`./src/types.js`](./src/types.js).\n\n## Token types\n\n|Type|Description|Example|\n|---|---|---|\n|[`adjacentSiblingCombinator`](#adjacentsiblingcombinator)|An [adjacent sibling combinator](https://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators).|`.baz0 + .baz1`|\n|[`attributePresenceSelector`](#attributepresenceselector)|An [attribute presence selector](https://www.w3.org/TR/css3-selectors/#attribute-selectors).|`[qux]`|\n|[`attributeValueSelector`](#attributevalueselector)|An [attribute value selector](https://www.w3.org/TR/css3-selectors/#attribute-selectors).|`[qux=val]`, `[qux~=val]`|\n|[`childCombinator`](#childcombinator)|A [child combinator](https://www.w3.org/TR/css3-selectors/#child-combinators).|`.baz0 > .baz1`|\n|[`classSelector`](#classselector)|A [class selector](https://www.w3.org/TR/css3-selectors/#class-html).|`.baz`|\n|[`descendantCombinator`](#descendantcombinator)|A [descendant combinator](https://www.w3.org/TR/css3-selectors/#descendant-combinators).|`.baz0 .baz1`|\n|[`generalSiblingCombinator`](#generalsiblingcombinator)|A [general sibling combinator](https://www.w3.org/TR/css3-selectors/#general-sibling-combinators).|`.baz0 ~ .baz1`|\n|[`idSelector`](#idselector)|An [ID selector](https://www.w3.org/TR/css3-selectors/#id-selectors)|`#bar`|\n|[`pseudoClassSelector`](#pseudoclassselector)|A [pseudo-class selector](https://www.w3.org/TR/css3-selectors/#pseudo-classes).|`:corge`, `:corge()`, `:corge(val0, 'val1', \"val2\")`|\n|[`pseudoElementSelector`](#pseudoelementselector)|A [pseudo-element selector](https://www.w3.org/TR/css3-selectors/#pseudo-elements).|`::grault`|\n|[`typeSelector`](#typeselector)|A [type selector](https://www.w3.org/TR/css3-selectors/#type-selectors).|`foo`|\n|[`universalSelector`](#universalselector)|A [universal selector](https://www.w3.org/TR/css3-selectors/#universal-selector).|`*`|\n\n## Fields\n\nTokens have fields that describe additional information about the token. Fields are [token type](#token-types) specific.\n\n### `adjacentSiblingCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"adjacentSiblingCombinator\"|\n\n### `attributePresenceSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the element attribute.|\"qux\" in `[qux]`|\n|`type`|Name of the token type.|\"attributePresenceSelector\"|\n\n### `attributeValueSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the element attribute.|\"qux\" in `[qux]`|\n|`operator`|Operator of the expression.|\"\\*=\" in `[qux*=val]`|\n|`type`|Name of the token type.|\"attributeValueSelector\"|\n|`value`|Value of the expression.|\"val\" in `[qux=val]`|\n\n### `childCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"childCombinator\"|\n\n### `classSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Class name.|\"baz\" in `.baz[qux]`|\n|`type`|Name of the token type.|\"classSelector\"|\n\n### `descendantCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"descendantCombinator\"|\n\n### `generalSiblingCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"generalSiblingCombinator\"|\n\n### `idSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the ID.|\"bar\" in `#bar:corge()`|\n|`type`|Name of the token type.|\"idSelector\"|\n\n### `pseudoClassSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the pseudo-class.|\"corge\" in `#bar:corge()`|\n|`parameters`|Array of parameter values.|\"var0\", \"var1\" and \"var2\" in `:corge(var0, 'var1', \"var2\")`|\n|`type`|Name of the token type.|\"pseudoClassSelector\"|\n\n### `pseudoElementSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the pseudo-element.|\"grault\" in `#bar::grault`|\n|`type`|Name of the token type.|\"pseudoElementSelector\"|\n\n### `typeSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the node.|\"foo\" in `foo#bar.baz`|\n|`type`|Name of the token type.|\"typeSelector\"|\n\n### `universalSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"universalSelector\"|\n\n## Development\n\n```bash\ngit pull git@github.com:gajus/scalpel.git\ncd ./scalpel\nnpm install\nnpm run test\n```\n\nThe parser grammar is in the [`./src/grammar.ne`](./src/grammar.ne) file. After making changes to the parser grammar, you need to compile the parser using `npm run compile-grammar` command.\n\n> Note:\n>\n> This parser could be extended to support the entire CSS grammar.\n> I don't have such a use case. However, should you want to add new grammar, [raise an issue](https://github.com/gajus/scalpel/issues/new).\n\n* [Usage](#usage)\n* [Token types](#token-types)\n* [Fields](#fields)\n  * [`adjacentSiblingCombinator`](#adjacentsiblingcombinator)\n  * [`attributePresenceSelector`](#attributepresenceselector)\n  * [`attributeValueSelector`](#attributevalueselector)\n  * [`childCombinator`](#childcombinator)\n  * [`classSelector`](#classselector)\n  * [`descendantCombinator`](#descendantcombinator)\n  * [`generalSiblingCombinator`](#generalsiblingcombinator)\n  * [`idSelector`](#idselector)\n  * [`pseudoClassSelector`](#pseudoclassselector)\n  * [`pseudoElementSelector`](#pseudoelementselector)\n  * [`typeSelector`](#typeselector)\n  * [`universalSelector`](#universalselector)\n* [Development](#development)\n\n## Usage\n\n```js\nimport {\n  createGenerator,\n  createParser\n} from 'scalpel';\n\nconst generator = createGenerator();\nconst parser = createParser();\n\nconst tokens: Array<SelectorTokenType | CombinatorTokenType> = parser.parse('.foo.bar');\n\n// [\n//   {\n//     type: 'selector',\n//     body: [\n//       {\n//         type: 'classSelector',\n//         name: 'foo'\n//       },\n//       {\n//         type: 'classSelector',\n//         name: 'bar'\n//       }\n//     ]\n//   }\n// ]\n\nconst selector: string = generator.generate(token);\n\n// .foo.bar\n\n```\n\n> Note:\n>\n> For programmatic type definitions, refer to [`./src/types.js`](./src/types.js).\n\n## Token types\n\n|Type|Description|Example|\n|---|---|---|\n|[`adjacentSiblingCombinator`](#adjacentsiblingcombinator)|An [adjacent sibling combinator](https://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators).|`.baz0 + .baz1`|\n|[`attributePresenceSelector`](#attributepresenceselector)|An [attribute presence selector](https://www.w3.org/TR/css3-selectors/#attribute-selectors).|`[qux]`|\n|[`attributeValueSelector`](#attributevalueselector)|An [attribute value selector](https://www.w3.org/TR/css3-selectors/#attribute-selectors).|`[qux=val]`, `[qux~=val]`|\n|[`childCombinator`](#childcombinator)|A [child combinator](https://www.w3.org/TR/css3-selectors/#child-combinators).|`.baz0 > .baz1`|\n|[`classSelector`](#classselector)|A [class selector](https://www.w3.org/TR/css3-selectors/#class-html).|`.baz`|\n|[`descendantCombinator`](#descendantcombinator)|A [descendant combinator](https://www.w3.org/TR/css3-selectors/#descendant-combinators).|`.baz0 .baz1`|\n|[`generalSiblingCombinator`](#generalsiblingcombinator)|A [general sibling combinator](https://www.w3.org/TR/css3-selectors/#general-sibling-combinators).|`.baz0 ~ .baz1`|\n|[`idSelector`](#idselector)|An [ID selector](https://www.w3.org/TR/css3-selectors/#id-selectors)|`#bar`|\n|[`pseudoClassSelector`](#pseudoclassselector)|A [pseudo-class selector](https://www.w3.org/TR/css3-selectors/#pseudo-classes).|`:corge`, `:corge()`, `:corge(val0, 'val1', \"val2\")`|\n|[`pseudoElementSelector`](#pseudoelementselector)|A [pseudo-element selector](https://www.w3.org/TR/css3-selectors/#pseudo-elements).|`::grault`|\n|[`typeSelector`](#typeselector)|A [type selector](https://www.w3.org/TR/css3-selectors/#type-selectors).|`foo`|\n|[`universalSelector`](#universalselector)|A [universal selector](https://www.w3.org/TR/css3-selectors/#universal-selector).|`*`|\n\n## Fields\n\nTokens have fields that describe additional information about the token. Fields are [token type](#token-types) specific.\n\n### `adjacentSiblingCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"adjacentSiblingCombinator\"|\n\n### `attributePresenceSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the element attribute.|\"qux\" in `[qux]`|\n|`type`|Name of the token type.|\"attributePresenceSelector\"|\n\n### `attributeValueSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the element attribute.|\"qux\" in `[qux]`|\n|`operator`|Operator of the expression.|\"\\*=\" in `[qux*=val]`|\n|`type`|Name of the token type.|\"attributeValueSelector\"|\n|`value`|Value of the expression.|\"val\" in `[qux=val]`|\n\n### `childCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"childCombinator\"|\n\n### `classSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Class name.|\"baz\" in `.baz[qux]`|\n|`type`|Name of the token type.|\"classSelector\"|\n\n### `descendantCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"descendantCombinator\"|\n\n### `generalSiblingCombinator`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"generalSiblingCombinator\"|\n\n### `idSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the ID.|\"bar\" in `#bar:corge()`|\n|`type`|Name of the token type.|\"idSelector\"|\n\n### `pseudoClassSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the pseudo-class.|\"corge\" in `#bar:corge()`|\n|`parameters`|Array of parameter values.|\"var0\", \"var1\" and \"var2\" in `:corge(var0, 'var1', \"var2\")`|\n|`type`|Name of the token type.|\"pseudoClassSelector\"|\n\n### `pseudoElementSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the pseudo-element.|\"grault\" in `#bar::grault`|\n|`type`|Name of the token type.|\"pseudoElementSelector\"|\n\n### `typeSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`name`|Name of the node.|\"foo\" in `foo#bar.baz`|\n|`type`|Name of the token type.|\"typeSelector\"|\n\n### `universalSelector`\n\n|Name|Description|Example|\n|---|---|---|\n|`type`|Name of the token type.|\"universalSelector\"|\n\n## Development\n\n```bash\ngit pull git@github.com:gajus/scalpel.git\ncd ./scalpel\nnpm install\nnpm run test\n```\n\nThe parser grammar is in the [`./src/grammar.ne`](./src/grammar.ne) file. After making changes to the parser grammar, you need to compile the parser using `npm run compile-grammar` command."
}