{"name":"glsl-token-depth","version":"1.0.0","description":"Determine the scope depth of an array of GLSL tokens","main":"index.js","license":"MIT","scripts":{"test":"node test | tap-spec"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"dependencies":{},"devDependencies":{"glsl-tokenizer":"git://github.com/stackgl/glsl-tokenizer#2.0.0","tap-spec":"^2.1.1","tape":"^3.0.3"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-depth.git"},"keywords":["ecosystem:stackgl","tokens","glsl","syntax"],"homepage":"https://github.com/stackgl/glsl-token-depth","bugs":{"url":"https://github.com/stackgl/glsl-token-depth/issues"},"gitHead":"c7e1125d9cc9719e2af2c038a6e79627b8a3cbb0","_id":"glsl-token-depth@1.0.0","_shasum":"21b9d0ac0ff8516b92c64611b1d9dcfd6b7c0ef4","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.10.28","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"dist":{"shasum":"21b9d0ac0ff8516b92c64611b1d9dcfd6b7c0ef4","tarball":"http://registry-npm.ywwl.com/glsl-token-depth/download/glsl-token-depth-1.0.0.tgz","integrity":"sha512-/BCF9AZqyYOgsQvLexUxqvj1Dr5OEIPs18PSZvQgGSDlA11sw8O5lrEOd5iJyDYAxaoViZIbw/Fdk+ZygVZMVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFR86tcm5s9EkW+tHUGM2T6gWCrj9VRndwx5rhkz+FGzAiBRkM3e9osuRWyCFMvWsfmSJ0KppQx81ytO79hf1SGB2g=="}],"size":2012,"noattachment":false,"key":"/glsl-token-depth/-/glsl-token-depth-1.0.0.tgz"},"directories":{},"readme":"# glsl-token-depth\n\n[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\n\nDetermine the scope depth of an array of GLSL tokens.\n\nUseful for inferring the scope of variables in a GLSL shader without having\nto fully parse the source.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/glsl-token-depth.png)](https://nodei.co/npm/glsl-token-depth/)\n\n### `depth(tokens)`\n\nWhere `tokens` is an array of tokens returned from\n[`glsl-tokenizer`](http://github.com/stackgl/glsl-tokenizer). Each token will\nbe modified in-place, and given a `depth` property.\n\n``` javascript\nvar tokenize = require('glsl-tokenizer/string')\nvar depth    = require('glsl-token-depth')\nvar fs       = require('fs')\n\nvar src = fs.readFileSync('shader.frag', 'utf8')\nvar tokens = tokenize(src)\n\ndepth(tokens)\n\ntokens[0].depth // 0\ntokens[1].depth // 0\ntokens[2].depth // 0\ntokens[3].depth // 0\ntokens[4].depth // 1\n// ...\n```\n\n## See Also\n\n* [stackgl/glsl-tokenizer](http://github.com/stackgl/glsl-tokenizer)\n\n## License\n\nMIT. See [LICENSE.md](http://github.com/stackgl/glsl-token-depth/blob/master/LICENSE.md) for details.\n","publish_time":1418588321122,"_cnpm_publish_time":1418588321122,"dist-tags":{"latest":"1.1.2"}}