corba.js 0.1.12 → 0.1.13
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/lib/idl/idl.cjs +166 -155
- package/lib/idl/idl.cjs.map +1 -1
- package/lib/idl/src/idl/cc/write-interface.d.ts +0 -1
- package/lib/idl/src/idl/util.d.ts +0 -1
- package/lib/idl/src/net/browser.d.ts +1 -1
- package/lib/idl/src/net/tcp.d.ts +0 -1
- package/lib/idl/src/net/tls.d.ts +0 -1
- package/lib/idl/src/net/ws.d.ts +0 -3
- package/lib/src/idl/cc/typeIDLtoCC.js +4 -1
- package/lib/src/idl/cc/typeIDLtoCC.js.map +1 -1
- package/lib/src/idl/cc/typeIDLtoGIOPCC.js +5 -3
- package/lib/src/idl/cc/typeIDLtoGIOPCC.js.map +1 -1
- package/lib/src/idl/cc/write-code.js +33 -1
- package/lib/src/idl/cc/write-code.js.map +1 -1
- package/lib/src/idl/cc/write-interface.d.ts +0 -1
- package/lib/src/idl/cc/write-interface.js +5 -33
- package/lib/src/idl/cc/write-interface.js.map +1 -1
- package/lib/src/idl/util.d.ts +0 -1
- package/lib/src/net/browser.d.ts +1 -1
- package/lib/src/net/browser.js +2 -1
- package/lib/src/net/browser.js.map +1 -1
- package/lib/src/net/tcp.d.ts +0 -1
- package/lib/src/net/tls.d.ts +0 -1
- package/lib/src/net/ws.d.ts +0 -3
- package/package.json +18 -15
package/lib/idl/idl.cjs
CHANGED
|
@@ -2858,7 +2858,11 @@ function typeIDLtoCC(type, direction) {
|
|
|
2858
2858
|
name = absolutePrefix.length == 0 ? relativeName : `${absolutePrefix.substring(1)}.${relativeName}`;
|
|
2859
2859
|
break;
|
|
2860
2860
|
case Type.TKN_STRUCT:
|
|
2861
|
-
|
|
2861
|
+
name = absolutePrefix.length == 0 ? relativeName : `${absolutePrefix.substring(1)}.${relativeName}`;
|
|
2862
|
+
if (direction == Direction.IN) {
|
|
2863
|
+
name = `const ${name}&`;
|
|
2864
|
+
}
|
|
2865
|
+
break;
|
|
2862
2866
|
case Type.TKN_NATIVE:
|
|
2863
2867
|
name =
|
|
2864
2868
|
absolutePrefix.length == 0 ? relativeName : `${absolutePrefix.substring(1)}.${relativeName}`;
|
|
@@ -2941,6 +2945,132 @@ function typeIDLtoCC(type, direction) {
|
|
|
2941
2945
|
}
|
|
2942
2946
|
}
|
|
2943
2947
|
|
|
2948
|
+
function typeIDLtoGIOPCC(type, arg, direction) {
|
|
2949
|
+
if (type === undefined)
|
|
2950
|
+
throw Error("internal error: parser delivered no type information");
|
|
2951
|
+
let name;
|
|
2952
|
+
switch (type.type) {
|
|
2953
|
+
case Type.TKN_IDENTIFIER:
|
|
2954
|
+
case Type.TKN_MODULE:
|
|
2955
|
+
return typeIDLtoGIOPCC(type.child[0], arg, direction);
|
|
2956
|
+
case Type.TKN_VALUETYPE:
|
|
2957
|
+
return arg === undefined ? `decoder.value("${type.text}")` : `encoder.value(${arg})`;
|
|
2958
|
+
case Type.SYN_INTERFACE:
|
|
2959
|
+
return arg === undefined ? `co_await ${type.text}::_narrow(decoder.readObject(obj->get_ORB()))` : `encoder.writeObject(${arg}.get())`;
|
|
2960
|
+
case Type.TKN_UNION:
|
|
2961
|
+
throw Error("union is not implemented yet");
|
|
2962
|
+
case Type.TKN_STRUCT: {
|
|
2963
|
+
return arg === undefined
|
|
2964
|
+
? `_decode${type.text}(decoder)`
|
|
2965
|
+
: `_encode${type.text}(encoder,${arg})`;
|
|
2966
|
+
}
|
|
2967
|
+
case Type.TKN_NATIVE:
|
|
2968
|
+
{
|
|
2969
|
+
const id = type.child[0].text;
|
|
2970
|
+
if (id.length > 4 && id.substring(id.length - 4) === "_ptr") {
|
|
2971
|
+
return arg === undefined
|
|
2972
|
+
? `decoder.value("${id.substring(0, id.length - 4)}")`
|
|
2973
|
+
: `encoder.value(${arg})`;
|
|
2974
|
+
}
|
|
2975
|
+
else {
|
|
2976
|
+
return `undefined`;
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
case Type.TKN_VOID:
|
|
2980
|
+
name = "Void";
|
|
2981
|
+
break;
|
|
2982
|
+
case Type.TKN_BOOLEAN:
|
|
2983
|
+
name = "Boolean";
|
|
2984
|
+
break;
|
|
2985
|
+
case Type.TKN_CHAR:
|
|
2986
|
+
name = "Char";
|
|
2987
|
+
break;
|
|
2988
|
+
case Type.TKN_OCTET:
|
|
2989
|
+
name = "Octet";
|
|
2990
|
+
break;
|
|
2991
|
+
case Type.TKN_SHORT:
|
|
2992
|
+
name = "Short";
|
|
2993
|
+
break;
|
|
2994
|
+
case Type.TKN_LONG:
|
|
2995
|
+
name = "Long";
|
|
2996
|
+
break;
|
|
2997
|
+
case Type.SYN_LONGLONG:
|
|
2998
|
+
name = "Longlong";
|
|
2999
|
+
break;
|
|
3000
|
+
case Type.SYN_UNSIGNED_SHORT:
|
|
3001
|
+
name = "Ushort";
|
|
3002
|
+
break;
|
|
3003
|
+
case Type.SYN_UNSIGNED_LONG:
|
|
3004
|
+
name = "Ulong";
|
|
3005
|
+
break;
|
|
3006
|
+
case Type.SYN_UNSIGNED_LONGLONG:
|
|
3007
|
+
name = "Ulonglong";
|
|
3008
|
+
break;
|
|
3009
|
+
case Type.TKN_FLOAT:
|
|
3010
|
+
name = "Float";
|
|
3011
|
+
break;
|
|
3012
|
+
case Type.TKN_DOUBLE:
|
|
3013
|
+
name = "Double";
|
|
3014
|
+
break;
|
|
3015
|
+
case Type.SYN_LONG_DOUBLE:
|
|
3016
|
+
name = "LongDouble";
|
|
3017
|
+
break;
|
|
3018
|
+
case Type.TKN_STRING:
|
|
3019
|
+
switch (direction) {
|
|
3020
|
+
case Direction.IN:
|
|
3021
|
+
return arg === undefined ? `decoder.readStringView()` : `encoder.writeString(${arg})`;
|
|
3022
|
+
case Direction.OUT:
|
|
3023
|
+
return arg === undefined ? `decoder.readString()` : `encoder.writeString(${arg})`;
|
|
3024
|
+
}
|
|
3025
|
+
throw Error("yikes");
|
|
3026
|
+
case Type.TKN_ENUM:
|
|
3027
|
+
return arg === undefined ? `static_cast<${type.text}>(decoder.readUlong())` : `encoder.writeUlong(std::to_underlying(${arg}))`;
|
|
3028
|
+
case Type.TKN_SEQUENCE:
|
|
3029
|
+
switch (type.child[0].type) {
|
|
3030
|
+
case Type.TKN_OCTET: {
|
|
3031
|
+
switch (direction) {
|
|
3032
|
+
case Direction.IN:
|
|
3033
|
+
return arg === undefined ? `decoder.readBlobView()` : `encoder.writeBlob(${arg})`;
|
|
3034
|
+
case Direction.OUT:
|
|
3035
|
+
return arg === undefined ? `decoder.readBlob()` : `encoder.writeBlob(${arg})`;
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
case Type.TKN_FLOAT: {
|
|
3039
|
+
switch (direction) {
|
|
3040
|
+
case Direction.IN:
|
|
3041
|
+
return arg === undefined ? `decoder.readSequenceSpanFloat()` : `encoder.writeSequence(${arg})`;
|
|
3042
|
+
case Direction.OUT:
|
|
3043
|
+
return arg === undefined ? `decoder.readSequenceVectorFloat()` : `encoder.writeSequence(${arg})`;
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
case Type.TKN_DOUBLE: {
|
|
3047
|
+
switch (direction) {
|
|
3048
|
+
case Direction.IN:
|
|
3049
|
+
return arg === undefined ? `decoder.readSequenceSpanDouble()` : `encoder.writeSequence(${arg})`;
|
|
3050
|
+
case Direction.OUT:
|
|
3051
|
+
return arg === undefined ? `decoder.readSequenceVectorDouble()` : `encoder.writeSequence(${arg})`;
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
case Type.TKN_STRING:
|
|
3055
|
+
switch (direction) {
|
|
3056
|
+
case Direction.IN:
|
|
3057
|
+
return arg === undefined
|
|
3058
|
+
? `decoder.readSequenceVector<std::string_view>([&] { return decoder.readStringView(); })`
|
|
3059
|
+
: `encoder.writeSequence<std::string_view>(${arg}, [&](auto item) { encoder.writeString(item);})`;
|
|
3060
|
+
case Direction.OUT:
|
|
3061
|
+
return arg === undefined
|
|
3062
|
+
? `decoder.readSequenceVector<std::string>([&] { return decoder.readString(); })`
|
|
3063
|
+
: `encoder.writeSequence<std::string>(${arg}, [&](auto item) { encoder.writeString(item);})`;
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
throw Error(`this sequence type is not implemented yet`);
|
|
3067
|
+
default:
|
|
3068
|
+
type.printTree();
|
|
3069
|
+
throw Error(`no mapping from IDL type '${type.toString()}' to GIOP encoder/decoder`);
|
|
3070
|
+
}
|
|
3071
|
+
return arg === undefined ? `decoder.read${name}()` : `encoder.write${name}(${arg})`;
|
|
3072
|
+
}
|
|
3073
|
+
|
|
2944
3074
|
function writeCCInterface(specification) {
|
|
2945
3075
|
let out = fs__namespace.createWriteStream(filenamePrefix + ".hh");
|
|
2946
3076
|
out.write("// This file is generated by the corba.js IDL compiler from '" + filename + "'.\n\n");
|
|
@@ -3040,40 +3170,12 @@ function writeCCInterfaceDefinitions(out, specification, prefix = "", indent = 0
|
|
|
3040
3170
|
let declarators = member.child[1];
|
|
3041
3171
|
for (let declarator of declarators.child) {
|
|
3042
3172
|
writeIndent(out, indent + 1);
|
|
3043
|
-
out.write(
|
|
3173
|
+
out.write(typeIDLtoCC(type, Direction.IN) + " " + declarator.text + ";\n");
|
|
3044
3174
|
}
|
|
3045
3175
|
}
|
|
3046
3176
|
}
|
|
3047
3177
|
writeIndent(out, indent);
|
|
3048
3178
|
out.write("};\n");
|
|
3049
|
-
out.write(`export function decode${identifier}(decoder: GIOPDecoder): ${identifier} {\n`);
|
|
3050
|
-
out.write(` return {\n`);
|
|
3051
|
-
for (let i = 0; i < struct_type.child.length; ++i) {
|
|
3052
|
-
const member = struct_type.child[i];
|
|
3053
|
-
if (member.type === Type.SYN_MEMBER) {
|
|
3054
|
-
let type = member.child[0];
|
|
3055
|
-
let declarators = member.child[1];
|
|
3056
|
-
for (let declarator of declarators.child) {
|
|
3057
|
-
writeIndent(out, indent + 2);
|
|
3058
|
-
out.write(declarator.text + ": " + typeIDLtoGIOPTS(type) + ",\n");
|
|
3059
|
-
}
|
|
3060
|
-
}
|
|
3061
|
-
}
|
|
3062
|
-
out.write(` }\n`);
|
|
3063
|
-
out.write(`}\n`);
|
|
3064
|
-
out.write(`export function encode${identifier}(GIOPEncoder &encoder, obj: ${identifier}) {\n`);
|
|
3065
|
-
for (let i = 0; i < struct_type.child.length; ++i) {
|
|
3066
|
-
const member = struct_type.child[i];
|
|
3067
|
-
if (member.type === Type.SYN_MEMBER) {
|
|
3068
|
-
let type = member.child[0];
|
|
3069
|
-
let declarators = member.child[1];
|
|
3070
|
-
for (let declarator of declarators.child) {
|
|
3071
|
-
writeIndent(out, indent + 1);
|
|
3072
|
-
out.write(typeIDLtoGIOPTS(type, `obj.${declarator.text}`) + "\n");
|
|
3073
|
-
}
|
|
3074
|
-
}
|
|
3075
|
-
}
|
|
3076
|
-
out.write(`}\n\n`);
|
|
3077
3179
|
}
|
|
3078
3180
|
break;
|
|
3079
3181
|
case Type.TKN_UNION:
|
|
@@ -3113,7 +3215,7 @@ function writeCCInterfaceDefinitions(out, specification, prefix = "", indent = 0
|
|
|
3113
3215
|
writeIndent(out, indent + 3);
|
|
3114
3216
|
out.write(`type: ${case_label.typeParent.text}.${case_label.text},\n`);
|
|
3115
3217
|
writeIndent(out, indent + 3);
|
|
3116
|
-
out.write(`${declarator.text}: ${
|
|
3218
|
+
out.write(`${declarator.text}: ${typeIDLtoGIOPCC(type_spec, undefined, Direction.OUT)}\n`);
|
|
3117
3219
|
writeIndent(out, indent + 2);
|
|
3118
3220
|
out.write(`}\n`);
|
|
3119
3221
|
});
|
|
@@ -3136,7 +3238,7 @@ function writeCCInterfaceDefinitions(out, specification, prefix = "", indent = 0
|
|
|
3136
3238
|
writeIndent(out, indent + 2);
|
|
3137
3239
|
out.write(`case ${case_label.typeParent.text}.${case_label.text}:\n`);
|
|
3138
3240
|
writeIndent(out, indent + 3);
|
|
3139
|
-
out.write(
|
|
3241
|
+
out.write(typeIDLtoGIOPCC(type_spec, `obj.${declarator.text}`, Direction.OUT) + "\n");
|
|
3140
3242
|
writeIndent(out, indent + 3);
|
|
3141
3243
|
out.write(`break\n`);
|
|
3142
3244
|
});
|
|
@@ -3287,129 +3389,6 @@ function writeCCStubDefinitions(out, specification, prefix = "", indent = 0) {
|
|
|
3287
3389
|
}
|
|
3288
3390
|
}
|
|
3289
3391
|
|
|
3290
|
-
function typeIDLtoGIOPCC(type, arg = undefined, direction) {
|
|
3291
|
-
if (type === undefined)
|
|
3292
|
-
throw Error("internal error: parser delivered no type information");
|
|
3293
|
-
let name;
|
|
3294
|
-
switch (type.type) {
|
|
3295
|
-
case Type.TKN_IDENTIFIER:
|
|
3296
|
-
case Type.TKN_MODULE:
|
|
3297
|
-
return typeIDLtoGIOPCC(type.child[0], arg, direction);
|
|
3298
|
-
case Type.TKN_VALUETYPE:
|
|
3299
|
-
return arg === undefined ? `decoder.value("${type.text}")` : `encoder.value(${arg})`;
|
|
3300
|
-
case Type.SYN_INTERFACE:
|
|
3301
|
-
return arg === undefined ? `co_await ${type.text}::_narrow(decoder.readObject(obj->get_ORB()))` : `encoder.writeObject(${arg}.get())`;
|
|
3302
|
-
case Type.TKN_UNION:
|
|
3303
|
-
case Type.TKN_STRUCT: {
|
|
3304
|
-
throw Error("union and struct are not implemented yet");
|
|
3305
|
-
}
|
|
3306
|
-
case Type.TKN_NATIVE:
|
|
3307
|
-
{
|
|
3308
|
-
const id = type.child[0].text;
|
|
3309
|
-
if (id.length > 4 && id.substring(id.length - 4) === "_ptr") {
|
|
3310
|
-
return arg === undefined
|
|
3311
|
-
? `decoder.value("${id.substring(0, id.length - 4)}")`
|
|
3312
|
-
: `encoder.value(${arg})`;
|
|
3313
|
-
}
|
|
3314
|
-
else {
|
|
3315
|
-
return `undefined`;
|
|
3316
|
-
}
|
|
3317
|
-
}
|
|
3318
|
-
case Type.TKN_VOID:
|
|
3319
|
-
name = "Void";
|
|
3320
|
-
break;
|
|
3321
|
-
case Type.TKN_BOOLEAN:
|
|
3322
|
-
name = "Boolean";
|
|
3323
|
-
break;
|
|
3324
|
-
case Type.TKN_CHAR:
|
|
3325
|
-
name = "Char";
|
|
3326
|
-
break;
|
|
3327
|
-
case Type.TKN_OCTET:
|
|
3328
|
-
name = "Octet";
|
|
3329
|
-
break;
|
|
3330
|
-
case Type.TKN_SHORT:
|
|
3331
|
-
name = "Short";
|
|
3332
|
-
break;
|
|
3333
|
-
case Type.TKN_LONG:
|
|
3334
|
-
name = "Long";
|
|
3335
|
-
break;
|
|
3336
|
-
case Type.SYN_LONGLONG:
|
|
3337
|
-
name = "Longlong";
|
|
3338
|
-
break;
|
|
3339
|
-
case Type.SYN_UNSIGNED_SHORT:
|
|
3340
|
-
name = "Ushort";
|
|
3341
|
-
break;
|
|
3342
|
-
case Type.SYN_UNSIGNED_LONG:
|
|
3343
|
-
name = "Ulong";
|
|
3344
|
-
break;
|
|
3345
|
-
case Type.SYN_UNSIGNED_LONGLONG:
|
|
3346
|
-
name = "Ulonglong";
|
|
3347
|
-
break;
|
|
3348
|
-
case Type.TKN_FLOAT:
|
|
3349
|
-
name = "Float";
|
|
3350
|
-
break;
|
|
3351
|
-
case Type.TKN_DOUBLE:
|
|
3352
|
-
name = "Double";
|
|
3353
|
-
break;
|
|
3354
|
-
case Type.SYN_LONG_DOUBLE:
|
|
3355
|
-
name = "LongDouble";
|
|
3356
|
-
break;
|
|
3357
|
-
case Type.TKN_STRING:
|
|
3358
|
-
switch (direction) {
|
|
3359
|
-
case Direction.IN:
|
|
3360
|
-
return arg === undefined ? `decoder.readStringView()` : `encoder.writeString(${arg})`;
|
|
3361
|
-
case Direction.OUT:
|
|
3362
|
-
return arg === undefined ? `decoder.readString()` : `encoder.writeString(${arg})`;
|
|
3363
|
-
}
|
|
3364
|
-
throw Error("yikes");
|
|
3365
|
-
case Type.TKN_ENUM:
|
|
3366
|
-
return arg === undefined ? `static_cast<${type.text}>(decoder.readUlong())` : `encoder.writeUlong(std::to_underlying(${arg}))`;
|
|
3367
|
-
case Type.TKN_SEQUENCE:
|
|
3368
|
-
switch (type.child[0].type) {
|
|
3369
|
-
case Type.TKN_OCTET: {
|
|
3370
|
-
switch (direction) {
|
|
3371
|
-
case Direction.IN:
|
|
3372
|
-
return arg === undefined ? `decoder.readBlobView()` : `encoder.writeBlob(${arg})`;
|
|
3373
|
-
case Direction.OUT:
|
|
3374
|
-
return arg === undefined ? `decoder.readBlob()` : `encoder.writeBlob(${arg})`;
|
|
3375
|
-
}
|
|
3376
|
-
}
|
|
3377
|
-
case Type.TKN_FLOAT: {
|
|
3378
|
-
switch (direction) {
|
|
3379
|
-
case Direction.IN:
|
|
3380
|
-
return arg === undefined ? `decoder.readSequenceSpanFloat()` : `encoder.writeSequence(${arg})`;
|
|
3381
|
-
case Direction.OUT:
|
|
3382
|
-
return arg === undefined ? `decoder.readSequenceVectorFloat()` : `encoder.writeSequence(${arg})`;
|
|
3383
|
-
}
|
|
3384
|
-
}
|
|
3385
|
-
case Type.TKN_DOUBLE: {
|
|
3386
|
-
switch (direction) {
|
|
3387
|
-
case Direction.IN:
|
|
3388
|
-
return arg === undefined ? `decoder.readSequenceSpanDouble()` : `encoder.writeSequence(${arg})`;
|
|
3389
|
-
case Direction.OUT:
|
|
3390
|
-
return arg === undefined ? `decoder.readSequenceVectorDouble()` : `encoder.writeSequence(${arg})`;
|
|
3391
|
-
}
|
|
3392
|
-
}
|
|
3393
|
-
case Type.TKN_STRING:
|
|
3394
|
-
switch (direction) {
|
|
3395
|
-
case Direction.IN:
|
|
3396
|
-
return arg === undefined
|
|
3397
|
-
? `decoder.readSequenceVector<std::string_view>([&] { return decoder.readStringView(); })`
|
|
3398
|
-
: `encoder.writeSequence<std::string_view>(${arg}, [&](auto item) { encoder.writeString(item);})`;
|
|
3399
|
-
case Direction.OUT:
|
|
3400
|
-
return arg === undefined
|
|
3401
|
-
? `decoder.readSequenceVector<std::string>([&] { return decoder.readString(); })`
|
|
3402
|
-
: `encoder.writeSequence<std::string>(${arg}, [&](auto item) { encoder.writeString(item);})`;
|
|
3403
|
-
}
|
|
3404
|
-
}
|
|
3405
|
-
throw Error(`this sequence type is not implemented yet`);
|
|
3406
|
-
default:
|
|
3407
|
-
type.printTree();
|
|
3408
|
-
throw Error(`no mapping from IDL type '${type.toString()}' to GIOP encoder/decoder`);
|
|
3409
|
-
}
|
|
3410
|
-
return arg === undefined ? `decoder.read${name}()` : `encoder.write${name}(${arg})`;
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
3392
|
function writeCCCode(specification) {
|
|
3414
3393
|
let out = fs__namespace.createWriteStream(filenamePrefix + ".cc");
|
|
3415
3394
|
out.write("// This file is generated by the corba.js IDL compiler from '" + filename + "'.\n\n");
|
|
@@ -3610,6 +3589,38 @@ function writeCCCodeDefinitions(out, specification, prefix = "", indent = 0) {
|
|
|
3610
3589
|
out.write(`}\n\n`);
|
|
3611
3590
|
}
|
|
3612
3591
|
break;
|
|
3592
|
+
case Type.TKN_STRUCT: {
|
|
3593
|
+
let struct_type = definition;
|
|
3594
|
+
let identifier = struct_type.text;
|
|
3595
|
+
out.write(`static ${identifier} _decode${identifier}(CORBA::GIOPDecoder &decoder) {\n`);
|
|
3596
|
+
out.write(` return {\n`);
|
|
3597
|
+
for (let i = 0; i < struct_type.child.length; ++i) {
|
|
3598
|
+
const member = struct_type.child[i];
|
|
3599
|
+
if (member.type === Type.SYN_MEMBER) {
|
|
3600
|
+
let type = member.child[0];
|
|
3601
|
+
let declarators = member.child[1];
|
|
3602
|
+
for (let declarator of declarators.child) {
|
|
3603
|
+
writeIndent(out, indent + 2);
|
|
3604
|
+
out.write("." + declarator.text + " = " + typeIDLtoGIOPCC(type, undefined, Direction.OUT) + ",\n");
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
}
|
|
3608
|
+
out.write(` };\n`);
|
|
3609
|
+
out.write(`}\n`);
|
|
3610
|
+
out.write(`static void _encode${identifier}(CORBA::GIOPEncoder &encoder, const ${identifier} &obj) {\n`);
|
|
3611
|
+
for (let i = 0; i < struct_type.child.length; ++i) {
|
|
3612
|
+
const member = struct_type.child[i];
|
|
3613
|
+
if (member.type === Type.SYN_MEMBER) {
|
|
3614
|
+
let type = member.child[0];
|
|
3615
|
+
let declarators = member.child[1];
|
|
3616
|
+
for (let declarator of declarators.child) {
|
|
3617
|
+
writeIndent(out, indent + 1);
|
|
3618
|
+
out.write(typeIDLtoGIOPCC(type, `obj.${declarator.text}`, Direction.OUT) + ";\n");
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
out.write(`}\n`);
|
|
3623
|
+
}
|
|
3613
3624
|
}
|
|
3614
3625
|
}
|
|
3615
3626
|
}
|