Skip to content

Commit

Permalink
Remove array-flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Jan 30, 2023
1 parent cb0eb0a commit 78d96f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
9 changes: 4 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import builtins from './builtins.js'
import types from './types.js'
import operators from './operators.js'
import stdlib from './stdlib.js'
import flatten from 'array-flatten'
import Descriptor from './descriptor.js'
import prepr from 'prepr'

Expand Down Expand Up @@ -315,7 +314,7 @@ GLSL.prototype.transforms = {
var argTypes = []

//arg names
var argsList = flatten(args.map(function (arg) {
var argsList = args.map(function (arg) {
if (arg.type !== 'decl') throw Error('Struct statements should be declarations.')

var decllist = arg.children[arg.children.length - 1]
Expand All @@ -333,15 +332,15 @@ GLSL.prototype.transforms = {

throw Error('Struct statement contains something strange.')
})
}))
}).flat()

var argTypes = flatten(args.map(function (arg) {
var argTypes = args.map(function (arg) {
var type = arg.children[4].token.data
var decllist = arg.children[arg.children.length - 1]
return decllist.children.map(function () {
return type
})
}))
}).flat()

var struct = function struct () {
var args = arguments
Expand Down
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"main": "index.js",
"type": "module",
"dependencies": {
"array-flatten": "^2.0.0",
"glsl-parser": "^2.0.1",
"glsl-tokenizer": "^2.1.5",
"inherits": "^2.0.1",
Expand Down

0 comments on commit 78d96f5

Please sign in to comment.