@intend-it/parser 1.1.6 → 1.2.1
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/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9263,6 +9263,10 @@ class IntendParser extends CstParser {
|
|
|
9263
9263
|
this.CONSUME3(Identifier, { LABEL: "GenericType" });
|
|
9264
9264
|
this.CONSUME(GreaterThan);
|
|
9265
9265
|
});
|
|
9266
|
+
this.OPTION5(() => {
|
|
9267
|
+
this.CONSUME(LBracket);
|
|
9268
|
+
this.CONSUME(RBracket);
|
|
9269
|
+
});
|
|
9266
9270
|
this.CONSUME(LCurly);
|
|
9267
9271
|
this.SUBRULE(this.body);
|
|
9268
9272
|
this.CONSUME(RCurly);
|
|
@@ -9530,7 +9534,8 @@ class IntendASTVisitor extends BaseIntendVisitor {
|
|
|
9530
9534
|
extractReturnType(ctx) {
|
|
9531
9535
|
const base = ctx.ReturnType[0].image;
|
|
9532
9536
|
const generic = ctx.GenericType ? ctx.GenericType[0].image : undefined;
|
|
9533
|
-
|
|
9537
|
+
const isArray2 = !!(ctx.LBracket && ctx.LBracket.length > 0);
|
|
9538
|
+
return { base, generic, isArray: isArray2 };
|
|
9534
9539
|
}
|
|
9535
9540
|
unquoteString(str) {
|
|
9536
9541
|
return str.slice(1, -1);
|