{"_id":"c-ast","_rev":"8-651fc95d5b729acad2224a862d308842","name":"c-ast","description":"Ansi C AST Generator","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"c-ast","version":"0.0.1","author":{"name":"Bailey Cosier"},"homepage":"https://github.com/cosier/cast#readme","description":"Ansi C AST Generator","license":"MIT","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/cosier/cast.git"},"keywords":["abstract syntax tree","syntax","tree","ast"],"bugs":{"url":"https://github.com/cosier/cast/issues"},"bin":{"c-ast":"bin/cast.js"},"scripts":{"dev":"$(npm bin)/better-npm-run dev","sample":"$(npm bin)/better-npm-run sample","sample-stdout":"$(npm bin)/better-npm-run sample-stdout","debug":"$(npm bin)/better-npm-run debug","clean":"rimraf dist","compile":"$(npm bin)/better-npm-run compile","watch":"$(npm bin)/better-npm-run watch","test":"$(npm bin)/better-npm-run test","lint":"$(npm bin)/better-npm-run lint","lint:watch":"$(npm bin)/esw -c .eslintrc.yml -w --color","lint:full":"npm run lint -- src tests server build config","lint:fix":"npm run lint -- --fix"},"betterScripts":{"watch":{"command":"$(npm bin)/webpack --config build/webpack.config.js --watch src"},"compile":{"command":"$(npm bin)/webpack --config build/webpack.config.js src"},"sample-stdout":{"command":"$(npm bin)/better-npm-run dev -- transform specimen/sample.h","env":{"DEBUG":"app:*"}},"sample":{"command":"$(npm bin)/better-npm-run dev -- transform specimen/sample.h tmp/output.h","env":{"DEBUG":"app:*"}},"dev":{"command":"node --inspect dist/index.js","env":{"DEBUG":"app:*"}},"deploy":{"command":"npm run clean && npm run compile","env":{"DEBUG":"app:*"}},"deploy:dev":{"command":"npm run deploy","env":{"NODE_ENV":"development","DEBUG":"app:*"}},"deploy:prod":{"command":"npm run deploy","env":{"NODE_ENV":"production","DEBUG":"app:*"}},"test":{"command":"node --inspect $(npm bin)/mocha-webpack --webpack-config build/webpack.config.test.js --watch  -R $REPORTER --glob '*.spec.js' tests","env":{"REPORTER":"nyan","NODE_ENV":"test","DEBUG":"app:*"}},"lint":{"command":"$(npm bin)/eslint -c .eslintrc.js tests src","env":{"NODE_ENV":"test","DEBUG":"app:*"}}},"dependencies":{"cliui":"^3.2.0","cross-spawn":"^5.1.0","multilang-extract-comments":"^0.3.0","spawn-sync":"^1.0.15","thread-sleep":"^2.0.0","try-thread-sleep":"^1.0.2","yargs":"^9.0.1"},"devDependencies":{"ajv":">=4.10.0","babel-cli":"^6.18.0","babel-core":"^6.3.17","babel-eslint":"^7.1.1","babel-jest":"^19.0.0","babel-loader":"^7.1.1","babel-plugin-transform-decorators-legacy":"^1.3.4","babel-plugin-transform-es3-member-expression-literals":"^6.8.0","babel-plugin-transform-es3-property-literals":"^6.8.0","babel-plugin-transform-runtime":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","better-npm-run":"^0.1.0","chai":"^3.4.1","chai-as-promised":"^6.0.0","codecov":"^1.0.1","eslint":"^4.7.1","eslint-config-google":"^0.9.1","eslint-import-resolver-webpack":"^0.8.1","eslint-plugin-babel":"^4.1.1","eslint-plugin-dependencies":"^2.2.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","eslint-watch":"^3.0.1","mocha":"github:cosier/mocha","mocha-webpack":"^1.0.0-rc.1","sinon":"^1.17.3","sinon-chai":"^2.8.0","stream-buffers":"^3.0.1","webpack":"^3.6.0","webpack-dev-middleware":"^1.10.2"},"gitHead":"24a68a0f7a8d50a00f999b0eb926a59337e1e2af","_id":"c-ast@0.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"cosier","email":"bailey@cosier.ca"},"dist":{"integrity":"sha512-GcapBOPhyAYEbAAewgpftfuVIQdmRmesxUNw6e9ZTBnxIZaK99doTUBPFrYV0dmWXCbYRD/WfoajzVZ3h3bRYA==","shasum":"e967cd84dc3bceea7abe19df452370f15f87bb70","tarball":"https://registry.npmjs.org/c-ast/-/c-ast-0.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvz+hFF8da/0tG5p+AKjmu3Yp4CcS8obwYNKLSsnHfZAiEAvTMUEJwADnpMvh4r/7cDhL6NSgW5YSejSGeyGtIqSbE="}]},"maintainers":[{"name":"cosier","email":"bailey@cosier.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/c-ast-0.0.1.tgz_1506361269888_0.5443513528443873"}},"0.0.3":{"name":"c-ast","version":"0.0.3","author":{"name":"Bailey Cosier"},"homepage":"https://github.com/cosier/cast#readme","description":"Ansi C AST Generator","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/cosier/cast.git"},"keywords":["abstract syntax tree","syntax","tree","ast"],"bugs":{"url":"https://github.com/cosier/cast/issues"},"bin":{"c-ast":"bin/c-ast.js"},"scripts":{"dev":"$(npm bin)/better-npm-run dev","sample":"$(npm bin)/better-npm-run sample","sample-stdout":"$(npm bin)/better-npm-run sample-stdout","debug":"$(npm bin)/better-npm-run debug","clean":"rimraf dist","compile":"$(npm bin)/better-npm-run compile","watch":"$(npm bin)/better-npm-run watch","test":"$(npm bin)/better-npm-run test","test:debug":"$(npm bin)/better-npm-run test:debug","lint":"$(npm bin)/better-npm-run lint","lint:watch":"$(npm bin)/esw -c .eslintrc.yml -w --color","lint:full":"npm run lint -- src tests server build config","lint:fix":"npm run lint -- --fix"},"betterScripts":{"sample":{"command":"$(npm bin)/better-npm-run dev -- transform specimen/sample.h","env":{"DEBUG":"app:*"}},"test":{"command":"$NODE $BRK $(npm bin)/$RUNNER $OPTS $GLOB $TEST_DIR","env":{"NODE":"node","RUNNER":"mocha","OPTS":"-R nyan -c --watch --glob","GLOB":"*.spec.js","TEST_DIR":"tests","NODE_ENV":"test"}},"test:debug":{"command":"better-npm-run test","env":{"RUNNER":"mocha debug"}},"lint":{"command":"$(npm bin)/eslint -c .eslintrc.js tests lib","env":{"NODE_ENV":"test"}}},"dependencies":{"yargs":"^9.0.1"},"devDependencies":{"better-npm-run":"^0.1.0","chai":"^3.4.1","chai-as-promised":"^6.0.0","codecov":"^1.0.1","eslint":"^4.7.1","eslint-config-google":"^0.9.1","eslint-plugin-dependencies":"^2.2.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","eslint-watch":"^3.0.1","mocha":"github:cosier/mocha","stream-buffers":"^3.0.1"},"gitHead":"04943c513902d2b5675bc34ebda45ce665e6538e","_id":"c-ast@0.0.3","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"cosier","email":"bailey@cosier.ca"},"dist":{"integrity":"sha512-+2TP/zNqq0HU26MmN3uYP4vpm8UyJVlbm8zla+t45/k9+VZ1x2LpAgBDxFtDFuICZjl54mZVFXeLnvxnVV5mAg==","shasum":"36cc76c4a13705faf10e7965daf8372f4dfb1338","tarball":"https://registry.npmjs.org/c-ast/-/c-ast-0.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGn2ZukKLCpZuoEvk5CSiFDeXG2gww4BDvB/9rO7EoKNAiEAvZUO3l73mM0D5PjRkPggDmyeZS2xSjLtwLaaaoqjR+A="}]},"maintainers":[{"name":"cosier","email":"bailey@cosier.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/c-ast-0.0.3.tgz_1507101670413_0.17866723285987973"}},"0.0.4":{"name":"c-ast","version":"0.0.4","author":{"name":"Bailey Cosier"},"homepage":"https://github.com/cosier/cast#readme","description":"Ansi C AST Generator","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/cosier/cast.git"},"keywords":["abstract syntax tree","syntax","tree","ast"],"bugs":{"url":"https://github.com/cosier/cast/issues"},"bin":{"c-ast":"bin/c-ast.js"},"scripts":{"dev":"$(npm bin)/better-npm-run dev","sample":"$(npm bin)/better-npm-run sample","sample-stdout":"$(npm bin)/better-npm-run sample-stdout","debug":"$(npm bin)/better-npm-run debug","clean":"rimraf dist","compile":"$(npm bin)/better-npm-run compile","watch":"$(npm bin)/better-npm-run watch","test":"$(npm bin)/better-npm-run test","test:debug":"$(npm bin)/better-npm-run test:debug","lint":"$(npm bin)/better-npm-run lint","lint:watch":"$(npm bin)/esw -c .eslintrc.yml -w --color","lint:full":"npm run lint -- src tests server build config","lint:fix":"npm run lint -- --fix"},"betterScripts":{"sample":{"command":"$(npm bin)/better-npm-run dev -- transform specimen/sample.h","env":{"DEBUG":"app:*"}},"test":{"command":"$NODE $BRK $(npm bin)/$RUNNER $OPTS $GLOB $TEST_DIR","env":{"NODE":"node","RUNNER":"mocha","OPTS":"-R nyan -c --watch --glob","GLOB":"*.spec.js","TEST_DIR":"tests","NODE_ENV":"test"}},"test:debug":{"command":"better-npm-run test","env":{"RUNNER":"mocha debug"}},"lint":{"command":"$(npm bin)/eslint -c .eslintrc.js tests lib","env":{"NODE_ENV":"test"}}},"dependencies":{"yargs":"^9.0.1"},"devDependencies":{"better-npm-run":"^0.1.0","chai":"^3.4.1","chai-as-promised":"^6.0.0","codecov":"^1.0.1","eslint":"^4.7.1","eslint-config-google":"^0.9.1","eslint-plugin-dependencies":"^2.2.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","eslint-watch":"^3.0.1","mocha":"github:cosier/mocha","stream-buffers":"^3.0.1"},"gitHead":"04943c513902d2b5675bc34ebda45ce665e6538e","_id":"c-ast@0.0.4","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"cosier","email":"bailey@cosier.ca"},"dist":{"integrity":"sha512-lx2NE9yHX2YgI8jKeFvQ+P5i0vGJ3i4oxBsWtHR7c4lDq/d/bpfyzEDXDIcMiSpdCzezLBPXW6AgEn3jHJ23FQ==","shasum":"4c92d849e3b24bb25bb63a5455d6f62b734760c0","tarball":"https://registry.npmjs.org/c-ast/-/c-ast-0.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzHo+6Nk3FcvPCAjoT3uE1KPluwKWAlyvGPkTihmjDEAiEAiRjHOjbaoIe424OP7Qw7Fz8xuKvU9gAHfnCrCf+S3XY="}]},"maintainers":[{"name":"cosier","email":"bailey@cosier.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/c-ast-0.0.4.tgz_1507101719321_0.7956796139478683"}},"0.0.5":{"name":"c-ast","version":"0.0.5","author":{"name":"Bailey Cosier"},"homepage":"https://github.com/cosier/cast#readme","description":"Ansi C AST Generator","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/cosier/cast.git"},"keywords":["abstract syntax tree","syntax","tree","ast"],"bugs":{"url":"https://github.com/cosier/cast/issues"},"bin":{"c-ast":"bin/c-ast.js"},"scripts":{"dev":"$(npm bin)/better-npm-run dev","sample":"$(npm bin)/better-npm-run sample","sample-stdout":"$(npm bin)/better-npm-run sample-stdout","debug":"$(npm bin)/better-npm-run debug","clean":"rimraf dist","compile":"$(npm bin)/better-npm-run compile","watch":"$(npm bin)/better-npm-run watch","test":"$(npm bin)/better-npm-run test","test:debug":"$(npm bin)/better-npm-run test:debug","lint":"$(npm bin)/better-npm-run lint","lint:watch":"$(npm bin)/esw -c .eslintrc.yml -w --color","lint:full":"npm run lint -- src tests server build config","lint:fix":"npm run lint -- --fix"},"betterScripts":{"sample":{"command":"$(npm bin)/better-npm-run dev -- transform specimen/sample.h","env":{"DEBUG":"app:*"}},"test":{"command":"$NODE $BRK $(npm bin)/$RUNNER $OPTS $GLOB $TEST_DIR","env":{"NODE":"node","RUNNER":"mocha","OPTS":"-R nyan -c --watch --glob","GLOB":"*.spec.js","TEST_DIR":"tests","NODE_ENV":"test"}},"test:debug":{"command":"better-npm-run test","env":{"RUNNER":"mocha debug"}},"lint":{"command":"$(npm bin)/eslint -c .eslintrc.js tests lib","env":{"NODE_ENV":"test"}}},"dependencies":{"yargs":"^9.0.1"},"devDependencies":{"better-npm-run":"^0.1.0","chai":"^3.4.1","chai-as-promised":"^6.0.0","codecov":"^1.0.1","eslint":"^4.7.1","eslint-config-google":"^0.9.1","eslint-plugin-dependencies":"^2.2.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","eslint-watch":"^3.0.1","mocha":"github:cosier/mocha","stream-buffers":"^3.0.1"},"gitHead":"04943c513902d2b5675bc34ebda45ce665e6538e","_id":"c-ast@0.0.5","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"cosier","email":"bailey@cosier.ca"},"dist":{"integrity":"sha512-DBsfOgDQyVKLQlFDEPWX7y1Qjzo9b36isK5XqaejgMSi/D1ml41tYtt9w5146cnMVtTxDnoYypCaXdsSqJPKiw==","shasum":"0fb5d61ddc11a8306572ad9f7d680709f9d8a3e7","tarball":"https://registry.npmjs.org/c-ast/-/c-ast-0.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGqVm3wBG3/XSJ4X3K9XNzTCZqurloTqE2VI7TfsGJbsAiADMHFENPpaItQc6vFrH6sZrZhJ7CVuPdKWnapDa9EzJQ=="}]},"maintainers":[{"name":"cosier","email":"bailey@cosier.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/c-ast-0.0.5.tgz_1507101834215_0.8723192606121302"}},"0.0.6":{"name":"c-ast","version":"0.0.6","author":{"name":"Bailey Cosier"},"homepage":"https://github.com/cosier/cast#readme","description":"Ansi C AST Generator","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/cosier/cast.git"},"keywords":["abstract syntax tree","syntax","tree","ast"],"bugs":{"url":"https://github.com/cosier/cast/issues"},"bin":{"c-ast":"bin/c-ast.js"},"scripts":{"dev":"$(npm bin)/better-npm-run dev","sample":"$(npm bin)/better-npm-run sample","sample-stdout":"$(npm bin)/better-npm-run sample-stdout","debug":"$(npm bin)/better-npm-run debug","clean":"rimraf dist","compile":"$(npm bin)/better-npm-run compile","watch":"$(npm bin)/better-npm-run watch","test":"$(npm bin)/better-npm-run test","test:debug":"$(npm bin)/better-npm-run test:debug","lint":"$(npm bin)/better-npm-run lint","lint:watch":"$(npm bin)/esw -c .eslintrc.yml -w --color","lint:full":"npm run lint -- src tests server build config","lint:fix":"npm run lint -- --fix"},"betterScripts":{"sample":{"command":"$(npm bin)/better-npm-run dev -- transform specimen/sample.h","env":{"DEBUG":"app:*"}},"test":{"command":"$NODE $BRK $(npm bin)/$RUNNER $OPTS $GLOB $TEST_DIR","env":{"NODE":"node","RUNNER":"mocha","OPTS":"-R nyan -c --watch --glob","GLOB":"*.spec.js","TEST_DIR":"tests","NODE_ENV":"test"}},"test:debug":{"command":"better-npm-run test","env":{"RUNNER":"mocha debug"}},"lint":{"command":"$(npm bin)/eslint -c .eslintrc.js tests lib","env":{"NODE_ENV":"test"}}},"dependencies":{"yargs":"^9.0.1"},"devDependencies":{"better-npm-run":"^0.1.0","chai":"^3.4.1","chai-as-promised":"^6.0.0","codecov":"^1.0.1","eslint":"^4.7.1","eslint-config-google":"^0.9.1","eslint-plugin-dependencies":"^2.2.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","eslint-watch":"^3.0.1","mocha":"github:cosier/mocha","stream-buffers":"^3.0.1"},"gitHead":"acf233a7b5610817acd522a9913e0e49cf194915","_id":"c-ast@0.0.6","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"cosier","email":"bailey@cosier.ca"},"dist":{"integrity":"sha512-+I64MiS/1iFs5tNTGDW5F614+nYk+kGEfmajW9NMoy2+7846I5AM/kc+xI0nPVkFrUpLtG0pM3MiDsbE/1odHw==","shasum":"75ed351fb5abe51c60f4e8c63d0281d8115c6717","tarball":"https://registry.npmjs.org/c-ast/-/c-ast-0.0.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+CA6vloTEW8WjQOaIqcFlMPbRTSeNSR8O2Ws+3etXxAIhAJgwWqjI+4tiwGAgvcjXDJMM8xd2rrTKVqgcIPugQ2G1"}]},"maintainers":[{"name":"cosier","email":"bailey@cosier.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/c-ast-0.0.6.tgz_1507215599781_0.9458657598588616"}},"1.0.0":{"name":"c-ast","version":"1.0.0","author":{"name":"Bailey Cosier"},"homepage":"https://github.com/cosier/cast#readme","description":"Ansi C AST Generator","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/cosier/cast.git"},"keywords":["abstract syntax tree","syntax","tree","ast"],"bugs":{"url":"https://github.com/cosier/cast/issues"},"bin":{"c-ast":"bin/c-ast.js"},"scripts":{"dev":"$(npm bin)/better-npm-run dev","sample":"$(npm bin)/better-npm-run sample","sample-stdout":"$(npm bin)/better-npm-run sample-stdout","debug":"$(npm bin)/better-npm-run debug","clean":"rimraf dist","compile":"$(npm bin)/better-npm-run compile","watch":"$(npm bin)/better-npm-run watch","test":"$(npm bin)/better-npm-run test","test:debug":"$(npm bin)/better-npm-run test:debug","lint":"$(npm bin)/better-npm-run lint","lint:watch":"$(npm bin)/esw -c .eslintrc.yml -w --color","lint:full":"npm run lint -- src tests server build config","lint:fix":"npm run lint -- --fix"},"betterScripts":{"sample":{"command":"$(npm bin)/better-npm-run dev -- transform specimen/sample.h","env":{"DEBUG":"app:*"}},"test":{"command":"$NODE $BRK $(npm bin)/$RUNNER $OPTS $GLOB $TEST_DIR","env":{"NODE":"node","RUNNER":"mocha","OPTS":"-R nyan -c --glob","GLOB":"*.spec.js","TEST_DIR":"tests","NODE_ENV":"test"}},"test:debug":{"command":"better-npm-run test","env":{"RUNNER":"mocha debug","OPTS":"-R nyan -c --watch --glob"}},"lint":{"command":"$(npm bin)/eslint -c .eslintrc.js tests lib","env":{"NODE_ENV":"test"}}},"dependencies":{"yargs":"^9.0.1"},"devDependencies":{"better-npm-run":"^0.1.0","chai":"^3.4.1","chai-as-promised":"^6.0.0","codecov":"^1.0.1","eslint":"^4.7.1","eslint-config-google":"^0.9.1","eslint-plugin-dependencies":"^2.2.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","eslint-watch":"^3.0.1","mocha":"github:cosier/mocha","stream-buffers":"^3.0.1"},"gitHead":"d48f153c477012a172f6725bb1625d0283e58219","_id":"c-ast@1.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.4.0","_npmUser":{"name":"cosier","email":"bailey@cosier.ca"},"dist":{"integrity":"sha512-YD9ZAO/MiXu6IAKKnCnFMwoMuat6Vwpe3Efqwymw70leAReOEIqoNnTdGja1NLQG3MV/bvm2Nj9R1bZbGinfCw==","shasum":"5f5e2339aea824412663585e1b9c2167f5639e77","tarball":"https://registry.npmjs.org/c-ast/-/c-ast-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWIWqa70+2O/i7FU/xr4vjcIEYusiq0ZxwS3gam/ugOAIhAMShiH6v4asVffwsWw23ViABIg20Quk0SrK0i3zV11Eb"}]},"maintainers":[{"name":"cosier","email":"bailey@cosier.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/c-ast-1.0.0.tgz_1507329175557_0.1577423783019185"}}},"readme":"# c-ast\n\nGenerates an **Abstract Syntax Tree** from C source code.\n\nThe resulting AST provides in-depth structured access and **meta data** to all definitions inside the given input.\n\n\n## Features\n\n####1. Comments **Extraction** and **Association** Lookup\nc-ast extracts all comments in the source code as their own nodes, along with intelligent node association. This allows easy lookup of code that belongs to a comment, or getting any comments that belong to a given code block via an abritrary line lookup.\n\n####2. **Indexed access** to all structured nodes in the source input\nAn index is provided for fast lookup of any line, returning the node that spans that line along with node meta data.\n\n####3. Use a **CLI tool** or **JavaScript** *api* for generating ASTs\n   Use the `$ c-ast` cli to output JSON, or use the API directly in your **NodeJS** application with `require('c-ast')`\n\n\n## Getting Started (CLI)\n\nUse NPM to install the c-ast library and accompanying cli executable.\n\n```bash\n$ npm install c-ast\n$ c-ast --help\n\nc-ast <cmd> [args]\n\nCommands:\n  transform <input> [--range]               transform input into an AST json\n  annotate  <input> [--range] [--colorize]  annotate input with node metadata\n\nOptions:\n  --version  Show version number                                       \n  --help     Show help     \n  \n$ c-ast transform specimen/sample.h                                            \n\n```\n\nThe **transform** command will output a JSON representation from the given input.\n\nThe **annotate** command will output the original input with added metadata on the side— used mainly for AST analysis and inspection.\n\nAn optional range argument is also available for limiting the resulting output.\n\n## Getting Started (Javascript API)\nThe Javascript APIs return a Promise which resolves into a AST data structure.\n\n```\nconst cast = require('c-ast');\n\n// Parse text input directly\nconst ast = await cast.ast_from_text(\"code_text_input\");\n\n// Read a file from disk\nconst ast = await cast.ast_from_file(path_to_file);\n\n// Takes a streaming buffer\nconst ast = await cast.ast_from_stream(buffer);\n\n```\n\n## Examples\n\nIn this basic example, the JSON output outlines the various functions, structures, and association of comments belonging to the struct and functions.\n\n```\n$ c-ast transform specimen/examples.c\n```\n\n```\n{\n    \"nodes\": {\n        \"comments\": {\n            \"0\": {\n                \"id\": 0,\n                \"type\": \"comments\",\n                \"assocs\": {},\n                \"data\": {\n                    \"0\": \"// Display Prime Numbers Between two Intervals When Larger Number is Entered first\",\n                    \"1\": \"// @filename example.c\",\n                    \"2\": \"// @author Bailey C\"\n                }\n            },\n            \"6\": {\n                \"id\": 6,\n                \"type\": \"comments\",\n                \"assocs\": {\n                    \"defs\": [\n                        7\n                    ]\n                },\n                \"data\": {\n                    \"6\": \"// Structure for managing prime input boundaries\"\n                }\n            },\n            \"12\": {\n                \"id\": 12,\n                \"type\": \"comments\",\n                \"assocs\": {\n                    \"code\": [\n                        13\n                    ]\n                },\n                \"data\": {\n                    \"12\": \"// Main entry point\"\n                }\n            },\n            \"24\": {\n                \"id\": 24,\n                \"type\": \"comments\",\n                \"assocs\": {\n                    \"code\": [\n                        27\n                    ]\n                },\n                \"data\": {\n                    \"24\": \"/**\",\n                    \"25\": \" * Determines primes within a boundary\",\n                    \"26\": \" */\"\n                }\n            }\n        },\n        \"code\": {\n            \"13\": {\n                \"id\": 13,\n                \"type\": \"code\",\n                \"assocs\": {\n                    \"comments\": [\n                        12\n                    ]\n                },\n                \"data\": {\n                    \"13\": \"int main()\",\n                    \"14\": \"{\",\n\t\t\t\t\t\t...\n                    \"21\": \"    return determine_primes(input);\",\n                    \"22\": \"}\"\n                }\n            },\n            \"27\": {\n                \"id\": 27,\n                \"type\": \"code\",\n                \"assocs\": {\n                    \"comments\": [\n                        24\n                    ]\n                },\n                \"data\": {\n                    \"27\": \"int determine_primes(prime_input input)\",\n                    \"28\": \"{\",\n\t\t\t\t\t\t...\n                    \"54\": \"}\"\n                }\n            }\n        },\n        \"defs\": {\n            \"7\": {\n                \"id\": 7,\n                \"type\": \"defs\",\n                \"assocs\": {\n                    \"comments\": [\n                        6\n                    ]\n                },\n                \"data\": {\n                    \"7\": \"typedef struct prime_input {\",\n                    \"10\": \"} prime_input;\"\n                },\n                \"inner\": [\n                    {\n                        \"id\": 8,\n                        \"type\": \"members\",\n                        \"assocs\": {},\n                        \"data\": {\n                            \"8\": \"    int low;\"\n                        },\n                        \"parent\": 7\n                    },\n                    {\n                        \"id\": 9,\n                        \"type\": \"members\",\n                        \"assocs\": {},\n                        \"data\": {\n                            \"9\": \"    int high;\"\n                        },\n                        \"parent\": 7\n                    }\n                ],\n                \"index\": {\n                    \"8\": {\n                        \"ind\": 0,\n                        \"type\": \"members\"\n                    },\n                    \"9\": {\n                        \"ind\": 1,\n                        \"type\": \"members\"\n                    }\n                }\n            }\n        }\n    },\n    \"index\": {\n        \"0\": {\n            \"node_id\": 0,\n            \"type\": \"comments\",\n        },\n        \"1\": {\n            \"node_id\": 0,\n            \"type\": \"comments\",\n        },\n        \"2\": {\n            \"node_id\": 0,\n            \"type\": \"comments\",\n        }\n        ...\n        \"54\": {\n            \"node_id\": 27,\n            \"type\": \"code\",\n        }\n    }\n}\n```\n\n## Testing\n\nc-ast has full test coverage of all internal and public methods, including various edge case tests and real world specimen tests for completeness.\n\nTests are executed with **mocha** via the `npm test` command, and can be found in the */tests* folder.\n\n\n## License\n\nAuthoried by Bailey Cosier.\nLicensed under The MIT License (MIT)\n\nFor the full copyright and license information, please view the LICENSE file.\n\n","maintainers":[{"name":"cosier","email":"bailey@cosier.ca"}],"time":{"modified":"2022-04-12T04:55:00.071Z","created":"2017-09-25T17:41:09.987Z","0.0.1":"2017-09-25T17:41:09.987Z","0.0.2":"2017-10-04T07:17:13.062Z","0.0.3":"2017-10-04T07:21:10.585Z","0.0.4":"2017-10-04T07:21:59.442Z","0.0.5":"2017-10-04T07:23:54.445Z","0.0.6":"2017-10-05T14:59:59.900Z","1.0.0":"2017-10-06T22:32:55.640Z"},"homepage":"https://github.com/cosier/cast#readme","keywords":["abstract syntax tree","syntax","tree","ast"],"repository":{"type":"git","url":"git+https://github.com/cosier/cast.git"},"author":{"name":"Bailey Cosier"},"bugs":{"url":"https://github.com/cosier/cast/issues"},"license":"MIT","readmeFilename":"README.md"}