@bikky/compiler 0.0.7 → 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 (52) hide show
  1. package/Libraries/BiscuitLibraries.d.ts +2 -2
  2. package/Libraries/BiscuitLibraries.js +2 -2
  3. package/Libraries/GlobalTypes.d.ts +25 -27
  4. package/Libraries/MixinCode.d.ts +13 -13
  5. package/Libraries/MixinCode.js +92 -92
  6. package/Source/ASTBuilder.d.ts +36 -0
  7. package/Source/ASTBuilder.d.ts.map +1 -0
  8. package/Source/ASTBuilder.js +180 -0
  9. package/Source/ASTHelper.d.ts +67 -73
  10. package/Source/ASTHelper.d.ts.map +1 -1
  11. package/Source/ASTHelper.js +320 -343
  12. package/Source/ASTInterface/Class.d.ts +38 -0
  13. package/Source/ASTInterface/Class.d.ts.map +1 -0
  14. package/Source/ASTInterface/Class.js +256 -0
  15. package/Source/ASTInterface/Crawler.d.ts +8 -0
  16. package/Source/ASTInterface/Crawler.d.ts.map +1 -0
  17. package/Source/ASTInterface/Crawler.js +55 -0
  18. package/Source/ASTInterface/Tokens.d.ts +78 -0
  19. package/Source/ASTInterface/Tokens.d.ts.map +1 -0
  20. package/Source/ASTInterface/Tokens.js +49 -0
  21. package/Source/ASTSearcher.d.ts +20 -0
  22. package/Source/ASTSearcher.d.ts.map +1 -0
  23. package/Source/ASTSearcher.js +116 -0
  24. package/Source/ASTTraverser.d.ts +10 -0
  25. package/Source/ASTTraverser.d.ts.map +1 -0
  26. package/Source/ASTTraverser.js +74 -0
  27. package/Transformers/CompilerInsertions.js +23 -22
  28. package/Transformers/MacroTransformer.d.ts +2 -2
  29. package/Transformers/MacroTransformer.d.ts.map +1 -1
  30. package/Transformers/MacroTransformer.js +282 -272
  31. package/Transformers/MixinTransformer.d.ts +2 -3
  32. package/Transformers/MixinTransformer.d.ts.map +1 -1
  33. package/Transformers/MixinTransformer.js +320 -123
  34. package/Transformers/{Macros.d.ts → SuperTransformer.d.ts} +3 -3
  35. package/Transformers/SuperTransformer.d.ts.map +1 -0
  36. package/Transformers/{SuperTransform.js → SuperTransformer.js} +139 -117
  37. package/bin/Microsoft.NodejsTools.WebRole.dll +0 -0
  38. package/obj/Debug/BiscuitCompiler.njsproj.AssemblyReference.cache +0 -0
  39. package/obj/Debug/BiscuitCompiler.njsproj.FileListAbsolute.txt +3 -3
  40. package/package.json +6 -5
  41. package/tsconfig.build.libs.json +1 -1
  42. package/tsconfig.build.libs.tsbuildinfo +1 -1
  43. package/tsconfig.build.src.json +1 -1
  44. package/tsconfig.build.src.tsbuildinfo +1 -1
  45. package/tsconfig.json +10 -11
  46. package/tsconfig.tsbuildinfo +1 -1
  47. package/ASTHelper.d.ts +0 -74
  48. package/ASTHelper.d.ts.map +0 -1
  49. package/Transformers/Macros.d.ts.map +0 -1
  50. package/Transformers/SuperTransform.d.ts +0 -3
  51. package/Transformers/SuperTransform.d.ts.map +0 -1
  52. package/tsconfig.build.tsbuildinfo +0 -1
@@ -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
@@ -1,23 +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
- // program.getCompilerOptions(),
19
- // host,
20
- // /* oldProgram */ program
21
- // );
22
- // }
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
+ // }
23
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;AAsSjC,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,aAC7C,GAAG,qBAAqB,kBAEpB,GAAG,UAAU,mBAIlC"}
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"}