release: WRNexusJS 0.6.0

This commit is contained in:
2026-08-01 01:09:58 +05:30
parent 3e565e8d03
commit 687d345882
502 changed files with 33038 additions and 11358 deletions
+10
View File
@@ -19,6 +19,7 @@ export type TokenType =
| "eq"
| "colon"
| "comma"
| "question"
| "eof";
export interface Token {
@@ -87,6 +88,9 @@ export class Lexer {
case ",":
this.pos++;
return { type: "comma", value: c, pos };
case "?":
this.pos++;
return { type: "question", value: c, pos };
case '"':
case "'":
return this.readString(c, pos);
@@ -243,6 +247,7 @@ export class Lexer {
this.pos++;
continue;
}
if (c === "}" && angle === 0 && square === 0 && brace === 0 && paren === 0) break;
if (c === "<") angle++;
else if (c === ">" && angle > 0) angle--;
else if (c === "[") square++;
@@ -253,6 +258,11 @@ export class Lexer {
else if (c === ")" && paren > 0) paren--;
if (angle === 0 && square === 0 && brace === 0 && paren === 0) {
if (c === " " || c === "\t") {
let look = this.pos;
while (look < src.length && (src[look] === " " || src[look] === "\t")) look++;
if (/^[A-Za-z_][A-Za-z0-9_]*\??\s*:/.test(src.slice(look))) break;
}
if (c === "=") {
this.pos++;
const type = value.trim();