@abaplint/cli 2.105.13 → 2.105.14

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 (2) hide show
  1. package/build/cli.js +83 -68
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -21374,11 +21374,10 @@ class CurrentScope {
21374
21374
  this.addNamedIdentifier(identifier.getName(), identifier);
21375
21375
  }
21376
21376
  addDeferred(token) {
21377
- var _a;
21378
21377
  if (token === undefined) {
21379
21378
  return;
21380
21379
  }
21381
- (_a = this.current) === null || _a === void 0 ? void 0 : _a.getData().deferred.push(token);
21380
+ this.current.getData().deferred[token.getStr().toUpperCase()] = token;
21382
21381
  }
21383
21382
  addListPrefix(identifiers, prefix) {
21384
21383
  for (const id of identifiers) {
@@ -21683,6 +21682,7 @@ const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node
21683
21682
  const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
21684
21683
  const visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
21685
21684
  // todo, think some of the public methods can be made private
21685
+ // todo: changet this class to static? for performance
21686
21686
  class ObjectOriented {
21687
21687
  constructor(scope) {
21688
21688
  this.scope = scope;
@@ -23347,7 +23347,7 @@ class BasicTypes {
23347
23347
  }
23348
23348
  // todo, rewrite this method
23349
23349
  resolveTypeChain(expr) {
23350
- var _a;
23350
+ var _a, _b, _c, _d;
23351
23351
  const chainText = expr.concatTokens().toUpperCase();
23352
23352
  if (chainText.includes("-")) {
23353
23353
  // workaround for stuff like "sy-repid"
@@ -23386,7 +23386,10 @@ class BasicTypes {
23386
23386
  if (foundType === undefined) {
23387
23387
  return new Types.UnknownType("Could not resolve type " + chainText);
23388
23388
  }
23389
- this.scope.addReference(expr.getTokens()[2], foundId, _reference_1.ReferenceType.TypeReference, this.filename);
23389
+ const token = (_a = expr.getChildren()[2]) === null || _a === void 0 ? void 0 : _a.getFirstToken();
23390
+ if (token) {
23391
+ this.scope.addReference(token, foundId, _reference_1.ReferenceType.TypeReference, this.filename);
23392
+ }
23390
23393
  }
23391
23394
  else {
23392
23395
  // lookup in local and global scope
@@ -23405,7 +23408,10 @@ class BasicTypes {
23405
23408
  if (byName === undefined || foundType === undefined) {
23406
23409
  return new Types.UnknownType(subs[0] + " not found in class or interface");
23407
23410
  }
23408
- this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);
23411
+ const token = (_b = expr.getChildren()[2]) === null || _b === void 0 ? void 0 : _b.getFirstToken();
23412
+ if (token) {
23413
+ this.scope.addReference(token, byName, _reference_1.ReferenceType.TypeReference, this.filename);
23414
+ }
23409
23415
  }
23410
23416
  }
23411
23417
  else if (className && chainText.includes("->")) {
@@ -23431,7 +23437,10 @@ class BasicTypes {
23431
23437
  if (byName === undefined || foundType === undefined) {
23432
23438
  return new Types.UnknownType(typeName + " not found in class or interface");
23433
23439
  }
23434
- this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);
23440
+ const token = (_c = expr.getChildren()[2]) === null || _c === void 0 ? void 0 : _c.getFirstToken();
23441
+ if (token) {
23442
+ this.scope.addReference(token, byName, _reference_1.ReferenceType.TypeReference, this.filename);
23443
+ }
23435
23444
  }
23436
23445
  else {
23437
23446
  return new Types.UnknownType("Not an object reference, " + className + ", " + id.constructor.name);
@@ -23448,7 +23457,7 @@ class BasicTypes {
23448
23457
  const found = this.scope.findType(subs[0]);
23449
23458
  foundType = found === null || found === void 0 ? void 0 : found.getType();
23450
23459
  if (foundType === undefined) {
23451
- const typePoolType = (_a = this.scope.findTypePoolType(subs[0])) === null || _a === void 0 ? void 0 : _a.getType();
23460
+ const typePoolType = (_d = this.scope.findTypePoolType(subs[0])) === null || _d === void 0 ? void 0 : _d.getType();
23452
23461
  if (typePoolType) {
23453
23462
  // this.scope.addReference(typeName.getFirstToken(), typePoolType, ReferenceType.TypeReference, this.filename);
23454
23463
  foundType = typePoolType;
@@ -23576,7 +23585,7 @@ class BasicTypes {
23576
23585
  return undefined;
23577
23586
  }
23578
23587
  const name = chain.getFirstToken().getStr();
23579
- if (chain.getAllTokens().length === 1) {
23588
+ if (chain.getChildren().length === 1) {
23580
23589
  if (name.toUpperCase() === "OBJECT") {
23581
23590
  return new Types.GenericObjectReferenceType();
23582
23591
  }
@@ -24267,14 +24276,15 @@ class Constant {
24267
24276
  if (node.findDirectExpression(expressions_1.Integer)) {
24268
24277
  return basic_1.IntegerType.get({ derivedFromConstant: true });
24269
24278
  }
24270
- else if (node.getFirstToken().getStr().startsWith("'")) {
24271
- let len = node.getFirstToken().getStr().length - 2;
24279
+ const first = node.getFirstToken().getStr();
24280
+ if (first.startsWith("'")) {
24281
+ let len = first.length - 2;
24272
24282
  if (len <= 0) {
24273
24283
  len = 1;
24274
24284
  }
24275
24285
  return new basic_1.CharacterType(len, { derivedFromConstant: true });
24276
24286
  }
24277
- else if (node.getFirstToken().getStr().startsWith("`")) {
24287
+ else if (first.startsWith("`")) {
24278
24288
  return basic_1.StringType.get({ derivedFromConstant: true });
24279
24289
  }
24280
24290
  else {
@@ -24604,11 +24614,10 @@ const source_field_1 = __webpack_require__(/*! ./source_field */ "./node_modules
24604
24614
  class FieldChain {
24605
24615
  runSyntax(node, scope, filename, refType) {
24606
24616
  var _a, _b, _c, _d, _e;
24607
- const children = node.getChildren().slice();
24608
- let contextName = children[0].concatTokens();
24617
+ const children = node.getChildren();
24609
24618
  let context = undefined;
24610
24619
  try {
24611
- context = this.findTop(children.shift(), scope, filename, refType);
24620
+ context = this.findTop(children[0], scope, filename, refType);
24612
24621
  }
24613
24622
  catch (error) {
24614
24623
  const concat = node.concatTokens();
@@ -24627,9 +24636,8 @@ class FieldChain {
24627
24636
  }
24628
24637
  throw error;
24629
24638
  }
24630
- while (children.length > 0) {
24631
- contextName += children[0].concatTokens();
24632
- const current = children.shift();
24639
+ for (let i = 1; i < children.length; i++) {
24640
+ const current = children[i];
24633
24641
  if (current === undefined) {
24634
24642
  break;
24635
24643
  }
@@ -24644,7 +24652,11 @@ class FieldChain {
24644
24652
  && !(context instanceof basic_1.TableType && context.isWithHeader())
24645
24653
  && !(context instanceof basic_1.VoidType)) {
24646
24654
  if (context instanceof basic_1.TableType && context.isWithHeader() === false) {
24647
- if (scope.isAllowHeaderUse(contextName.substring(0, contextName.length - 1))) {
24655
+ let contextName = "";
24656
+ for (let j = 0; j < i; j++) {
24657
+ contextName += children[j].concatTokens();
24658
+ }
24659
+ if (scope.isAllowHeaderUse(contextName)) {
24648
24660
  // FOR ALL ENTRIES workaround
24649
24661
  context = context.getRowType();
24650
24662
  if (!(context instanceof basic_1.StructureType) && !(context instanceof basic_1.VoidType)) {
@@ -25429,7 +25441,7 @@ class MethodCallChain {
25429
25441
  if (first.get() instanceof Expressions.MethodCall) {
25430
25442
  children.unshift(first);
25431
25443
  }
25432
- let previous = "";
25444
+ let previous = undefined;
25433
25445
  while (children.length > 0) {
25434
25446
  const current = children.shift();
25435
25447
  if (current === undefined) {
@@ -25450,7 +25462,7 @@ class MethodCallChain {
25450
25462
  }
25451
25463
  }
25452
25464
  else {
25453
- if (previous === "=>" && (method === null || method === void 0 ? void 0 : method.isStatic()) === false) {
25465
+ if (previous && previous.getFirstToken().getStr() === "=>" && (method === null || method === void 0 ? void 0 : method.isStatic()) === false) {
25454
25466
  throw new Error("Method \"" + methodName + "\" not static");
25455
25467
  }
25456
25468
  const extra = {
@@ -25490,7 +25502,7 @@ class MethodCallChain {
25490
25502
  else if (current instanceof nodes_1.ExpressionNode && current.get() instanceof Expressions.AttributeName) {
25491
25503
  context = new attribute_name_1.AttributeName().runSyntax(context, current, scope, filename);
25492
25504
  }
25493
- previous = current.concatTokens();
25505
+ previous = current;
25494
25506
  }
25495
25507
  return context;
25496
25508
  }
@@ -27820,7 +27832,7 @@ class ScopeData {
27820
27832
  forms: [], // todo, refactor to object
27821
27833
  types: {},
27822
27834
  extraLikeTypes: {},
27823
- deferred: [],
27835
+ deferred: {},
27824
27836
  references: [],
27825
27837
  sqlConversion: [],
27826
27838
  };
@@ -27866,10 +27878,9 @@ class SpaghettiScopeNode extends ScopeData {
27866
27878
  findDeferred(name) {
27867
27879
  let search = this;
27868
27880
  while (search !== undefined) {
27869
- for (const d of search.getData().deferred) {
27870
- if (d.getStr().toUpperCase() === name.toUpperCase()) {
27871
- return new _identifier_1.Identifier(d, search.identifier.filename);
27872
- }
27881
+ const found = search.getData().deferred[name.toUpperCase()];
27882
+ if (found) {
27883
+ return new _identifier_1.Identifier(found, search.identifier.filename);
27873
27884
  }
27874
27885
  search = search.getParent();
27875
27886
  }
@@ -28364,25 +28375,26 @@ exports.AuthorityCheck = AuthorityCheck;
28364
28375
 
28365
28376
  Object.defineProperty(exports, "__esModule", ({ value: true }));
28366
28377
  exports.Call = void 0;
28367
- const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
28378
+ const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
28368
28379
  const method_call_chain_1 = __webpack_require__(/*! ../expressions/method_call_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_chain.js");
28369
28380
  const method_source_1 = __webpack_require__(/*! ../expressions/method_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_source.js");
28370
28381
  const method_call_body_1 = __webpack_require__(/*! ../expressions/method_call_body */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_body.js");
28371
28382
  const void_type_1 = __webpack_require__(/*! ../../types/basic/void_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js");
28372
28383
  class Call {
28373
28384
  runSyntax(node, scope, filename) {
28374
- const chain = node.findDirectExpression(Expressions.MethodCallChain);
28375
- if (chain) {
28376
- new method_call_chain_1.MethodCallChain().runSyntax(chain, scope, filename);
28385
+ const children = node.getChildren();
28386
+ if (children.length === 2) {
28387
+ const first = children[0];
28388
+ new method_call_chain_1.MethodCallChain().runSyntax(first, scope, filename);
28377
28389
  return;
28378
28390
  }
28379
- const methodSource = node.findDirectExpression(Expressions.MethodSource);
28391
+ const methodSource = children[2];
28380
28392
  if (methodSource === undefined) {
28381
28393
  throw new Error("Call, child MethodSource not found");
28382
28394
  }
28383
28395
  const methodDef = new method_source_1.MethodSource().runSyntax(methodSource, scope, filename);
28384
- const body = node.findDirectExpression(Expressions.MethodCallBody);
28385
- if (body) {
28396
+ const body = children[3];
28397
+ if (body instanceof nodes_1.ExpressionNode) {
28386
28398
  // todo, resolve the method definition above and pass, if possible, in case of dynamic pass void
28387
28399
  new method_call_body_1.MethodCallBody().runSyntax(body, scope, filename, methodDef || new void_type_1.VoidType("CallTODO"));
28388
28400
  }
@@ -34554,6 +34566,7 @@ class ExpressionNode extends _abstract_node_1.AbstractNode {
34554
34566
  }
34555
34567
  return str;
34556
34568
  }
34569
+ // todo: delete this method?, its slow
34557
34570
  getTokens() {
34558
34571
  const tokens = [];
34559
34572
  for (const c of this.getChildren()) {
@@ -34650,8 +34663,9 @@ class ExpressionNode extends _abstract_node_1.AbstractNode {
34650
34663
  return ret;
34651
34664
  }
34652
34665
  findDirectTokenByText(text) {
34666
+ const search = text.toUpperCase();
34653
34667
  for (const child of this.getChildren()) {
34654
- if (child instanceof token_node_1.TokenNode && child.get().getStr().toUpperCase() === text.toUpperCase()) {
34668
+ if (child instanceof token_node_1.TokenNode && child.get().getStr().toUpperCase() === search) {
34655
34669
  return child.get();
34656
34670
  }
34657
34671
  }
@@ -37279,29 +37293,29 @@ class ClassDefinition extends _identifier_1.Identifier {
37279
37293
  const name = def.findDirectExpression(Expressions.ClassName).getFirstToken();
37280
37294
  super(name, filename);
37281
37295
  scope.addClassDefinition(this);
37282
- this.node = node;
37283
37296
  this.events = [];
37284
37297
  this.implementing = [];
37298
+ this.globalValue = def.findFirstExpression(Expressions.ClassGlobal) !== undefined;
37299
+ this.finalValue = def.findFirstExpression(Expressions.ClassFinal) !== undefined;
37285
37300
  scope.push(_scope_type_1.ScopeType.ClassDefinition, name.getStr(), name.getStart(), filename);
37286
37301
  this.superClass = this.findSuper(def, filename, scope);
37287
37302
  this.friends = this.findFriends(def, filename, scope);
37288
- this.parse(filename, scope);
37303
+ this.parse(filename, scope, node);
37289
37304
  const helper = new _object_oriented_1.ObjectOriented(scope);
37290
37305
  helper.fromSuperClassesAndInterfaces(this);
37291
37306
  helper.addAliasedTypes(this.aliases);
37292
- this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);
37307
+ this.attributes = new class_attributes_1.Attributes(node, this.filename, scope);
37293
37308
  this.types = this.attributes.getTypes();
37294
- const events = this.node.findAllStatements(Statements.Events);
37309
+ const events = node.findAllStatements(Statements.Events);
37295
37310
  for (const e of events) {
37296
37311
  this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope)); // todo, all these are not Public
37297
37312
  }
37298
- this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);
37313
+ this.methodDefs = new method_definitions_1.MethodDefinitions(node, this.filename, scope);
37299
37314
  scope.pop(node.getLastToken().getEnd());
37300
- const cdef = this.node.findFirstStatement(Statements.ClassDefinition);
37301
- const concat = cdef.concatTokens().toUpperCase();
37315
+ const concat = def.concatTokens().toUpperCase();
37302
37316
  this.testing = concat.includes(" FOR TESTING");
37303
37317
  this.sharedMemory = concat.includes(" SHARED MEMORY ENABLED");
37304
- this.abstract = (cdef === null || cdef === void 0 ? void 0 : cdef.findDirectTokenByText("ABSTRACT")) !== undefined;
37318
+ this.abstract = (def === null || def === void 0 ? void 0 : def.findDirectTokenByText("ABSTRACT")) !== undefined;
37305
37319
  // perform checks after everything has been initialized
37306
37320
  this.checkMethodsFromSuperClasses(scope);
37307
37321
  }
@@ -37324,10 +37338,10 @@ class ClassDefinition extends _identifier_1.Identifier {
37324
37338
  return this.attributes;
37325
37339
  }
37326
37340
  isGlobal() {
37327
- return this.node.findFirstExpression(Expressions.ClassGlobal) !== undefined;
37341
+ return this.globalValue;
37328
37342
  }
37329
37343
  isFinal() {
37330
- return this.node.findFirstExpression(Expressions.ClassFinal) !== undefined;
37344
+ return this.finalValue;
37331
37345
  }
37332
37346
  getImplementing() {
37333
37347
  return this.implementing;
@@ -37406,10 +37420,10 @@ class ClassDefinition extends _identifier_1.Identifier {
37406
37420
  }
37407
37421
  }
37408
37422
  }
37409
- parse(filename, scope) {
37423
+ parse(filename, scope, inputNode) {
37410
37424
  var _a;
37411
- for (const node of this.node.findAllStatements(Statements.InterfaceDef)) {
37412
- const partial = node.concatTokens().toUpperCase().includes(" PARTIALLY IMPLEMENTED");
37425
+ for (const node of inputNode.findAllStatements(Statements.InterfaceDef)) {
37426
+ const partial = node.findDirectTokenByText("PARTIALLY") !== undefined;
37413
37427
  const token = (_a = node.findFirstExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
37414
37428
  if (token === undefined) {
37415
37429
  throw new Error("ClassDefinition, unable to find interface token");
@@ -37427,7 +37441,7 @@ class ClassDefinition extends _identifier_1.Identifier {
37427
37441
  scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedUnknownReference, filename, { ooName: name.toUpperCase(), ooType: "INTF" });
37428
37442
  }
37429
37443
  }
37430
- this.aliases = new aliases_1.Aliases(this.node, this.filename, scope);
37444
+ this.aliases = new aliases_1.Aliases(inputNode, this.filename, scope);
37431
37445
  }
37432
37446
  }
37433
37447
  exports.ClassDefinition = ClassDefinition;
@@ -37790,11 +37804,11 @@ class InterfaceDefinition extends _identifier_1.Identifier {
37790
37804
  const name = node.findFirstStatement(Statements.Interface).findFirstExpression(Expressions.InterfaceName).getFirstToken();
37791
37805
  super(name, filename);
37792
37806
  scope.addInterfaceDefinition(this);
37793
- this.node = node;
37794
37807
  this.events = [];
37795
37808
  this.implementing = [];
37809
+ this.globalValue = node.findFirstExpression(Expressions.ClassGlobal) !== undefined;
37796
37810
  scope.push(_scope_type_1.ScopeType.Interface, name.getStr(), node.getFirstToken().getStart(), filename);
37797
- this.parse(scope, filename);
37811
+ this.parse(scope, filename, node);
37798
37812
  scope.pop(node.getLastToken().getEnd());
37799
37813
  }
37800
37814
  getSuperClass() {
@@ -37816,21 +37830,21 @@ class InterfaceDefinition extends _identifier_1.Identifier {
37816
37830
  return this.typeDefinitions;
37817
37831
  }
37818
37832
  isLocal() {
37819
- return !this.isGlobal();
37833
+ return !this.globalValue;
37820
37834
  }
37821
37835
  isGlobal() {
37822
- return this.node.findFirstExpression(Expressions.ClassGlobal) !== undefined;
37836
+ return this.globalValue;
37823
37837
  }
37824
37838
  getMethodDefinitions() {
37825
37839
  return this.methodDefinitions;
37826
37840
  }
37827
37841
  /////////////////
37828
- parse(scope, filename) {
37842
+ parse(scope, filename, node) {
37829
37843
  var _a;
37830
37844
  // todo, proper sequencing, the statements should be processed line by line
37831
- this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);
37845
+ this.attributes = new class_attributes_1.Attributes(node, this.filename, scope);
37832
37846
  this.typeDefinitions = this.attributes.getTypes();
37833
- this.aliases = new aliases_1.Aliases(this.node, this.filename, scope);
37847
+ this.aliases = new aliases_1.Aliases(node, this.filename, scope);
37834
37848
  // todo, cleanup aliases, vs "object_oriented.ts" vs "class_implementation.ts"
37835
37849
  for (const a of this.aliases.getAll()) {
37836
37850
  const [objName, fieldName] = a.getComponent().split("~");
@@ -37851,15 +37865,15 @@ class InterfaceDefinition extends _identifier_1.Identifier {
37851
37865
  }
37852
37866
  }
37853
37867
  }
37854
- this.methodDefinitions = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);
37868
+ this.methodDefinitions = new method_definitions_1.MethodDefinitions(node, this.filename, scope);
37855
37869
  if (this.methodDefinitions.getByName("CONSTRUCTOR") !== undefined) {
37856
37870
  throw new Error("Interfaces cannot have constructor methods");
37857
37871
  }
37858
- const events = this.node.findAllStatements(Statements.Events);
37872
+ const events = node.findAllStatements(Statements.Events);
37859
37873
  for (const e of events) {
37860
37874
  this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope));
37861
37875
  }
37862
- for (const i of this.node.findAllStatements(Statements.InterfaceDef)) {
37876
+ for (const i of node.findAllStatements(Statements.InterfaceDef)) {
37863
37877
  const token = (_a = i.findDirectExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
37864
37878
  const name = token === null || token === void 0 ? void 0 : token.getStr();
37865
37879
  if (name) {
@@ -38285,7 +38299,7 @@ class MethodParameters {
38285
38299
  const importing = node.findFirstExpression(Expressions.MethodDefImporting);
38286
38300
  if (importing) {
38287
38301
  this.add(this.importing, importing, scope, ["importing" /* IdentifierMeta.MethodImporting */], abstractMethod);
38288
- if (importing.concatTokens().toUpperCase().includes(" PREFERRED PARAMETER")) {
38302
+ if (importing.findDirectTokenByText("PREFERRED")) {
38289
38303
  this.preferred = importing.getLastToken().getStr().toUpperCase();
38290
38304
  if (this.preferred.startsWith("!")) {
38291
38305
  this.preferred = this.preferred.substring(1);
@@ -38316,10 +38330,11 @@ class MethodParameters {
38316
38330
  }
38317
38331
  this.importing.push(new _typed_identifier_1.TypedIdentifier(foo.getFirstToken(), filename, new basic_1.VoidType("RapMethodParameter"), ["importing" /* IdentifierMeta.MethodImporting */]));
38318
38332
  }
38319
- if (node.concatTokens().toUpperCase().includes(" FOR VALIDATE ")
38320
- || node.concatTokens().toUpperCase().includes(" FOR BEHAVIOR ")
38321
- || node.concatTokens().toUpperCase().includes(" FOR FEATURES ")
38322
- || node.concatTokens().toUpperCase().includes(" FOR MODIFY ")) {
38333
+ const concat = node.concatTokens().toUpperCase();
38334
+ if (concat.includes(" FOR VALIDATE ")
38335
+ || concat.includes(" FOR BEHAVIOR ")
38336
+ || concat.includes(" FOR FEATURES ")
38337
+ || concat.includes(" FOR MODIFY ")) {
38323
38338
  const token = isRap.getFirstToken();
38324
38339
  this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
38325
38340
  this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "mapped"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
@@ -38345,14 +38360,14 @@ class MethodParameters {
38345
38360
  }
38346
38361
  }
38347
38362
  add(target, source, scope, meta, abstractMethod) {
38348
- var _a;
38363
+ var _a, _b;
38349
38364
  for (const opt of source.findAllExpressions(Expressions.MethodParamOptional)) {
38350
38365
  const p = opt.findDirectExpression(Expressions.MethodParam);
38351
38366
  if (p === undefined) {
38352
38367
  continue;
38353
38368
  }
38354
38369
  const extraMeta = [];
38355
- if (opt.concatTokens().toUpperCase().startsWith("VALUE(")) {
38370
+ if (p.getFirstToken().getStr().toUpperCase() === "VALUE" && ((_a = p.getChildren()[1]) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr()) === "(") {
38356
38371
  extraMeta.push("pass_by_value" /* IdentifierMeta.PassByValue */);
38357
38372
  }
38358
38373
  else if (meta.includes("importing" /* IdentifierMeta.MethodImporting */)) {
@@ -38364,14 +38379,14 @@ class MethodParameters {
38364
38379
  const id = new method_param_1.MethodParam().runSyntax(p, scope, this.filename, [...meta, ...extraMeta]);
38365
38380
  scope.addIdentifier(id);
38366
38381
  target.push(id);
38367
- if (opt.getLastToken().getStr().toUpperCase() === "OPTIONAL") {
38382
+ if (opt.findDirectTokenByText("OPTIONAL")) {
38368
38383
  const name = target[target.length - 1].getName().toUpperCase();
38369
38384
  this.optional.push(name);
38370
38385
  }
38371
38386
  else if (opt.findFirstExpression(Expressions.Default)) {
38372
38387
  const name = target[target.length - 1].getName().toUpperCase();
38373
38388
  this.optional.push(name);
38374
- const val = (_a = opt.findFirstExpression(Expressions.Default)) === null || _a === void 0 ? void 0 : _a.getLastChild();
38389
+ const val = (_b = opt.findFirstExpression(Expressions.Default)) === null || _b === void 0 ? void 0 : _b.getLastChild();
38375
38390
  if (val && val instanceof nodes_1.ExpressionNode) {
38376
38391
  this.defaults[name] = val;
38377
38392
  }
@@ -51147,7 +51162,7 @@ class Registry {
51147
51162
  }
51148
51163
  static abaplintVersion() {
51149
51164
  // magic, see build script "version.sh"
51150
- return "2.105.13";
51165
+ return "2.105.14";
51151
51166
  }
51152
51167
  getDDICReferences() {
51153
51168
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.105.13",
3
+ "version": "2.105.14",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.105.13",
41
+ "@abaplint/core": "^2.105.14",
42
42
  "@types/chai": "^4.3.11",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.6",
46
- "@types/node": "^20.11.6",
46
+ "@types/node": "^20.11.9",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.4.1",
49
49
  "chalk": "^5.3.0",