export-table-pulgin-csharp 1.1.168 → 1.1.170
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/CSProtoParser.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CSProtoParser.d.ts","sourceRoot":"","sources":["../src/CSProtoParser.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAClB,IAAI,EAAE,MAAM,CAAK;IACjB,OAAO,EAAE,OAAO,CAAQ;IACxB,IAAI,EAAE,MAAM,CAAK;IACjB,MAAM,EAAE,MAAM,CAAK;IACnB,MAAM,EAAE,MAAM,CAAK;IAEnB,OAAO,CAAC,CAAC,EAAE,MAAM;IAOjB,OAAO,CAAC,CAAC,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"CSProtoParser.d.ts","sourceRoot":"","sources":["../src/CSProtoParser.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAClB,IAAI,EAAE,MAAM,CAAK;IACjB,OAAO,EAAE,OAAO,CAAQ;IACxB,IAAI,EAAE,MAAM,CAAK;IACjB,MAAM,EAAE,MAAM,CAAK;IACnB,MAAM,EAAE,MAAM,CAAK;IAEnB,OAAO,CAAC,CAAC,EAAE,MAAM;IAOjB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAYnC,YAAY;CAGf;AAED,qBAAa,SAAS;IAClB,IAAI,EAAE,MAAM,CAAK;IACjB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAU;IAChC,MAAM,EAAE,SAAS,EAAE,CAAK;IAExB,YAAY,CAAC,SAAS,EAAE,MAAM;CAIjC;AAED,qBAAa,aAAa;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAa;IAC5C,cAAc,CAAC,QAAQ,EAAE,MAAM;IA8D/B,YAAY,CAAC,SAAS,EAAE,MAAM;CAGjC"}
|
package/dist/CSProtoParser.js
CHANGED
|
@@ -45,14 +45,15 @@ class FieldInfo {
|
|
|
45
45
|
.map(t => t.slice(0, 1).toUpperCase() + t.slice(1))
|
|
46
46
|
.join(""));
|
|
47
47
|
}
|
|
48
|
-
setType(t) {
|
|
48
|
+
setType(t, isArray) {
|
|
49
|
+
this.isArray = isArray;
|
|
49
50
|
this.type = t;
|
|
50
51
|
let internalType = fieldTypeMap[this.type];
|
|
51
52
|
if (internalType != undefined) {
|
|
52
|
-
this.csType = internalType;
|
|
53
|
+
this.csType = this.isArray ? `${internalType}[]` : internalType;
|
|
53
54
|
}
|
|
54
55
|
else {
|
|
55
|
-
this.csType = t;
|
|
56
|
+
this.csType = this.isArray ? `${t}[]` : t;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
getFieldType() {
|
|
@@ -126,10 +127,9 @@ class CSProtoParser {
|
|
|
126
127
|
let fieldName = mField[3];
|
|
127
128
|
let field = new FieldInfo();
|
|
128
129
|
field.setName(fieldName);
|
|
129
|
-
field.setType(fieldType);
|
|
130
|
-
field.isArray = isArray;
|
|
130
|
+
field.setType(fieldType, isArray);
|
|
131
131
|
curClass.fields.push(field);
|
|
132
|
-
console.log(`find field: ${field.csName}, ${field.csType}, ${
|
|
132
|
+
console.log(`find field: ${field.csName}, ${field.csType}, ${field.isArray}`);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
package/package.json
CHANGED
package/src/CSProtoParser.ts
CHANGED
|
@@ -22,14 +22,15 @@ export class FieldInfo {
|
|
|
22
22
|
.map(t => t.slice(0, 1).toUpperCase() + t.slice(1))
|
|
23
23
|
.join(""))
|
|
24
24
|
}
|
|
25
|
-
setType(t: string) {
|
|
25
|
+
setType(t: string, isArray: boolean) {
|
|
26
|
+
this.isArray = isArray
|
|
26
27
|
this.type = t;
|
|
27
28
|
|
|
28
29
|
let internalType = fieldTypeMap[this.type]
|
|
29
30
|
if (internalType != undefined) {
|
|
30
|
-
this.csType = internalType
|
|
31
|
+
this.csType = this.isArray ? `${internalType}[]` : internalType
|
|
31
32
|
} else {
|
|
32
|
-
this.csType = t
|
|
33
|
+
this.csType = this.isArray ? `${t}[]` : t
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -104,10 +105,9 @@ export class CSProtoParser {
|
|
|
104
105
|
let fieldName = mField[3]
|
|
105
106
|
let field = new FieldInfo()
|
|
106
107
|
field.setName(fieldName)
|
|
107
|
-
field.setType(fieldType)
|
|
108
|
-
field.isArray = isArray
|
|
108
|
+
field.setType(fieldType, isArray)
|
|
109
109
|
curClass!.fields.push(field)
|
|
110
|
-
console.log(`find field: ${field.csName}, ${field.csType}, ${
|
|
110
|
+
console.log(`find field: ${field.csName}, ${field.csType}, ${field.isArray}`)
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|