# glsl-token-assignments

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

Latest version **2.0.2** (published 2016-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install glsl-token-assignments
pnpm add glsl-token-assignments
yarn add glsl-token-assignments
bun add glsl-token-assignments
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2016-09-28 |
| First published | 2015-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Hugh Kennedy |
| Maintainers | chrisdickinson, hughsk, mattdesl, mikkoh, mikolalysenko, rezaali, substack, tatumcreative, thibauts, wwwtyro, yoshuawuyts |
| Keywords | ecosystem:stackgl, pseudoparser, syntax, glsl, tokens, assignments, declarations |

## Links

- npm: https://www.npmjs.com/package/glsl-token-assignments
- Repository: https://github.com/stackgl/glsl-token-assignments
- Issues: https://github.com/stackgl/glsl-token-assignments/issues
- npm.io page: https://npm.io/package/glsl-token-assignments

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2016-09-28
- 2.0.1 — 2015-03-06
- 2.0.0 — 2015-01-04
- 1.0.0 — 2015-01-02

## README

# glsl-token-assignments

[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

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

## Usage

[![NPM](https://nodei.co/npm/glsl-token-assignments.png)](https://nodei.co/npm/glsl-token-assignments/)

### `assignments(tokens)`

Takes an array of GLSL tokens from
[`glsl-tokenizer`](http://github.com/stackgl/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.:

``` glsl
struct X {
  float member1;
  float member2;
};
```

The `tokens` array will be modified in-place.

## License

MIT. See [LICENSE.md](http://github.com/stackgl/glsl-token-assignments/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/glsl-token-assignments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
