glsl-token-assignments
Take an array of GLSL tokens and determine which tokens are either assignments or variable declarations.
Last updated 4 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install glsl-token-assignments 
SYNC missed versions from official npm registry.

glsl-token-assignments

experimental

Take an array of GLSL tokens and determine which tokens are either assignments or variable declarations.

Usage

NPM

assignments(tokens)

Takes an array of GLSL tokens from glsl-tokenizer and sets the following boolean values for each ident token, i.e. any variable names:

token.assignment

If the value of the variable is being changed here.

token.declaration

If a new variable is being defined here for this scope.

token.structMember

If this token is specifying a new struct member, e.g.:

struct X {
  float member1;
  float member2;
};

The tokens array will be modified in-place.

License

MIT. See LICENSE.md for details.

Current Tags

  • 2.0.2                                ...           latest (4 years ago)

4 Versions

  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Downloads
Today 4
This Week 110
This Month 4
Last Day 106
Last Week 458
Last Month 1,655
Dependencies (0)
None
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |