glsl-token-properties
Takes an array of GLSL tokens and determines whether or not they're a property of another identifier
Last updated 6 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install glsl-token-properties 
SYNC missed versions from official npm registry.

glsl-token-properties

experimental

Takes an array of GLSL tokens and determines whether or not they're a property of another identifier.

Usage

NPM

properties(tokens)

Takes an array of GLSL tokens from glsl-tokenizer and sets a property boolean for whether or not the token is a property.

var tokenizer  = require('glsl-tokenizer/string')
var properties = require('glsl-token-properties')

var src = 'some.value[2];'
var tokens = tokenizer(src)

// determine which tokens are properties
properties(tokens)

tokens[0].data     // "some"
tokens[0].property // false
tokens[2].data     // "value"
tokens[2].property // true
tokens[4].data     // "2"
tokens[4].property // false

See Also

License

MIT. See LICENSE.md for details.

Current Tags

  • 1.0.1                                ...           latest (6 years ago)

2 Versions

  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Downloads
Today 7
This Week 417
This Month 1,501
Last Day 81
Last Week 362
Last Month 1,422
Dependencies (0)
None
Dev Dependencies (6)

Copyright 2014 - 2016 © taobao.org |