@tilua/compiler 7.0.0 → 7.0.1

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/README.md CHANGED
@@ -430,6 +430,17 @@ How a file is loaded depends on the Lua (see [Lua and Luau](#lua-and-luau)):
430
430
  Either way the files have to stay where they were written, relative to the
431
431
  entry's.
432
432
 
433
+ <!-- compatibility:start -->
434
+ ## Compatibility
435
+
436
+ `@tilua/compiler@7.0.1` works with these tilua packages. *Released with* is the
437
+ version it was built and tested against.
438
+
439
+ | Package | Range | Released with | |
440
+ | --- | --- | --- | --- |
441
+ | `@tilua/parser` | `^7.0.0` | 7.0.0 | dependency |
442
+ <!-- compatibility:end -->
443
+
433
444
  ## Development
434
445
 
435
446
  ```bash
@@ -2570,6 +2570,7 @@ function usesVararg(node) {
2570
2570
  return Object.values(record).some(usesVararg);
2571
2571
  }
2572
2572
  function calleePath(path) {
2573
+ if (!/^[A-Za-z_]\w*(\.[A-Za-z_]\w*)*$/.test(path)) return parseExpressionFromSource(path);
2573
2574
  const [head, ...rest] = path.split(".");
2574
2575
  return rest.reduce((value, name) => member(value, name), identifier(head));
2575
2576
  }
package/dist/cli.cjs CHANGED
@@ -2587,6 +2587,7 @@ function usesVararg(node) {
2587
2587
  return Object.values(record).some(usesVararg);
2588
2588
  }
2589
2589
  function calleePath(path) {
2590
+ if (!/^[A-Za-z_]\w*(\.[A-Za-z_]\w*)*$/.test(path)) return (0, import_luau_parser.parseExpressionFromSource)(path);
2590
2591
  const [head, ...rest] = path.split(".");
2591
2592
  return rest.reduce((value, name) => member(value, name), identifier(head));
2592
2593
  }
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  bundle,
4
4
  resolveConfig
5
- } from "./chunk-NM3EVX2J.js";
5
+ } from "./chunk-WGXXYKEU.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import { mkdirSync, writeFileSync } from "fs";
package/dist/index.cjs CHANGED
@@ -2610,6 +2610,7 @@ function usesVararg(node) {
2610
2610
  return Object.values(record).some(usesVararg);
2611
2611
  }
2612
2612
  function calleePath(path) {
2613
+ if (!/^[A-Za-z_]\w*(\.[A-Za-z_]\w*)*$/.test(path)) return (0, import_luau_parser.parseExpressionFromSource)(path);
2613
2614
  const [head, ...rest] = path.split(".");
2614
2615
  return rest.reduce((value, name) => member(value, name), identifier(head));
2615
2616
  }
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  lower,
5
5
  program,
6
6
  resolveConfig
7
- } from "./chunk-NM3EVX2J.js";
7
+ } from "./chunk-WGXXYKEU.js";
8
8
 
9
9
  // src/compile.ts
10
10
  import { readFileSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tilua/compiler",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Compiles tilua to Luau: lowers the @tilua/parser AST to a luau-parser AST and prints it",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",