@glutinum/cli 0.9.0 → 0.11.0
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/Glutinum.Converter/FsharpAST.js +57 -17
- package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
- package/dist/Glutinum.Converter/Generate.js +6 -8
- package/dist/Glutinum.Converter/Generate.js.map +1 -1
- package/dist/Glutinum.Converter/GlueAST.js +100 -23
- package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
- package/dist/Glutinum.Converter/Log.js +5 -5
- package/dist/Glutinum.Converter/Log.js.map +1 -1
- package/dist/Glutinum.Converter/Merge.js +86 -0
- package/dist/Glutinum.Converter/Merge.js.map +1 -0
- package/dist/Glutinum.Converter/Printer.js +153 -73
- package/dist/Glutinum.Converter/Printer.js.map +1 -1
- package/dist/Glutinum.Converter/Read.js +5 -2
- package/dist/Glutinum.Converter/Read.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +1 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js +20 -19
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +4 -3
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +1 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +2 -2
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +5 -6
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +2 -2
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +42 -0
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +1 -1
- package/dist/Glutinum.Converter/Reader/Node.js +9 -6
- package/dist/Glutinum.Converter/Reader/Node.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Parameters.js +7 -4
- package/dist/Glutinum.Converter/Reader/Parameters.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Report.js +35 -0
- package/dist/Glutinum.Converter/Reader/Report.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -0
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js +109 -38
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +31 -26
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +127 -0
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +15 -3
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +6 -9
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Utils.js +11 -14
- package/dist/Glutinum.Converter/Reader/Utils.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +2 -2
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
- package/dist/Glutinum.Converter/Transform.js +483 -217
- package/dist/Glutinum.Converter/Transform.js.map +1 -1
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +735 -0
- package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +1 -0
- package/dist/Glutinum.Converter/Utils/Naming.js +6 -2
- package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
- package/dist/Program.js +2 -2
- package/dist/Program.js.map +1 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +19 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +207 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +127 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +81 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +183 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +37 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +24 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +439 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +217 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +24 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +75 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +26 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +238 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +24 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +190 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +194 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +35 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +51 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +218 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +358 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +331 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +186 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +21 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +644 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +45 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +155 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +23 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +45 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +201 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +65 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +146 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +57 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +19 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +31 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +22 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +172 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +148 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +35 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +151 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +165 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/project_cracked.json +1 -1
- package/package.json +3 -2
- package/src/Glutinum.Converter/js/bootstrap.js +16 -0
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { generateReaderError } from "./Utils.js";
|
|
1
|
+
import { Report_readerError_Z19516DCE } from "./Report.js";
|
|
3
2
|
import { GluePrimitive, GlueType } from "../GlueAST.js";
|
|
4
|
-
import {
|
|
3
|
+
import { readTypeQueryNode } from "./TypeQueryNode.js";
|
|
4
|
+
import { TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name } from "../TypeScript.Extensions.js";
|
|
5
5
|
|
|
6
6
|
export function readTypeOperatorNode(reader, node) {
|
|
7
7
|
const matchValue = node.operator | 0;
|
|
8
8
|
switch (matchValue) {
|
|
9
|
-
case 143:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const declarations = matchValue_1;
|
|
21
|
-
if (declarations.length !== 1) {
|
|
22
|
-
throw new Error(generateReaderError("type operator (keyof)", "Expected exactly one declaration", node));
|
|
9
|
+
case 143: {
|
|
10
|
+
const matchValue_1 = node.type.kind | 0;
|
|
11
|
+
switch (matchValue_1) {
|
|
12
|
+
case 183: {
|
|
13
|
+
const typeReferenceNode = node.type;
|
|
14
|
+
const symbolOpt = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(typeReferenceNode.typeName);
|
|
15
|
+
if (symbolOpt != null) {
|
|
16
|
+
const symbol = symbolOpt;
|
|
17
|
+
const matchValue_2 = symbol.declarations;
|
|
18
|
+
if (matchValue_2 == null) {
|
|
19
|
+
throw new Error(Report_readerError_Z19516DCE("type operator (keyof)", "Missing declarations", node, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeOperatorNode.fs", 48));
|
|
23
20
|
}
|
|
24
21
|
else {
|
|
25
|
-
|
|
22
|
+
const declarations = matchValue_2;
|
|
23
|
+
if (declarations.length !== 1) {
|
|
24
|
+
throw new Error(Report_readerError_Z19516DCE("type operator (keyof)", "Expected exactly one declaration", node, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeOperatorNode.fs", 37));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return new GlueType(9, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declarations[0])]);
|
|
28
|
+
}
|
|
26
29
|
}
|
|
27
30
|
}
|
|
31
|
+
else {
|
|
32
|
+
throw new Error(Report_readerError_Z19516DCE("type operator (keyof)", "Missing symbol", node, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeOperatorNode.fs", 25));
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
else {
|
|
34
|
-
throw new Error(generateReaderError("type operator (keyof)", toText(interpolate("Was expecting a type reference instead got a Node of type %A%P()", [node.type.kind])), node));
|
|
35
|
+
case 186:
|
|
36
|
+
return new GlueType(9, [readTypeQueryNode(reader, node.type)]);
|
|
37
|
+
default:
|
|
38
|
+
throw new Error(Report_readerError_Z19516DCE("type operator (keyof)", `Was expecting a type reference instead got a Node of type ${TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(node.type.kind)}`, node, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeOperatorNode.fs", 62));
|
|
35
39
|
}
|
|
40
|
+
}
|
|
36
41
|
case 148:
|
|
37
|
-
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](node.type);
|
|
42
|
+
return new GlueType(29, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](node.type)]);
|
|
38
43
|
default: {
|
|
39
|
-
const item =
|
|
44
|
+
const item = Report_readerError_Z19516DCE("type operator", `Unsupported operator ${TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(node.operator)}`, node, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeOperatorNode.fs", 73);
|
|
40
45
|
const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
|
|
41
46
|
void (objectArg.push(item));
|
|
42
47
|
return new GlueType(3, [new GluePrimitive(6, [])]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeOperatorNode.fs"],"names":["matchValue","node","typeReferenceNode","symbolOpt","reader","symbol","declarations","item","objectArg"],"mappings":";;;;;;AAYUA,uBAAA,AAAAC;YAAAD;aAAA;
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeOperatorNode.fs"],"names":["matchValue","node","typeReferenceNode","symbolOpt","reader","symbol","declarations","item","objectArg"],"mappings":";;;;;;AAYUA,uBAAA,AAAAC;YAAAD;aAAA;AAEIA,iCAAA,AAAAC;oBAAAD;qBAAA;AAEEE,8CAAoB,AAAAD;AAGpBE,sCACA,AAAAC,8FAAqC,AAAAF;AAEnC,wBAAA,AAAAC;AASCE,uCACGF;AAAAH,6CAAA,AAAAK;AAAA,4BAAA,AAAAL;AAoBC,4CALH,6BACI,yBACA,wBACAC,MAHJ,sHAAA;;;AAdGK,iDAEHN;AAAA,gCAAG,AAAAM,wBAAsB;AAMlB,gDALH,6BACI,yBACA,oCACAL,MAHJ,sHAAA;;;AAQmC,uCAAA,iBAAnC,AAAAG,6EAAgB,AAAAE,aAAa;;;;;AAflC,wCALH,6BACI,yBACA,kBACAL,MAHJ,sHAAA;;;qBAVF;AA4CC,2BAAA,iBADH,kBAAgCG,QAFZ,AAAAH;;AAWjB,oCALH,6BACI,yBACA,6DAA\u002BD,8CAAA,AAAAA,mBAC/DA,MAHJ,sHAAA;;;aAjDF;AAyDmC,mBAAA,kBAArC,AAAAG,iFAAoB,AAAAH;;AAQjBM,yBALH,6BACI,iBACA,wBAA0B,8CAAA,AAAAN,kBAC1BA,MAHJ,sHAAA;AAKGO,8BAAA,AAAAJ;AAAA,kBAAAI,eAAAD;AAEH,mBAAA,iBAAmB","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { $007CHasTypeFlags$007C_$007C } from "./Utils.js";
|
|
2
|
+
import { GlueClassDeclaration, GlueType, GluePrimitive } from "../GlueAST.js";
|
|
3
|
+
import { empty } from "../../fable_modules/fable-library-js.4.14.0/List.js";
|
|
4
|
+
import { Report_readerError_Z19516DCE } from "./Report.js";
|
|
5
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.14.0/Result.js";
|
|
6
|
+
import { TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name } from "../TypeScript.Extensions.js";
|
|
7
|
+
|
|
8
|
+
export function readTypeQueryNode(reader, typeQueryNode) {
|
|
9
|
+
const checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]();
|
|
10
|
+
const typ = checker.getTypeAtLocation(typeQueryNode.exprName);
|
|
11
|
+
const matchValue = typ.flags | 0;
|
|
12
|
+
if ($007CHasTypeFlags$007C_$007C(524288, matchValue) != null) {
|
|
13
|
+
const exprNameKind = typeQueryNode.exprName.kind | 0;
|
|
14
|
+
const matchValue_1 = typ.getSymbol();
|
|
15
|
+
if (matchValue_1 != null) {
|
|
16
|
+
const symbol = matchValue_1;
|
|
17
|
+
const matchValue_5 = symbol.declarations;
|
|
18
|
+
if (matchValue_5 == null) {
|
|
19
|
+
return new GlueType(3, [new GluePrimitive(6, [])]);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const declarations_1 = matchValue_5;
|
|
23
|
+
const declaration_1 = declarations_1[0];
|
|
24
|
+
const matchValue_6 = declaration_1.kind | 0;
|
|
25
|
+
switch (matchValue_6) {
|
|
26
|
+
case 263:
|
|
27
|
+
return new GlueType(12, [new GlueClassDeclaration(symbol.name, empty(), empty(), empty(), empty())]);
|
|
28
|
+
case 267:
|
|
29
|
+
return new GlueType(0, []);
|
|
30
|
+
default:
|
|
31
|
+
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declaration_1);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (exprNameKind === 80) {
|
|
36
|
+
const exprName = typeQueryNode.exprName;
|
|
37
|
+
let _arg_5;
|
|
38
|
+
let input_9;
|
|
39
|
+
const option = checker.getSymbolAtLocation(exprName);
|
|
40
|
+
const error = Report_readerError_Z19516DCE("type node (TypeQuery)", "Missing symbol", typeQueryNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeQueryNode.fs", 32);
|
|
41
|
+
const option_1 = option;
|
|
42
|
+
input_9 = ((option_1 == null) ? (new FSharpResult$2(1, [error])) : (new FSharpResult$2(0, [option_1])));
|
|
43
|
+
if (input_9.tag === 1) {
|
|
44
|
+
_arg_5 = (new FSharpResult$2(1, [input_9.fields[0]]));
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
let input_7;
|
|
48
|
+
const option_2 = input_9.fields[0].declarations;
|
|
49
|
+
const error_2 = Report_readerError_Z19516DCE("type node (TypeQuery)", "Missing declarations", typeQueryNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeQueryNode.fs", 42);
|
|
50
|
+
const option_3 = option_2;
|
|
51
|
+
input_7 = ((option_3 == null) ? (new FSharpResult$2(1, [error_2])) : (new FSharpResult$2(0, [option_3])));
|
|
52
|
+
if (input_7.tag === 1) {
|
|
53
|
+
_arg_5 = (new FSharpResult$2(1, [input_7.fields[0]]));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const declarations = input_7.fields[0];
|
|
57
|
+
const input_5 = (declarations.length !== 1) ? (new FSharpResult$2(1, [Report_readerError_Z19516DCE("type node (TypeQuery)", "Expected exactly one declaration", typeQueryNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeQueryNode.fs", 51)])) : (new FSharpResult$2(0, [declarations[0]]));
|
|
58
|
+
if (input_5.tag === 1) {
|
|
59
|
+
_arg_5 = (new FSharpResult$2(1, [input_5.fields[0]]));
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const declaration = input_5.fields[0];
|
|
63
|
+
let input_3;
|
|
64
|
+
const matchValue_3 = declaration.kind | 0;
|
|
65
|
+
input_3 = ((matchValue_3 === 260) ? (new FSharpResult$2(0, [declaration])) : (new FSharpResult$2(1, [Report_readerError_Z19516DCE("type node (TypeQuery)", `Unsupported declaration kind ${TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(matchValue_3)}`, typeQueryNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeQueryNode.fs", 68)])));
|
|
66
|
+
if (input_3.tag === 1) {
|
|
67
|
+
_arg_5 = (new FSharpResult$2(1, [input_3.fields[0]]));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
let input_1;
|
|
71
|
+
const option_4 = input_3.fields[0].type;
|
|
72
|
+
const error_4 = Report_readerError_Z19516DCE("type node (TypeQuery)", "Missing type", typeQueryNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeQueryNode.fs", 78);
|
|
73
|
+
const option_5 = option_4;
|
|
74
|
+
input_1 = ((option_5 == null) ? (new FSharpResult$2(1, [error_4])) : (new FSharpResult$2(0, [option_5])));
|
|
75
|
+
if (input_1.tag === 1) {
|
|
76
|
+
_arg_5 = (new FSharpResult$2(1, [input_1.fields[0]]));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
const typeNode = input_1.fields[0];
|
|
80
|
+
const matchValue_4 = typeNode.kind | 0;
|
|
81
|
+
if (matchValue_4 === 198) {
|
|
82
|
+
const typeOperatorNode = typeNode;
|
|
83
|
+
_arg_5 = (new FSharpResult$2(0, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeOperatorNodeZ6830FC33"](typeOperatorNode)]));
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
_arg_5 = (new FSharpResult$2(1, [Report_readerError_Z19516DCE("type node (TypeQuery)", `Unsupported declaration kind ${TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(matchValue_4)}`, typeQueryNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeQueryNode.fs", 92)]));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (_arg_5.tag === 1) {
|
|
94
|
+
void (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]().push(_arg_5.fields[0]));
|
|
95
|
+
return new GlueType(0, []);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return _arg_5.fields[0];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const warning_1 = Report_readerError_Z19516DCE("type node (TypeQuery)", "Expected an Identifier", typeQueryNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/TypeQueryNode.fs", 108);
|
|
103
|
+
void (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]().push(warning_1));
|
|
104
|
+
return new GlueType(3, [new GluePrimitive(6, [])]);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else if ($007CHasTypeFlags$007C_$007C(4, matchValue) != null) {
|
|
108
|
+
return new GlueType(3, [new GluePrimitive(0, [])]);
|
|
109
|
+
}
|
|
110
|
+
else if ($007CHasTypeFlags$007C_$007C(8, matchValue) != null) {
|
|
111
|
+
return new GlueType(3, [new GluePrimitive(5, [])]);
|
|
112
|
+
}
|
|
113
|
+
else if ($007CHasTypeFlags$007C_$007C(16, matchValue) != null) {
|
|
114
|
+
return new GlueType(3, [new GluePrimitive(3, [])]);
|
|
115
|
+
}
|
|
116
|
+
else if ($007CHasTypeFlags$007C_$007C(1, matchValue) != null) {
|
|
117
|
+
return new GlueType(3, [new GluePrimitive(6, [])]);
|
|
118
|
+
}
|
|
119
|
+
else if ($007CHasTypeFlags$007C_$007C(16384, matchValue) != null) {
|
|
120
|
+
return new GlueType(3, [new GluePrimitive(4, [])]);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return new GlueType(3, [new GluePrimitive(6, [])]);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
//# sourceMappingURL=TypeQueryNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeQueryNode.fs","../../fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs","../../fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs"],"names":["checker","reader","typ","typeQueryNode","matchValue","exprNameKind","symbol","declarations","declaration","exprName","_arg6","input","option","error","typeNode","typeOperatorNode","warning"],"mappings":";;;;;;;;AAcQA,oBAAU,AAAAC;AACVC,gBAAM,AAAAF,0BAA4B,AAAAG;AAEhCC,uBAAA,AAAAF;AACJ,QADI,AACJ,6BAAa,QADTE;AAGEC,6BAA8B,AAAAF;6BAE5B,AAAAD;AAAA,YAAA;AA8FCI;AAEGF,iCAAA,AAAAE;AAAA,gBAAA,AAAAF;AAoBI,uBAAA,iBAAmB;;;AAnBtBG,uCACCH;AAAAI,sCAAc,AAAAD,eAAc;AAE1BH,qCAAA,AAAAI;wBAAAJ;yBAAA;AASC,\u002BBAAA,kBAPH,yBACW,AAAAE,aACQ,SACL,SACO,SACC;yBAPpB;AAa\u002BB,\u002BBAAA;;AAC9B,\u002BBAAA,AAAAL,6EAAgBO;;;;aAlHzB,IAAA,AAAkBH,iBAAlB;AAGEI,6BAA4B,AAAAN;AA0E7BO;AC9CNC;ADvBcC,2BADH,AAAAZ,4BAA4BS;AACzBI,0BACC,6BACI,yBACA,kBACAV,eAHJ,mHAAA;ACgRoBS,6BDjRrBA;ACkRT,AA3PLD,uBA2PK,CAAA,AAAAC,qBAEI,uBDpRKC,YCmRH,uBAAAD;AA1PN,gBAAA,AAAAD;AAEO,AD0CND,0BC1CM,uBAAA,AAAAC;;;AAJZA;ADbcC,iCADH,ACiBF,AAAAD;ADhBKE,gCACC,6BACI,yBACA,wBACAV,eAHJ,mHAAA;ACsQoBS,iCDvQrBA;ACwQT,AA3PLD,2BA2PK,CAAA,AAAAC,qBAEI,uBD1QKC,cCyQH,uBAAAD;AA1PN,oBAAA,AAAAD;AAEO,AD0CND,8BC1CM,uBAAA,AAAAC;;;ADnBAJ,yCCkBH,AAAAI;AAHTA,oCDJW,CAAG,AAAAJ,wBAAsB,MAOlB,uBANH,6BAEI,yBACA,oCACAJ,eAJJ,mHAAA,UASA,uBAAG,AAAAI,aAAc;ACJ3B,wBAAA,AAAAI;AAEO,AD0CND,kCC1CM,uBAAA,AAAAC;;;ADTAH,4CCQH,AAAAG;AAHTA;ADSiBP,6CAAA,AAAAI;AAAA,ACTjBG,mCDSiB,CAAA,AAAAP,iBAAA,QAEF,uBAAGI,kBAQA,uBALH,6BACI,yBACA,gCAAgC,8CAFpCJ,iBAGID,eAHJ,mHAAA;ACZV,4BAAA,AAAAQ;AAEO,AD0CND,sCC1CM,uBAAA,AAAAC;;;AAJZA;ADuBcC,6CADH,ACnBF,AAAAD;ADoBKE,4CACC,6BACI,yBACA,gBACAV,eAHJ,mHAAA;ACkOoBS,6CDnOrBA;ACoOT,AA3PLD,uCA2PK,CAAA,AAAAC,qBAEI,uBDtOKC,cCqOH,uBAAAD;AA1PN,gCAAA,AAAAD;AAEO,AD0CND,0CC1CM,uBAAA,AAAAC;;;ADiBAG,iDClBH,AAAAH;AD4BIP,qDAAA,AAAAU;AAAA,oCAAA,AAAAV,iBAAA;AAEEW,6DAAmBD;AE9EwB,AF2FpDJ,8CE3FoD,uBF\u002BExC,AAAAT,0FAA4Bc;;;AAS5B,AAGZL,8CAHY,uBALH,6BACI,yBACA,gCAAgC,8CAHxCN,iBAIQD,eAHJ,mHAAA;;;;;;;AAQT,gBAAA,AAAAO;AAGK,sBAAA,AAAAT,gFAAA,AAAAS;AACA,uBAAA;;;AAHa,uBAAA,AAAAA;;;;AAMjBM,8BACA,6BACI,yBACA,0BACAb,eAHJ,mHAAA;AAMJ,kBAAA,AAAAF,gFAAoBe;AACpB,mBAAA,iBAAmB;;;SA0BzB,IA3HI,AA2HJ,6BAAa,GA3HTZ;AA4HF,eAAA,iBAAmB;;SAErB,IA9HI,AA8HJ,6BAAa,GA9HTA;AA\u002BHF,eAAA,iBAAmB;;SAErB,IAjII,AAiIJ,6BAAa,IAjITA;AAiIiC,eAAA,iBAAmB;;SAExD,IAnII,AAmIJ,6BAAa,GAnITA;AAmI6B,eAAA,iBAAmB;;SAEpD,IArII,AAqIJ,6BAAa,OArITA;AAqI8B,eAAA,iBAAmB;;;AAEhD,eAAA,iBAAmB","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -17,21 +17,27 @@ import { readTypeParameters } from "./TypeParameters.js";
|
|
|
17
17
|
import { readExportAssignment } from "./ExportAssignment.js";
|
|
18
18
|
import { readDocumentationForNode, readDocumentationForSignature } from "./Documentation.js";
|
|
19
19
|
import { readNamedTupleMember } from "./NamedTupleMember.js";
|
|
20
|
+
import { readMappedTypeNode } from "./MappedTypeNode.js";
|
|
20
21
|
import { class_type } from "../../fable_modules/fable-library-js.4.14.0/Reflection.js";
|
|
21
22
|
|
|
22
23
|
export class TypeScriptReader {
|
|
23
24
|
constructor(checker) {
|
|
24
|
-
this["checker@
|
|
25
|
+
this["checker@26"] = checker;
|
|
25
26
|
this.warnings = [];
|
|
27
|
+
this.typeMemory = [];
|
|
26
28
|
}
|
|
27
29
|
"Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"() {
|
|
28
30
|
const _ = this;
|
|
29
|
-
return _["checker@
|
|
31
|
+
return _["checker@26"];
|
|
30
32
|
}
|
|
31
33
|
"Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"() {
|
|
32
34
|
const _ = this;
|
|
33
35
|
return _.warnings;
|
|
34
36
|
}
|
|
37
|
+
"Glutinum.Converter.Reader.Types.ITypeScriptReader.get_TypeMemory"() {
|
|
38
|
+
const _ = this;
|
|
39
|
+
return _.typeMemory;
|
|
40
|
+
}
|
|
35
41
|
"Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadClassDeclarationZ4558F325"(classDeclaration) {
|
|
36
42
|
const this$ = this;
|
|
37
43
|
return readClassDeclaration(this$, classDeclaration);
|
|
@@ -54,7 +60,9 @@ export class TypeScriptReader {
|
|
|
54
60
|
}
|
|
55
61
|
"Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"(node) {
|
|
56
62
|
const this$ = this;
|
|
57
|
-
|
|
63
|
+
const typ = readNode(this$, node);
|
|
64
|
+
void (this$.typeMemory.push(typ));
|
|
65
|
+
return typ;
|
|
58
66
|
}
|
|
59
67
|
"Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeAliasDeclarationZ7FA16745"(typeAliasDeclaration) {
|
|
60
68
|
const this$ = this;
|
|
@@ -112,6 +120,10 @@ export class TypeScriptReader {
|
|
|
112
120
|
const this$ = this;
|
|
113
121
|
return readNamedTupleMember(this$, namedTupleMember);
|
|
114
122
|
}
|
|
123
|
+
"Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadMappedTypeNode28272C00"(declaration) {
|
|
124
|
+
const this$ = this;
|
|
125
|
+
return readMappedTypeNode(this$, declaration);
|
|
126
|
+
}
|
|
115
127
|
}
|
|
116
128
|
|
|
117
129
|
export function TypeScriptReader_$reflection() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeScriptReader.fs"],"names":["checker","_","this","classDeclaration","enumDeclaration","functionDeclaration","interfaceDeclaration","moduleDeclaration","node","typeAliasDeclaration","typNode","variableStatement","declaration","parameters","unionType","typeParametersOpt","exportAssignment","namedTupleMember"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeScriptReader.fs"],"names":["checker","_","this","classDeclaration","enumDeclaration","functionDeclaration","interfaceDeclaration","moduleDeclaration","typ","node","typeAliasDeclaration","typNode","variableStatement","declaration","parameters","unionType","typeParametersOpt","exportAssignment","namedTupleMember"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBsB,6BAAAA;AAClB;AAKA;;;AAIaC,kBAAAA;AAA4B,eAAA,AAAAA;;;AAE9BA,kBAAAA;AAAa,eAAA,AAAAA;;;AAEbA,kBAAAA;AAAe,eAAA,AAAAA;;;AAEfC,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKC;;;AAEvBD,sBAAAA;AAIyC,eAAA,iBAA5C,oBAAoBA,OAAKE;;;AAEtBF,sBAAAA;AAKA,eAAA,iBADH,wBAAwBA,OAAKG;;;AAG1BH,sBAAAA;AAKA,eAAA,iBADH,yBAAyBA,OAAKI;;;AAG3BJ,sBAAAA;AAKA,eAAA,kBADH,sBAAsBA,OAAKK;;;AAGxBL,sBAAAA;AACCM,oBAAM,SAASN,OAAKO;AACxB,cAAA,AAAAP,sBAAeM;eACfA;;;AAEGN,sBAAAA;AAIH,eAAA,yBAAyBA,OAAKQ;;;AAE3BR,sBAAAA;AACH,eAAA,AAACA,iFAA6CS;;;AAE3CT,sBAAAA;AACG,eAAA,CAAA,AAAAS,oBAEI,iBAAmB,8BADX,aAAaT,OAAbS;;;AAGfT,sBAAAA;AAIH,eAAA,sBAAsBA,OAAKU;;;AAExBV,sBAAAA;AACH,eAAA,gBAAgBA,OAAKW;;;AAElBX,sBAAAA;AAIH,eAAA,eAAeA,OAAKY;;;AAEjBZ,sBAAAA;AACH,eAAA,kBAAkBA,OAAKa;;;AAEpBb,sBAAAA;AACH,eAAA,qBAAqBA,OAAKO;;;AAEvBP,sBAAAA;AAIH,eAAA,sBAAsBA,OAAKW;;;AAExBX,sBAAAA;AAIH,eAAA,mBAAmBA,OAAKc;;;AAErBd,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKe;;;AAEvBf,sBAAAA;AAIH,eAAA,8BAA8BA,OAAKW;;;AAEhCX,sBAAAA;AAIH,eAAA,yBAAyBA,OAAKO;;;AAE3BP,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKgB;;;AAEvBhB,sBAAAA;AAIH,eAAA,mBAAmBA,OAAKW","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import typescript from "typescript";
|
|
2
|
-
import { map,
|
|
2
|
+
import { map, singleton, choose, concat } from "../../fable_modules/fable-library-js.4.14.0/List.js";
|
|
3
3
|
import { defaultArgWith } from "../../fable_modules/fable-library-js.4.14.0/Option.js";
|
|
4
|
-
import { isFromEs5Lib, $007CHasTypeFlags$007C_$007C,
|
|
5
|
-
import { GlueTypeUnion,
|
|
4
|
+
import { isFromEs5Lib, $007CHasTypeFlags$007C_$007C, tryReadLiteral } from "./Utils.js";
|
|
5
|
+
import { GlueTypeUnion, GluePrimitive, GlueType } from "../GlueAST.js";
|
|
6
|
+
import { Report_readerError_Z19516DCE } from "./Report.js";
|
|
6
7
|
import { toList } from "../../fable_modules/fable-library-js.4.14.0/Seq.js";
|
|
7
8
|
|
|
8
9
|
function readUnionTypeCases(reader, unionTypeNode) {
|
|
@@ -46,7 +47,7 @@ function readUnionTypeCases(reader, unionTypeNode) {
|
|
|
46
47
|
const typeReferenceNode = node_1;
|
|
47
48
|
const symbolOpt = checker.getSymbolAtLocation(typeReferenceNode.typeName);
|
|
48
49
|
const symbol = defaultArgWith(symbolOpt, () => {
|
|
49
|
-
throw new Error(
|
|
50
|
+
throw new Error(Report_readerError_Z19516DCE("union type cases", "Missing symbol", typeReferenceNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/UnionTypeNode.fs", 67));
|
|
50
51
|
});
|
|
51
52
|
const matchValue_1 = symbol.declarations;
|
|
52
53
|
if (matchValue_1 == null) {
|
|
@@ -56,7 +57,7 @@ function readUnionTypeCases(reader, unionTypeNode) {
|
|
|
56
57
|
return singleton(new GlueType(3, [new GluePrimitive(6, [])]));
|
|
57
58
|
}
|
|
58
59
|
else {
|
|
59
|
-
throw new Error(
|
|
60
|
+
throw new Error(Report_readerError_Z19516DCE("union type cases", "Unsupported type reference reach a point where it was expected to have flags like Any", typeReferenceNode, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/UnionTypeNode.fs", 109));
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
else {
|
|
@@ -64,10 +65,6 @@ function readUnionTypeCases(reader, unionTypeNode) {
|
|
|
64
65
|
if (declarations.length === 0) {
|
|
65
66
|
return void 0;
|
|
66
67
|
}
|
|
67
|
-
else if (declarations.length > 1) {
|
|
68
|
-
const fullName = checker.getFullyQualifiedName(symbol);
|
|
69
|
-
return singleton(new GlueType(13, [new GlueTypeReference(typeReferenceNode.getText(), fullName, empty(), isFromEs5Lib(symbolOpt))]));
|
|
70
|
-
}
|
|
71
68
|
else if (isFromEs5Lib(symbolOpt)) {
|
|
72
69
|
return singleton(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeReferenceNode));
|
|
73
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/UnionTypeNode.fs"],"names":["checker","reader","removeParenthesizedType","node","parenthesizedTypeNode","literalTypeNode","literalExpression","matchValue","typeReferenceNode","symbolOpt","symbol","typ","declarations","
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/UnionTypeNode.fs"],"names":["checker","reader","removeParenthesizedType","node","parenthesizedTypeNode","literalTypeNode","literalExpression","matchValue","typeReferenceNode","symbolOpt","symbol","typ","declarations","declaration","readUnionTypeCases","unionTypeNode"],"mappings":";;;;;;;;;AAaQA,oBAAU,AAAAC;AAMNC;;;kBAAyBC;AAC7B,gBAAG,mCAA2BA;AACtBC,8CAAwBD;2BAEJ,AAAAC;AAAxB;;;uBAEAD;;;;;AA0GL,WAAA,kBADA,OAnGA;AACC,YAAG,6BAAqBA;AAChBE,oCAAkBF;AAElBG,sCAC4B,AAAAD;AAEhC,gBACI,2BAAmBC,qBAAnB,OACG,4BAAoBA;AAOR,uBAAA,UADZ,iBAHA,eADH,eAAeA;AAEX,oCAAS;;;;AAMPC,mCAAA,AAAAD;wBAAAC;yBAAA;yBAAA;AAIC,\u002BBAAA,UADH,iBAAmB;;AAGhB,\u002BBAAA;;;;aACV,IAAG,\u002BBAAuBJ;AACvBK,sCAAoBL;AAEpBM,8BACA,AAAAT,4BAA8B,AAAAQ;AAE9BE,2BACA,eASID;AAFO,gCALH,6BACI,oBACA,kBACAD,mBAHJ,mHAAA;;AAWND,iCAAA,AAAAG;AAAA,gBAAA,AAAAH;AAuBEI,4BAAM,AAAAX,wBAAwBU;AAE5BH,qCAAA,AAAAI;AACJ,oBADI,AACJ,6BAAa,GADTJ;AAGC,2BAAA,UADH,iBAAmB;;;AAShB,oCALH,6BACI,oBACA,yFACAC,mBAHJ,mHAAA;;;;AA9BDI,qCACHL;AAAA,oBAAG,AAAAK,wBAAqB;AACpB,2BAAA;;qBACC,IAAG,aAAaH;AAEd,2BAAA,UADH,AAAAR,iFAAoBO;;;AAKhBK,wCAAc,AAAAD,aAAc;AAG1B,wBAAA,AAAAC,qBAAA;AAE6B,\u002BBAAA,UAA/B,AAAAZ,6EAAgBY;;;AAIb,\u002BBAAA,UADH,AAAAZ,iFAAoBO;;;;;aAqB1B,IAAA,AAAAL,gBAAA;AAIE,mBAAA,AACA,AAAAW,mBAAmBb,QAHHE;;;AASjB,mBAAA,UADH,AAAAF,iFAAoBE;;OAhG7B,IAASD,yBAFT,OADH,AAAAa;;;;WA\u002BG2C,iBAA3C,AAAAD,mBAAmBb,QAAOc","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -3,10 +3,10 @@ import { tryParse } from "../../fable_modules/fable-library-js.4.14.0/Int32.js";
|
|
|
3
3
|
import { FSharpRef } from "../../fable_modules/fable-library-js.4.14.0/Types.js";
|
|
4
4
|
import { GlueAccessor, GlueLiteral } from "../GlueAST.js";
|
|
5
5
|
import { tryParse as tryParse_1 } from "../../fable_modules/fable-library-js.4.14.0/Double.js";
|
|
6
|
-
import { endsWith, interpolate, toText } from "../../fable_modules/fable-library-js.4.14.0/String.js";
|
|
7
6
|
import { class_type } from "../../fable_modules/fable-library-js.4.14.0/Reflection.js";
|
|
8
7
|
import { toList, exists } from "../../fable_modules/fable-library-js.4.14.0/Seq.js";
|
|
9
8
|
import { collect, empty, map } from "../../fable_modules/fable-library-js.4.14.0/List.js";
|
|
9
|
+
import { endsWith } from "../../fable_modules/fable-library-js.4.14.0/String.js";
|
|
10
10
|
|
|
11
11
|
export function $007CHasTypeFlags$007C_$007C(flag, flags) {
|
|
12
12
|
if ((flags & flag) !== 0) {
|
|
@@ -91,22 +91,19 @@ export function tryReadLiteral(expression) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
export function generateReaderError(errorContext, reason, node) {
|
|
95
|
-
const sourceFile = node.getSourceFile();
|
|
96
|
-
const lineAndChar = sourceFile.getLineAndCharacterOfPosition(node.pos);
|
|
97
|
-
const line = (~~lineAndChar.line + 1) | 0;
|
|
98
|
-
const column = (~~lineAndChar.character + 1) | 0;
|
|
99
|
-
return toText(interpolate("Error while reading %s%P() in:\n%s%P()(%d%P(),%d%P())\n\n%s%P()\n\n--- Text ---\n%s%P()\n---\n\n--- Parent text ---\n%s%P()\n---", [errorContext, sourceFile.fileName, line, column, reason, node.getFullText(), node.parent.getFullText()]));
|
|
100
|
-
}
|
|
101
|
-
|
|
102
94
|
export function tryGetFullName(checker, node) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
95
|
+
if (node.symbol == null) {
|
|
96
|
+
const matchValue = checker.getSymbolAtLocation(node);
|
|
97
|
+
if (matchValue != null) {
|
|
98
|
+
const symbol = matchValue;
|
|
99
|
+
return checker.getFullyQualifiedName(symbol);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return void 0;
|
|
103
|
+
}
|
|
107
104
|
}
|
|
108
105
|
else {
|
|
109
|
-
return
|
|
106
|
+
return checker.getFullyQualifiedName(node.symbol);
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
109
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/Utils.fs"],"names":["flags","flag","text","isNumericString","matchValue","outArg","expression","literal","tryReadNumericLiteral","
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/Utils.fs"],"names":["flags","flag","text","isNumericString","matchValue","outArg","expression","literal","tryReadNumericLiteral","node","checker","symbol","tryGetFullName","modifiers","modifier","GetAccessor","currentModifier","HasModifier","reader","heritageClauses","typNode","clause","symbolOpt","declarations","sourceFile"],"mappings":";;;;;;;;;;;AASI,QAAG,CAAA,AAAIA,QAAcC,UAAQ;AACzB,eAAA,KAAI;;;AAEJ,eAAA;;;;;AAGJ,QAAG,CAAA,AAAID,QAAcC,UAAQ;AACzB,eAAA,KAAI;;;AAEJ,eAAA;;;;;AAGJ,QAAG,CAAA,AAAID,QAAcC,UAAQ;AACzB,eAAA,KAAI;;;AAEJ,eAAA;;;;;AAGJ,QAAA,CAAA,OAASC,UAAO;AAAuD,eAAA,CAA7B,aAARA;;;eAAlC;;;;;AAGA,QAAG,AAAAC,gBAAgBD;AAETE;AAAAC;AAAAD,sBAAA,SAAsBF,sBAAtB,oBAAAG;AAAAA;aAAAA;AAAA,YAAA,AAAAD;AACS,mBAAA,oBAAA,AAAAA;;;AAGLA;AAAAC;AAAAD,4BAAA,WAAuBF,MAAvB,oBAAAG;AAAAA;iBAAAA;AAAA,gBAAA,AAAAD;AACS,uBAAA,oBAAA,AAAAA;;;AACR,uBAAA;;;;;AAEX,eAAA;;;;;AAGEA,uBAAA,AAAAE;YAAAF;aAAA;AAEEG,4BAAWD;AAEf,mBAAA,oBAAmB,AAAAC;;aAJjB;AAM0B,mBAAA,oBAAiB;aAN3C;AAOyB,mBAAA;aAPzB;AAKyB,mBAAA,oBAAiB;;AAM5C,mBAAA,AAAAC,sBAFW,AAAAF;;;;;AAQf,QAAG,AAAO,AAAAG;AACAL,2BAAA,AAAAM,4BAA4BD;AAA5B,YAAA,AAAAL;AAECO,2BAAUP;AAAA,mBAAA,AAAAM,8BAA8BC;;;AADrC,mBAAA;;;;AAGV,eAAA,AAAAD,8BAA8B,AAAAD;;;;;WAGH,WAA/B,AAAAG,eAAeF,SAAQD,OAA4B;;;;;;;;;;;;;AAKzC,QAAA,AAAAI;AASI,eAAA;;SAHH,IAHA,sBACC,AAAAC,kBAAgB,MAFpBD;AAKc,eAAA;;;AACC,eAAA;;;;;WAInB,AAAAE,kCAC2CF;;;;AAMrC,QAAA,AAAAA;eAMI;;;AAHH,eAAA,6BACC,AAAAG,yBAAuBF,WAF3BD;;;;;WAYJ,AAAAI,mCAC2CJ,WACvCC;;;;AAOFV,uBAAA,AAAAK;AAAA,QAAA,AAAAL;AAG6B,eAAA,aAAkB,AAAAc,wFAAhC,OAAjBd;;;AAFM,eAAA;;;;;AAQJ,QAAA,AAAAe;AAOI,eAAA;;;AAHH,eAAA,oBAC\u002BB,iBAAS,AAAAD,iFAAAE,UAAvB,OAAhB,AAAAC,gBAFD,OADHF;;;;;;;;;;AAiBE,QAAA,AAAAG;AAECX,uBACGW;AAAAlB,2BAAA,AAAAO;AAAA,YAAA,AAAAP;AAECmB,iCACGnB;AAAA,gBAAA,AAAAmB,aAAa,mBAAb;AAEEC,mCAAa,AAAAD,aAAa;AAE9B,uBAAA,SAAA,AAAAC,qBAA6B;;;uBAC1B;;;;mBAPD;;;;eAHJ","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { map, defaultArg } from "../../fable_modules/fable-library-js.4.14.0/Option.js";
|
|
2
2
|
import { toList, exists } from "../../fable_modules/fable-library-js.4.14.0/Seq.js";
|
|
3
3
|
import { head, isEmpty } from "../../fable_modules/fable-library-js.4.14.0/List.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Report_readerError_Z19516DCE } from "./Report.js";
|
|
5
5
|
import { GlueType, GlueVariable } from "../GlueAST.js";
|
|
6
6
|
|
|
7
7
|
export function readVariableStatement(reader, statement) {
|
|
@@ -15,7 +15,7 @@ export function readVariableStatement(reader, statement) {
|
|
|
15
15
|
name = id.getText();
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
|
-
throw new Error(
|
|
18
|
+
throw new Error(Report_readerError_Z19516DCE("variable statement", "Unable to read variable name", declaration, "/Users/mmangel/Workspaces/Github/glutinum-org/Glutinum.Converter/src/Glutinum.Converter/Reader/VariableStatement.fs", 35));
|
|
19
19
|
}
|
|
20
20
|
return new GlueType(2, [new GlueVariable(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](declaration), name, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](declaration.type))]);
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/VariableStatement.fs"],"names":["modifier","modifiers","statement","matchValue","declaration","name","id","reader"],"mappings":";;;;;;;AAuBI,QAFO,WANA,mBAEI,sBACC,AAAAA,kBAAgB,KAFpBC,YAFJ,AAAAC,sBAOuB;AAGjBC,2BAA0C,OAA1C,AAAAD;AAAA,YAAA,CAAA,QAAAC;AAGJC,gCACM,KAAAD;AAAAE;AACM,gBAAA,AAAAD,0BAAA;AAEEE,2BAAsB,AAAAF;AAC1B,AAJJC,uBAII,AAAAC;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/VariableStatement.fs"],"names":["modifier","modifiers","statement","matchValue","declaration","name","id","reader"],"mappings":";;;;;;;AAuBI,QAFO,WANA,mBAEI,sBACC,AAAAA,kBAAgB,KAFpBC,YAFJ,AAAAC,sBAOuB;AAGjBC,2BAA0C,OAA1C,AAAAD;AAAA,YAAA,CAAA,QAAAC;AAGJC,gCACM,KAAAD;AAAAE;AACM,gBAAA,AAAAD,0BAAA;AAEEE,2BAAsB,AAAAF;AAC1B,AAJJC,uBAII,AAAAC;;;AAOG,gCALH,6BACI,sBACA,gCACAF,aAHJ,uHAAA;;AAaL,mBAAA,iBANF,iBACmB,AAAAG,8FAAiCH,cAC1CC,MACA,AAAAE,kFAAoB,AAAAH;;;AAnB3B,mBAAA;;;;AAyBR,eAAA","file":null,"sourcesContent":null,"sourceRoot":null}
|