Minor linter fixes

This commit is contained in:
pyoor 2018-05-21 11:34:53 -04:00
parent 0e292b817c
commit cf910de0f6
3 changed files with 13 additions and 9 deletions

View file

@ -59,16 +59,20 @@ class webgl extends make {
static match (shader, regex, group = 1) {
let matches = []
let match
while (match = regex.exec(shader)) {
while (true) {
let match = regex.exec(shader)
if (match) {
matches.push(match[group])
} else {
break
}
}
return matches
}
static parseUniforms (shader, group = 1) {
/* Todo: Parse their individual data types into categories. */
return webgl.match(shader, /uniform .+? (\w+)(?=[\[;])/gm, group)
return webgl.match(shader, /uniform .+? (\w+)(?=[\[;])/gm, group) /* eslint-disable-line no-useless-escape */
}
static parseAttributes (shader, group = 1) {
@ -86,7 +90,7 @@ class webgl extends make {
static parseFragDatav3 (shader, group = 1) {
// #version 300
return webgl.match(shader, /out .+? (\w+)(?=[\[;])/gm, group)
return webgl.match(shader, /out .+? (\w+)(?=[\[;])/gm, group) /* eslint-disable-line no-useless-escape */
}
static parseFrag (shader, group = 1) {