shaderkit 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/tokenizer.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -894,7 +894,7 @@ function tokenize(code, index = 0) {
|
|
|
894
894
|
tokens.push({ type: "float", value });
|
|
895
895
|
else
|
|
896
896
|
tokens.push({ type: "int", value });
|
|
897
|
-
} else if (
|
|
897
|
+
} else if (isIdent(char)) {
|
|
898
898
|
while (isIdent(code.charCodeAt(index)))
|
|
899
899
|
value += code[index++];
|
|
900
900
|
if (isBool(value))
|
package/dist/index.mjs
CHANGED
|
@@ -892,7 +892,7 @@ function tokenize(code, index = 0) {
|
|
|
892
892
|
tokens.push({ type: "float", value });
|
|
893
893
|
else
|
|
894
894
|
tokens.push({ type: "int", value });
|
|
895
|
-
} else if (
|
|
895
|
+
} else if (isIdent(char)) {
|
|
896
896
|
while (isIdent(code.charCodeAt(index)))
|
|
897
897
|
value += code[index++];
|
|
898
898
|
if (isBool(value))
|
package/package.json
CHANGED
package/src/tokenizer.ts
CHANGED
|
@@ -57,7 +57,7 @@ export function tokenize(code: string, index: number = 0): Token[] {
|
|
|
57
57
|
while (isNumber(code.charCodeAt(index))) value += code[index++]
|
|
58
58
|
if (isFloat(value)) tokens.push({ type: 'float', value })
|
|
59
59
|
else tokens.push({ type: 'int', value })
|
|
60
|
-
} else if (
|
|
60
|
+
} else if (isIdent(char)) {
|
|
61
61
|
while (isIdent(code.charCodeAt(index))) value += code[index++]
|
|
62
62
|
if (isBool(value)) tokens.push({ type: 'bool', value })
|
|
63
63
|
else if (KEYWORDS.includes(isMacro(prev) ? String.fromCharCode(prev) + value : value))
|