@bikky/compiler 0.0.8 → 0.0.9

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.
Files changed (44) hide show
  1. package/Libraries/BiscuitLibraries.d.ts +2 -2
  2. package/Libraries/BiscuitLibraries.js +2 -2
  3. package/Libraries/MixinCode.d.ts +13 -13
  4. package/Libraries/MixinCode.js +92 -92
  5. package/Source/ASTBuilder.d.ts +36 -0
  6. package/Source/ASTBuilder.d.ts.map +1 -0
  7. package/Source/ASTBuilder.js +180 -0
  8. package/Source/ASTHelper.d.ts +67 -73
  9. package/Source/ASTHelper.d.ts.map +1 -1
  10. package/Source/ASTHelper.js +320 -343
  11. package/Source/ASTInterface/Class.d.ts +38 -0
  12. package/Source/ASTInterface/Class.d.ts.map +1 -0
  13. package/Source/ASTInterface/Class.js +256 -0
  14. package/Source/ASTInterface/Crawler.d.ts +8 -0
  15. package/Source/ASTInterface/Crawler.d.ts.map +1 -0
  16. package/Source/ASTInterface/Crawler.js +55 -0
  17. package/Source/ASTInterface/Tokens.d.ts +78 -0
  18. package/Source/ASTInterface/Tokens.d.ts.map +1 -0
  19. package/Source/ASTInterface/Tokens.js +49 -0
  20. package/Source/ASTSearcher.d.ts +20 -0
  21. package/Source/ASTSearcher.d.ts.map +1 -0
  22. package/Source/ASTSearcher.js +116 -0
  23. package/Source/ASTTraverser.d.ts +10 -0
  24. package/Source/ASTTraverser.d.ts.map +1 -0
  25. package/Source/ASTTraverser.js +74 -0
  26. package/Source/TSPatchTypes.d.ts +17 -0
  27. package/Transformers/CompilerInsertions.js +23 -23
  28. package/Transformers/MacroTransformer.d.ts +2 -2
  29. package/Transformers/MacroTransformer.d.ts.map +1 -1
  30. package/Transformers/MacroTransformer.js +282 -281
  31. package/Transformers/MixinTransformer.d.ts +2 -3
  32. package/Transformers/MixinTransformer.d.ts.map +1 -1
  33. package/Transformers/MixinTransformer.js +320 -124
  34. package/Transformers/SuperTransformer.d.ts +2 -2
  35. package/Transformers/SuperTransformer.d.ts.map +1 -1
  36. package/Transformers/SuperTransformer.js +138 -117
  37. package/obj/Debug/BiscuitCompiler.njsproj.AssemblyReference.cache +0 -0
  38. package/package.json +6 -5
  39. package/tsconfig.build.libs.json +1 -1
  40. package/tsconfig.build.libs.tsbuildinfo +1 -1
  41. package/tsconfig.build.src.json +1 -1
  42. package/tsconfig.build.src.tsbuildinfo +1 -1
  43. package/tsconfig.json +10 -11
  44. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NEXT = exports.REPLACE = exports.ITER_EXPRESSIONS = exports.ITER_BLOCKS = exports.ITER_PROPERTIES = exports.SKIP = exports.EXIT = exports.ENTER = void 0;
4
+ const ts = require("typescript");
5
+ function ENTER(node) {
6
+ return function* () {
7
+ yield;
8
+ };
9
+ }
10
+ exports.ENTER = ENTER;
11
+ function EXIT() {
12
+ }
13
+ exports.EXIT = EXIT;
14
+ function SKIP() {
15
+ }
16
+ exports.SKIP = SKIP;
17
+ function ITER_PROPERTIES() {
18
+ }
19
+ exports.ITER_PROPERTIES = ITER_PROPERTIES;
20
+ function ITER_BLOCKS() {
21
+ }
22
+ exports.ITER_BLOCKS = ITER_BLOCKS;
23
+ function ITER_EXPRESSIONS() {
24
+ }
25
+ exports.ITER_EXPRESSIONS = ITER_EXPRESSIONS;
26
+ function REPLACE() {
27
+ }
28
+ exports.REPLACE = REPLACE;
29
+ function NEXT() {
30
+ }
31
+ exports.NEXT = NEXT;
32
+ var Handlers;
33
+ (function (Handlers) {
34
+ function crawlFunction(node, crawls) {
35
+ var _a, _b, _c, _d, _e, _f;
36
+ if (ts.isArrowFunction(node)) {
37
+ (_a = crawls.function) === null || _a === void 0 ? void 0 : _a.call(crawls, node);
38
+ (_b = crawls.functionArrow) === null || _b === void 0 ? void 0 : _b.call(crawls, node);
39
+ return true;
40
+ }
41
+ if (ts.isFunctionDeclaration(node)) {
42
+ (_c = crawls.function) === null || _c === void 0 ? void 0 : _c.call(crawls, node);
43
+ (_d = crawls.functionDeclaration) === null || _d === void 0 ? void 0 : _d.call(crawls, node);
44
+ return true;
45
+ }
46
+ if (ts.isFunctionExpression(node)) {
47
+ (_e = crawls.function) === null || _e === void 0 ? void 0 : _e.call(crawls, node);
48
+ (_f = crawls.functionExpression) === null || _f === void 0 ? void 0 : _f.call(crawls, node);
49
+ return true;
50
+ }
51
+ return false;
52
+ }
53
+ Handlers.crawlFunction = crawlFunction;
54
+ function crawlClass(node, crawls) {
55
+ var _a;
56
+ if (ts.isClassDeclaration(node)) {
57
+ (_a = crawls.class) === null || _a === void 0 ? void 0 : _a.call(crawls, node);
58
+ return true;
59
+ }
60
+ return false;
61
+ }
62
+ Handlers.crawlClass = crawlClass;
63
+ // export async function crawlNode(node: ts.Node, crawls: Handlers, context: ts.TransformationContext) {
64
+ //
65
+ // async function crawler(node: ts.Node): Promise<ts.Node> {
66
+ // if ("next" in crawls) await crawls.next!(node);
67
+ //
68
+ // return ts.visitEachChild(node, crawler, context);
69
+ // }
70
+ //
71
+ // crawler(node);
72
+ // }
73
+ })(Handlers || (Handlers = {}));
74
+ //# sourceMappingURL=ASTTraverser.js.map
@@ -0,0 +1,17 @@
1
+ import * as ts from "typescript";
2
+ import { ProgramTransformerExtras, PluginConfig } from 'ts-patch';
3
+
4
+
5
+ type ProgramPatchableTS = typeof ts & {
6
+ createProgram(rootNames: string[], compilerOptions: PluginConfig, host: ts.CompilerHost | undefined, oldProgram: ts.Program): ts.Program;
7
+ }
8
+
9
+
10
+
11
+ type ProgramTransformer = (program: ts.Program, host: ts.CompilerHost | undefined, options: PluginConfig, pte: ProgramTransformerExtras) => ts.Program;
12
+
13
+
14
+ type SourceTransformer = (program: ts.Program, pluginOptions: {}) =>
15
+ (context: ts.TransformationContext) =>
16
+ (sourceFile: ts.SourceFile) => ts.SourceFile;
17
+
@@ -1,24 +1,24 @@
1
- "use strict";
2
- // /**
3
- // * Adds BikkyCompiler type files and supporting code into the program at compile-time.
4
- // */
5
- //
6
- // import * as ts from 'typescript';
7
- // import * as path from 'path';
8
- // import { ProgramTransformerExtras, PluginConfig } from 'ts-patch';
9
- // import {ProgramPatchableTS} from "../Source/TSPatchTypes.js";
10
- //
11
- // export const newFile = path.resolve(__dirname, '../Libraries/GlobalTypes.d.ts');
12
- //
13
- //
14
- // export default function (program: ts.Program, host: ts.CompilerHost | undefined, options: PluginConfig, pte: ProgramTransformerExtras) {
15
- // const tsInstance : ProgramPatchableTS = pte.ts;
16
- // return tsInstance.createProgram(
17
- // // /* rootNames */ [newFile, ...program.getRootFileNames()],
18
- // /* rootNames */ [...program.getRootFileNames()],
19
- // program.getCompilerOptions(),
20
- // host,
21
- // /* oldProgram */ program
22
- // );
23
- // }
1
+ "use strict";
2
+ // /**
3
+ // * Adds BikkyCompiler type files and supporting code into the program at compile-time.
4
+ // */
5
+ //
6
+ // import * as ts from 'typescript';
7
+ // import * as path from 'path';
8
+ // import { ProgramTransformerExtras, PluginConfig } from 'ts-patch';
9
+ // import {ProgramPatchableTS} from "../Source/TSPatchTypes.js";
10
+ //
11
+ // export const newFile = path.resolve(__dirname, '../Libraries/GlobalTypes.d.ts');
12
+ //
13
+ //
14
+ // export default function (program: ts.Program, host: ts.CompilerHost | undefined, options: PluginConfig, pte: ProgramTransformerExtras) {
15
+ // const tsInstance : ProgramPatchableTS = pte.ts;
16
+ // return tsInstance.createProgram(
17
+ // // /* rootNames */ [newFile, ...program.getRootFileNames()],
18
+ // /* rootNames */ [...program.getRootFileNames()],
19
+ // program.getCompilerOptions(),
20
+ // host,
21
+ // /* oldProgram */ program
22
+ // );
23
+ // }
24
24
  //# sourceMappingURL=CompilerInsertions.js.map
@@ -1,3 +1,3 @@
1
- import * as ts from "typescript";
2
- export default function (program: ts.Program, pluginOptions: {}): (context: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile;
1
+ import * as ts from "typescript";
2
+ export default function (program: ts.Program, pluginOptions: {}): (context: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.Node;
3
3
  //# sourceMappingURL=MacroTransformer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MacroTransformer.d.ts","sourceRoot":"","sources":["MacroTransformer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAwSjC,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,aAC7C,GAAG,qBAAqB,kBAEpB,GAAG,UAAU,mBAYlC"}
1
+ {"version":3,"file":"MacroTransformer.d.ts","sourceRoot":"","sources":["MacroTransformer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAySjC,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,aAC7C,GAAG,qBAAqB,kBAEpB,GAAG,UAAU,aAYlC"}