{"id":15310722,"url":"https://github.com/codyjasonbennett/shaderkit","last_synced_at":"2025-04-04T09:10:12.617Z","repository":{"id":65831504,"uuid":"600917609","full_name":"CodyJasonBennett/shaderkit","owner":"CodyJasonBennett","description":"Tools and IntelliSense for GLSL and WGSL.","archived":false,"fork":false,"pushed_at":"2025-02-18T13:44:49.000Z","size":215,"stargazers_count":130,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T06:08:36.130Z","etag":null,"topics":["compiler","glsl","intellisense","minifier","parser","shaders","webgl","webgpu","wgsl"],"latest_commit_sha":null,"homepage":"https://npmjs.com/shaderkit","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodyJasonBennett.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["CodyJasonBennett"]}},"created_at":"2023-02-13T00:44:36.000Z","updated_at":"2025-03-05T09:08:44.000Z","dependencies_parsed_at":"2023-07-23T00:28:44.305Z","dependency_job_id":"b8b25121-697f-4637-a031-a0453f0bdf95","html_url":"https://github.com/CodyJasonBennett/shaderkit","commit_stats":{"total_commits":89,"total_committers":3,"mean_commits":"29.666666666666668","dds":0.3033707865168539,"last_synced_commit":"398c168d26c0b43c71f49885475d909dea35a6ca"},"previous_names":["codyjasonbennett/glsl-tools"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyJasonBennett%2Fshaderkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyJasonBennett%2Fshaderkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyJasonBennett%2Fshaderkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodyJasonBennett%2Fshaderkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodyJasonBennett","download_url":"https://codeload.github.com/CodyJasonBennett/shaderkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149505,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","glsl","intellisense","minifier","parser","shaders","webgl","webgpu","wgsl"],"created_at":"2024-10-01T08:29:15.200Z","updated_at":"2025-04-04T09:10:12.564Z","avatar_url":"https://github.com/CodyJasonBennett.png","language":"TypeScript","funding_links":["https://github.com/sponsors/CodyJasonBennett"],"categories":[],"sub_categories":[],"readme":"[![Size](https://img.shields.io/bundlephobia/minzip/shaderkit?label=gzip\u0026style=flat\u0026colorA=000000\u0026colorB=000000)](https://bundlephobia.com/package/shaderkit)\n[![Version](https://img.shields.io/npm/v/shaderkit?style=flat\u0026colorA=000000\u0026colorB=000000)](https://npmjs.com/package/shaderkit)\n[![Downloads](https://img.shields.io/npm/dt/shaderkit.svg?style=flat\u0026colorA=000000\u0026colorB=000000)](https://npmjs.com/package/shaderkit)\n\n# shaderkit\n\nTools and IntelliSense for GLSL and WGSL.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Tokenize](#tokenize)\n- [Minify](#minify)\n- [Parse](#parse)\n- [Generate](#generate)\n- [Visit](#visit)\n- [AST](#ast)\n  - [Node Objects](#node-objects)\n  - [Identifier](#identifier)\n  - [Literal](#literal)\n  - [ArraySpecifier](#arrayspecifier)\n  - [Program](#program)\n  - Statements\n    - [ExpressionStatement](#expressionstatement)\n    - [BlockStatement](#blockstatement)\n    - [DiscardStatement](#discardstatement)\n    - [PreprocessorStatement](#preprocessorstatement)\n    - [PrecisionQualifierStatement](#precisionqualifierstatement)\n    - [InvariantQualifierStatement](#invariantqualifierstatement)\n    - [LayoutQualifierStatement](#layoutqualifierstatement)\n    - Control Flow\n      - [ReturnStatement](#returnstatement)\n      - [BreakStatement](#breakstatement)\n      - [ContinueStatement](#continuestatement)\n    - Choice\n      - [IfStatement](#ifstatement)\n      - [SwitchStatement](#switchstatement)\n        - [SwitchCase](#switchcase)\n    - Loops\n      - [WhileStatement](#whilestatement)\n      - [DoWhileStatement](#dowhilestatement)\n      - [ForStatement](#forstatement)\n  - Declarations\n    - [FunctionDeclaration](#functiondeclaration)\n      - [FunctionParameter](#functionparameter)\n    - [VariableDeclaration](#variabledeclaration)\n      - [VariableDeclarator](#variabledeclarator)\n    - [StructuredBufferDeclaration](#structuredbufferdeclaration)\n    - [StructDeclaration](#structdeclaration)\n  - Expressions\n    - [ArrayExpression](#arrayexpression)\n    - Unary Operations\n      - [UnaryExpression](#unaryexpression)\n        - [UnaryOperator](#unaryoperator)\n      - [UpdateExpression](#updateexpression)\n        - [UpdateOperator](#updateoperator)\n    - Binary Operations\n      - [BinaryExpression](#binaryexpression)\n        - [BinaryOperator](#binaryoperator)\n      - [AssignmentExpression](#assignmentexpression)\n        - [AssignmentOperator](#assignmentoperator)\n      - [LogicalExpression](#logicalexpression)\n        - [LogicalOperator](#logicaloperator)\n      - [MemberExpression](#memberexpression)\n    - [ConditionalExpression](#conditionalexpression)\n    - [CallExpression](#callexpression)\n\n## Installation\n\nTo install, use your preferred package manager:\n\n```bash\nnpm install shaderkit\nyarn add shaderkit\npnpm add shaderkit\n```\n\nOr, use a CDN:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import * as shaderkit from 'https://unpkg.com/shaderkit'\n\u003c/script\u003e\n```\n\n## Tokenize\n\nTokenizes a string of GLSL or WGSL code, returning an array of `Token` objects, where each `Token` object represents a single syntax feature in the input code.\n\n```ts\ninterface Token {\n  type: 'whitespace' | 'comment' | 'symbol' | 'bool' | 'float' | 'int' | 'identifier' | 'keyword'\n  value: string\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eGLSL Example\u003c/summary\u003e\n  \n  \u003cbr /\u003e\n\n```ts\nimport { tokenize } from 'shaderkit'\n\nconst code = 'void main() { gl_Position = vec4(0, 0, 0, 1); }'\nconst tokens = tokenize(code)\n\nconsole.log(tokens)\n```\n\nThe output of the above code will be:\n\n```json\n[\n  { \"type\": \"keyword\", \"value\": \"void\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"identifier\", \"value\": \"main\" },\n  { \"type\": \"symbol\", \"value\": \"(\" },\n  { \"type\": \"symbol\", \"value\": \")\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"symbol\", \"value\": \"{\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"keyword\", \"value\": \"gl_Position\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"symbol\", \"value\": \"=\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"keyword\", \"value\": \"vec4\" },\n  { \"type\": \"symbol\", \"value\": \"(\" },\n  { \"type\": \"int\", \"value\": \"0\" },\n  { \"type\": \"symbol\", \"value\": \",\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"int\", \"value\": \"0\" },\n  { \"type\": \"symbol\", \"value\": \",\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"int\", \"value\": \"0\" },\n  { \"type\": \"symbol\", \"value\": \",\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"int\", \"value\": \"1\" },\n  { \"type\": \"symbol\", \"value\": \")\" },\n  { \"type\": \"symbol\", \"value\": \";\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"symbol\", \"value\": \"}\" }\n]\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eWGSL Example\u003c/summary\u003e\n  \n  \u003cbr /\u003e\n\n```ts\nimport { tokenize } from 'shaderkit'\n\nconst code = '@vertex fn main() -\u003e @builtin(position) vec4\u003cf32\u003e { return vec4(0, 0, 0, 1); }'\nconst tokens = tokenize(code)\n\nconsole.log(tokens)\n```\n\nThe output of the above code will be:\n\n```json\n[\n  { \"type\": \"symbol\", \"value\": \"@\" },\n  { \"type\": \"keyword\", \"value\": \"vertex\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"keyword\", \"value\": \"fn\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"identifier\", \"value\": \"main\" },\n  { \"type\": \"symbol\", \"value\": \"(\" },\n  { \"type\": \"symbol\", \"value\": \")\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"symbol\", \"value\": \"-\u003e\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"symbol\", \"value\": \"@\" },\n  { \"type\": \"keyword\", \"value\": \"builtin\" },\n  { \"type\": \"symbol\", \"value\": \"(\" },\n  { \"type\": \"keyword\", \"value\": \"position\" },\n  { \"type\": \"symbol\", \"value\": \")\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"keyword\", \"value\": \"vec4\" },\n  { \"type\": \"symbol\", \"value\": \"\u003c\" },\n  { \"type\": \"keyword\", \"value\": \"f32\" },\n  { \"type\": \"symbol\", \"value\": \"\u003e\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"symbol\", \"value\": \"{\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"keyword\", \"value\": \"return\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"keyword\", \"value\": \"vec4\" },\n  { \"type\": \"symbol\", \"value\": \"(\" },\n  { \"type\": \"int\", \"value\": \"0\" },\n  { \"type\": \"symbol\", \"value\": \",\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"int\", \"value\": \"0\" },\n  { \"type\": \"symbol\", \"value\": \",\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"int\", \"value\": \"0\" },\n  { \"type\": \"symbol\", \"value\": \",\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"int\", \"value\": \"1\" },\n  { \"type\": \"symbol\", \"value\": \")\" },\n  { \"type\": \"symbol\", \"value\": \";\" },\n  { \"type\": \"whitespace\", \"value\": \" \" },\n  { \"type\": \"symbol\", \"value\": \"}\" }\n]\n```\n\n\u003c/details\u003e\n\nThe following are the supported token types and their descriptions:\n\n| Type       | Description                                                               |\n| ---------- | ------------------------------------------------------------------------- |\n| whitespace | A sequence of one or more whitespace characters.                          |\n| comment    | A single-line or multi-line comment.                                      |\n| symbol     | A symbol, such as an operator or punctuation mark.                        |\n| bool       | A boolean value, either true or false.                                    |\n| float      | A floating-point number, represented by a sequence of digits and symbols. |\n| int        | An integer number, represented by a sequence of digits.                   |\n| identifier | A user-defined identifier, such as a variable name or function name.      |\n| keyword    | A keyword reserved by the language, such as if, else, for, etc.           |\n\n## Minify\n\nMinifies a string of GLSL or WGSL code, returning a minified version of the input code.\n\n```ts\nconst minified: string = minify(code: string, {\n  /** Whether to rename variables. Will call a MangleMatcher if specified. Default is `false`. */\n  mangle: boolean | ((token: Token, index: number, tokens: Token[]) =\u003e boolean)\n  /** A map to read and write renamed variables to when mangling. */\n  mangleMap: Map\u003cstring, string\u003e\n  /** Whether to rename external variables such as uniforms or varyings. Default is `false`. */\n  mangleExternals: boolean\n})\n```\n\nTo shared mangled interfaces when using `mangleExternal`, declare and re-use a `mangleMap` between shaders:\n\n```ts\nconst options = { mangle: true, mangleExternals: true, mangleMap: new Map() }\n\n// #version 300 es\\nin vec2 a;out vec2 b;void main(){b=a;}\nminify(`#version 300 es\\nin vec2 sstt;out vec2 c;void main(){c=sstt;}`, options)\n\n// #version 300 es\\nin vec2 b;out vec4 a[gl_MaxDrawBuffers];void main(){a[0]=b.sstt;}\nminify(`#version 300 es\\nin vec2 c;out vec4 data[gl_MaxDrawBuffers];void main(){data[0]=c.sstt;}`, options)\n```\n\n## Parse\n\nParses a string of GLSL (WGSL is WIP) code into an [AST](#ast).\n\n```ts\nconst ast: Program = parse(code: string)\n```\n\n## Generate\n\nGenerates a string of GLSL (WGSL is WIP) code from an [AST](#ast).\n\n```ts\nconst code: string = generate(program: Program, {\n  target: 'GLSL' // | 'WGSL'\n})\n```\n\n## Visit\n\nRecurses through an [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree), calling a visitor object on matching nodes.\n\n```ts\nvisit(\n  program: Program,\n  visitors: {\n    Program: {\n      enter(node, ancestors) {\n        // Called before any descendant nodes are processed\n      },\n      exit(node, ancestors) {\n        // Called after all nodes are processed\n      }\n    },\n    Identifier(node, ancestors) {\n      // Called before any descendant nodes are processed (alias to enter)\n    }\n  } satisfies Visitors\n)\n```\n\n## AST\n\nAn [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) loosely based on [ESTree](https://github.com/estree/estree) for GLSL and WGSL grammars.\n\n### Node Objects\n\nAST nodes extend `Node` objects which implement the following abstract interface:\n\n```ts\ninterface Node {\n  type: string\n}\n```\n\nThe `type` field is a string representing the AST variant type which can determine the interface a node implements.\n\n### Identifier\n\nA variable identifier.\n\n```ts\ninterface Identifier extends Node {\n  type: 'Identifier'\n  name: string\n}\n```\n\n### Literal\n\nA shader literal representing a `bool`, `float`, `int`, or `uint` type.\n\n```ts\ninterface Literal extends Node {\n  type: 'Literal'\n  value: string\n}\n```\n\n### ArraySpecifier\n\nAn array and its dimensions.\n\n```ts\ninterface ArraySpecifier extends Node {\n  type: 'ArraySpecifier'\n  typeSpecifier: Identifier\n  dimensions: (Literal | Identifier | null)[]\n}\n```\n\n### Program\n\nRepresents the root of an AST.\n\n```ts\ninterface Program extends Node {\n  type: 'Program'\n  body: Statement[]\n}\n```\n\n### ExpressionStatement\n\nAn expression as a standalone statement.\n\n```ts\ninterface ExpressionStatement extends Node {\n  type: 'ExpressionStatement'\n  expression: Expression\n}\n```\n\n### BlockStatement\n\nA block statement.\n\n```ts\ninterface BlockStatement extends Node {\n  type: 'BlockStatement'\n  body: Statement[]\n}\n```\n\n### DiscardStatement\n\nA discard statement in fragment shaders.\n\n```ts\ninterface DiscardStatement extends Node {\n  type: 'DiscardStatement'\n}\n```\n\n### PreprocessorStatement\n\nA GLSL preprocessor statement with an optional value.\n\n```ts\ninterface PreprocessorStatement extends Node {\n  type: 'PreprocessorStatement'\n  name: string\n  value: Expression[] | null\n}\n```\n\n### PrecisionQualifierStatement\n\nA GLSL precision qualifier statement.\n\n```ts\ninterface PrecisionQualifierStatement extends Node {\n  type: 'PrecisionQualifierStatement'\n  precision: PrecisionQualifier\n  typeSpecifier: Identifier\n}\n```\n\n### InvariantQualifierStatement\n\nA GLSL invariant qualifier statement.\n\n```ts\ninterface InvariantQualifierStatement extends Node {\n  type: 'InvariantQualifierStatement'\n  typeSpecifier: Identifier\n}\n```\n\n### LayoutQualifierStatement\n\nA layout qualifier statement.\n\n```ts\ninterface LayoutQualifierStatement extends Node {\n  type: 'LayoutQualifierStatement'\n  layout: Record\u003cstring, string | boolean\u003e\n  qualifier: StorageQualifier\n}\n```\n\n### ReturnStatement\n\nA return statement with an optional argument.\n\n```ts\ninterface ReturnStatement extends Node {\n  type: 'ReturnStatement'\n  argument: Expression | null\n}\n```\n\n### BreakStatement\n\nA break statement.\n\n```ts\ninterface BreakStatement extends Node {\n  type: 'BreakStatement'\n}\n```\n\n### ContinueStatement\n\nA continue statement.\n\n```ts\ninterface ContinueStatement extends Node {\n  type: 'ContinueStatement'\n}\n```\n\n### IfStatement\n\nAn if-else statement.\n\n```ts\ninterface IfStatement extends Node {\n  type: 'IfStatement'\n  test: Expression\n  consequent: Statement\n  alternate: Statement | null\n}\n```\n\n### SwitchStatement\n\nA switch statement.\n\n```ts\ninterface SwitchStatement extends Node {\n  type: 'SwitchStatement'\n  discriminant: Expression\n  cases: SwitchCase[]\n}\n```\n\n#### SwitchCase\n\nA switch-case statement. `test` is null for a `default` case.\n\n```ts\ninterface SwitchCase extends Node {\n  type: 'SwitchCase'\n  test: Expression | null\n  consequent: Statement[]\n}\n```\n\n### WhileStatement\n\nA while statement.\n\n```ts\ninterface WhileStatement extends Node {\n  type: 'WhileStatement'\n  test: Expression\n  body: Statement\n}\n```\n\n### DoWhileStatement\n\nA do-while statement.\n\n```ts\ninterface DoWhileStatement extends Node {\n  type: 'DoWhileStatement'\n  body: Statement\n  test: Expression\n}\n```\n\n### ForStatement\n\nA for statement.\n\n```ts\ninterface ForStatement extends Node {\n  type: 'ForStatement'\n  init: VariableDeclaration | Expression | null\n  test: Expression | null\n  update: Expression | null\n  body: Statement\n}\n```\n\n### FunctionDeclaration\n\nA function declaration. `body` is null for overloads.\n\n```ts\ninterface FunctionDeclaration extends Node {\n  type: 'FunctionDeclaration'\n  id: Identifier\n  qualifiers: PrecisionQualifier[]\n  typeSpecifier: Identifier | ArraySpecifier\n  params: FunctionParameter[]\n  body: BlockStatement | null\n}\n```\n\n#### FunctionParameter\n\nA function parameter within a function declaration.\n\n```ts\ninterface FunctionParameter extends Node {\n  type: 'FunctionParameter'\n  id: Identifier | null\n  qualifiers: (ConstantQualifier | ParameterQualifier | PrecisionQualifier)[]\n  typeSpecifier: Identifier | ArraySpecifier\n}\n```\n\n### VariableDeclaration\n\nA variable declaration.\n\n```ts\ninterface VariableDeclaration extends Node {\n  type: 'VariableDeclaration'\n  declarations: VariableDeclarator[]\n}\n```\n\n#### VariableDeclarator\n\nA variable declarator within a variable declaration.\n\n```ts\ninterface VariableDeclarator extends Node {\n  type: 'VariableDeclarator'\n  id: Identifier\n  qualifiers: (ConstantQualifier | InterpolationQualifier | StorageQualifier | PrecisionQualifier)[]\n  typeSpecifier: Identifier | ArraySpecifier\n  layout: Record\u003cstring, string | boolean\u003e | null\n  init: Expression | null\n}\n```\n\n### StructuredBufferDeclaration\n\nA buffer interface declaration with optional layout and qualifiers.\n\n```ts\ninterface StructuredBufferDeclaration extends Node {\n  type: 'StructuredBufferDeclaration'\n  id: Identifier | null\n  qualifiers: (InterfaceStorageQualifier | MemoryQualifier | LayoutQualifier)[]\n  typeSpecifier: Identifier | ArraySpecifier\n  layout: Record\u003cstring, string | boolean\u003e | null\n  members: VariableDeclaration[]\n}\n```\n\n### StructDeclaration\n\nA struct declaration. Can be used as a type or constructor.\n\n```ts\ninterface StructDeclaration extends Node {\n  type: 'StructDeclaration'\n  id: Identifier\n  members: VariableDeclaration[]\n}\n```\n\n### ArrayExpression\n\nAn array initialization expression.\n\n```ts\ninterface ArrayExpression extends Node {\n  type: 'ArrayExpression'\n  typeSpecifier: ArraySpecifier\n  elements: Expression[]\n}\n```\n\n### UnaryExpression\n\nA unary expression with a left or right handed operator.\n\n```ts\ninterface UnaryExpression extends Node {\n  type: 'UnaryExpression'\n  operator: UnaryOperator\n  prefix: boolean\n  argument: Expression\n}\n```\n\n#### UnaryOperator\n\n```ts\ntype UnaryOperator = '-' | '+' | '!' | '~'\n```\n\n### UpdateExpression\n\nAn update expression with an optionally prefixed operator.\n\n```ts\ninterface UpdateExpression extends Node {\n  type: 'UpdateExpression'\n  operator: UpdateOperator\n  argument: Expression\n  prefix: boolean\n}\n```\n\n#### UpdateOperator\n\n```ts\ntype UpdateOperator = '++' | '--'\n```\n\n### BinaryExpression\n\nA binary expression with a left and right operand.\n\n```ts\ninterface BinaryExpression extends Node {\n  type: 'BinaryExpression'\n  operator: BinaryOperator\n  left: Expression\n  right: Expression\n}\n```\n\n#### BinaryOperator\n\n```ts\ntype BinaryOperator =\n  | '=='\n  | '!='\n  | '\u003c'\n  | '\u003c='\n  | '\u003e'\n  | '\u003e='\n  | '\u003c\u003c'\n  | '\u003e\u003e'\n  | '+'\n  | '-'\n  | '*'\n  | '/'\n  | '%'\n  | '|'\n  | '^'\n  | '\u0026'\n```\n\n### AssignmentExpression\n\nAn assignment expression.\n\n```ts\ninterface AssignmentExpression extends Node {\n  type: 'AssignmentExpression'\n  operator: AssignmentOperator\n  left: Expression\n  right: Expression\n}\n```\n\n#### AssignmentOperator\n\n```ts\ntype AssignmentOperator = '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '\u003c\u003c=' | '\u003e\u003e=' | '\u003e\u003e\u003e=' | '|=' | '^=' | '\u0026='\n```\n\n### LogicalExpression\n\nA logical operation between two expressions.\n\n```ts\ninterface LogicalExpression extends Node {\n  type: 'LogicalExpression'\n  operator: LogicalOperator\n  left: Expression\n  right: Expression\n}\n```\n\n#### LogicalOperator\n\n```ts\ntype LogicalOperator = '||' | '\u0026\u0026' | '^^'\n```\n\n### MemberExpression\n\nA member expression.\n\n```ts\ninterface MemberExpression extends Node {\n  type: 'MemberExpression'\n  object: Expression\n  property: Expression\n  computed: boolean\n}\n```\n\n### ConditionalExpression\n\nA conditional expression or ternary.\n\n```ts\ninterface ConditionalExpression extends Node {\n  type: 'ConditionalExpression'\n  test: Expression\n  alternate: Expression\n  consequent: Expression\n}\n```\n\n### CallExpression\n\nA function call expression or struct initialization.\n\n```ts\ninterface CallExpression extends Node {\n  type: 'CallExpression'\n  callee: Expression\n  arguments: Expression[]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodyjasonbennett%2Fshaderkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodyjasonbennett%2Fshaderkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodyjasonbennett%2Fshaderkit/lists"}