@abapify/abap-ast 0.4.16 → 0.4.19

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.d.mts CHANGED
@@ -1,10 +1,7 @@
1
- //#region src/nodes/errors.d.ts
2
1
  declare class AbapAstError extends Error {
3
2
  constructor(message: string);
4
3
  }
5
4
  declare function requireField<T>(value: T | undefined | null, field: string, nodeKind: string): T;
6
- //#endregion
7
- //#region src/nodes/base.d.ts
8
5
  /** All node kinds in the AST. */
9
6
  type NodeKind = 'BuiltinType' | 'TableType' | 'StructureType' | 'NamedTypeRef' | 'EnumType' | 'TypeDef' | 'DataDecl' | 'ConstantDecl' | 'FieldSymbolDecl' | 'Assign' | 'Call' | 'Raise' | 'If' | 'Loop' | 'Return' | 'Try' | 'Append' | 'Insert' | 'Read' | 'Clear' | 'Exit' | 'Continue' | 'Raw' | 'Literal' | 'IdentifierExpr' | 'ConstructorExpr' | 'MethodCallExpr' | 'BinOp' | 'StringTemplate' | 'Cast' | 'MethodParam' | 'MethodDef' | 'MethodImpl' | 'EventDef' | 'AttributeDef' | 'Section' | 'ClassDef' | 'LocalClassDef' | 'InterfaceDef' | 'Comment';
10
7
  /**
@@ -37,8 +34,6 @@ declare function comment(input: {
37
34
  }): Comment;
38
35
  /** Visibility modifier for class members / sections. */
39
36
  type Visibility = 'public' | 'protected' | 'private';
40
- //#endregion
41
- //#region src/nodes/types.d.ts
42
37
  /** ABAP builtin type names allowed in the AST. */
43
38
  type BuiltinTypeName = 'i' | 'int8' | 'f' | 'decfloat34' | 'd' | 't' | 'timestampl' | 'string' | 'xstring' | 'abap_bool' | 'sysuuid_x16';
44
39
  interface BuiltinType extends AbapNode {
@@ -114,8 +109,6 @@ declare function typeDef(input: {
114
109
  type: TypeRef | EnumType;
115
110
  abapDoc?: AbapDoc;
116
111
  }): TypeDef;
117
- //#endregion
118
- //#region src/nodes/expressions.d.ts
119
112
  /** An expression node (forward-declared union). */
120
113
  type Expression = Literal | IdentifierExpr | ConstructorExpr | MethodCallExpr | BinOp | StringTemplate | Cast;
121
114
  /** A literal value. */
@@ -204,8 +197,6 @@ declare function cast(input: {
204
197
  type: TypeRef;
205
198
  expr: Expression;
206
199
  }): Cast;
207
- //#endregion
208
- //#region src/nodes/data.d.ts
209
200
  /** `DATA lv_x TYPE ... [VALUE ...]`. */
210
201
  interface DataDecl extends AbapNode {
211
202
  readonly kind: 'DataDecl';
@@ -244,8 +235,6 @@ declare function fieldSymbolDecl(input: {
244
235
  name: Identifier;
245
236
  type: TypeRef;
246
237
  }): FieldSymbolDecl;
247
- //#endregion
248
- //#region src/nodes/statements.d.ts
249
238
  /** Union of all statement node types. */
250
239
  type Statement = Assign | Call | Raise | If | Loop | Return | Try | Append | Insert | Read | Clear | Exit | Continue | Raw | Comment | DataDecl | FieldSymbolDecl;
251
240
  /** `target = value`. */
@@ -420,8 +409,6 @@ interface Raw extends AbapNode {
420
409
  declare function raw(input: {
421
410
  source: string;
422
411
  }): Raw;
423
- //#endregion
424
- //#region src/nodes/members.d.ts
425
412
  /** ABAP method parameter kind. */
426
413
  type ParamKind = 'importing' | 'exporting' | 'changing' | 'returning';
427
414
  interface MethodParam extends AbapNode {
@@ -504,8 +491,6 @@ declare function attributeDef(input: {
504
491
  initial?: Expression;
505
492
  abapDoc?: AbapDoc;
506
493
  }): AttributeDef;
507
- //#endregion
508
- //#region src/nodes/class.d.ts
509
494
  /** A member that may appear inside a class section. */
510
495
  type SectionMember = TypeDef | AttributeDef | MethodDef | ConstantDecl | EventDef;
511
496
  /** A visibility section of a class definition. */
@@ -566,8 +551,6 @@ declare function localClassDef(input: {
566
551
  sections?: readonly Section[];
567
552
  implementations?: readonly MethodImpl[];
568
553
  }): LocalClassDef;
569
- //#endregion
570
- //#region src/nodes/interface.d.ts
571
554
  /** A member that may appear inside an interface definition. */
572
555
  type InterfaceMember = TypeDef | MethodDef;
573
556
  /** `INTERFACE zif_foo. ... ENDINTERFACE.`. */
@@ -581,8 +564,6 @@ declare function interfaceDef(input: {
581
564
  members?: readonly InterfaceMember[];
582
565
  abapDoc?: AbapDoc;
583
566
  }): InterfaceDef;
584
- //#endregion
585
- //#region src/printer/options.d.ts
586
567
  interface PrintOptions {
587
568
  /** Spaces per indentation level. Default 2. */
588
569
  indent?: number;
@@ -592,8 +573,6 @@ interface PrintOptions {
592
573
  eol?: string;
593
574
  }
594
575
  type ResolvedPrintOptions = Required<PrintOptions>;
595
- //#endregion
596
- //#region src/printer/writer.d.ts
597
576
  /** Tiny indentation-aware string builder. */
598
577
  declare class Writer {
599
578
  private readonly lines;
@@ -617,18 +596,11 @@ declare class Writer {
617
596
  kw(word: string): string;
618
597
  toString(): string;
619
598
  }
620
- //#endregion
621
- //#region src/printer/print-types.d.ts
622
599
  /** Print a TypeRef as an inline type expression (e.g. 'string', 'i', 'zcl_foo'). */
623
600
  declare function printInlineType(type: TypeRef, writer: Writer): string;
624
- //#endregion
625
- //#region src/printer/print-expressions.d.ts
626
601
  /** Print an expression to a single string (no newlines unless forced by wrapping). */
627
602
  declare function printExpression(expr: Expression, writer: Writer): string;
628
- //#endregion
629
- //#region src/printer/index.d.ts
630
603
  /** Pretty-print an ABAP AST node to source code. */
631
604
  declare function print(node: AbapNode, options?: PrintOptions): string;
632
- //#endregion
633
605
  export { AbapAstError, AbapDoc, AbapDocLine, AbapNode, Append, Assign, AttributeDef, BinOp, BinOperator, BuiltinType, BuiltinTypeName, Call, Cast, CatchClause, ClassDef, Clear, Comment, ConstantDecl, ConstructorExpr, Continue, DataDecl, ElseIfBranch, EnumMember, EnumType, EventDef, Exit, Expression, FieldSymbolDecl, Identifier, IdentifierExpr, If, Insert, InterfaceDef, InterfaceMember, Literal, LocalClassDef, Loop, MethodCallExpr, MethodDef, MethodImpl, MethodParam, NamedArg, NamedTypeRef, NodeKind, ParamKind, type PrintOptions, Raise, Raw, Read, type ResolvedPrintOptions, Return, Section, SectionMember, Statement, StringTemplate, StringTemplatePart, StructureField, StructureType, TableType, Try, TypeDef, TypeRef, Visibility, Writer, append, assign, attributeDef, binOp, builtinType, call, cast, classDef, clear, comment, constantDecl, constructorExpr, continueStmt, dataDecl, enumType, eventDef, exit, fieldSymbolDecl, identifierExpr, ifStmt, insert, interfaceDef, literal, localClassDef, loop, methodCallExpr, methodDef, methodImpl, methodParam, namedTypeRef, print, printExpression, printInlineType, raise, raw, read, requireField, returnStmt, section, stringTemplate, structureType, tableType, tryStmt, typeDef };
634
606
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/nodes/errors.ts","../src/nodes/base.ts","../src/nodes/types.ts","../src/nodes/expressions.ts","../src/nodes/data.ts","../src/nodes/statements.ts","../src/nodes/members.ts","../src/nodes/class.ts","../src/nodes/interface.ts","../src/printer/options.ts","../src/printer/writer.ts","../src/printer/print-types.ts","../src/printer/print-expressions.ts","../src/printer/index.ts"],"mappings":";cAAa,qBAAqB;EACpB,YAAA;;iBAME,aAAa,GAC3B,OAAO,sBACP,eACA,mBACC;;;;KCRS;;;;;KAqDA;;;;;;KAOA,mBAAmB;;UAGd;WACN,MAAM;WACN,UAAU;;;KAIT;;UAGK,gBAAgB;WACtB;WACA;WACA;;iBAGK,QAAQ;EACtB;EACA;IACE;;KAYQ;;;;KC5FA;UA4BK,oBAAoB;WAC1B;WACA,MAAM;WACN;WACA;;iBAGK,YAAY;EAC1B,MAAM;EACN;EACA;IACE;;UAkBa,qBAAqB;WAC3B;WACA,MAAM;;iBAGD,aAAa;EAAS,MAAM;IAAe;;KAQ/C,UAAU,cAAc,eAAe,YAAY;;UAG9C,kBAAkB;WACxB;WACA,SAAS;WACT;WACA;WACA,qBAAqB;;iBAGhB,UAAU;EACxB,SAAS;EACT;EACA;EACA,qBAAqB;IACnB;;UAgBa;WACN,MAAM;WACN,MAAM;;;UAIA,sBAAsB;WAC5B;WACA,iBAAiB;;iBAGZ,cAAc;EAC5B,iBAAiB;IACf;;UAqBa;WACN,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mB;WACnB,0BAA0B;;iBAGrB,SAAS;EACvB,MAAM;EACN,aAAa;EACb,sBAAsB;EACtB;EACA;EACA;EACA;EACA,oBAAoB;EACpB,2BAA2B;EAC3B,UAAU;IACR;;UAuBa,sBAAsB;WAC5B;WACA,MAAM;WACN,aAAa;WACb,qBAAqB;WACrB;WACA;WACA;WACA,mBAAmB;WACnB,0BAA0B;WAC1B;;iBAGK,cAAc;EAC5B,MAAM;EACN,aAAa;EACb,sBAAsB;EACtB;EACA;EACA;EACA,oBAAoB;EACpB,2BAA2B;IACzB;;;;KC3GQ,kBAAkB,UAAU;;UAGvB,qBAAqB;WAC3B;WACA,MAAM;WACN,kBAAkB;;iBAGb,aAAa;EAC3B,MAAM;EACN,mBAAmB;EACnB,UAAU;IACR;;;UCnBa;;EAEf;;EAEA;;EAEA;;KAGU,uBAAuB,SAAS;;;;cCN/B;mBACM;UACT;mBACS;EAEL,YAAA,MAAM;MAId,WAAW;EAIf;EAIA;;EAQA;;EAKA,UAAU;;EASV,MAAM;;EASN;;EAKA,QAAQ;;EAKR,GAAG;EAMH;;;;;iBCjDc,gBAAgB,MAAM,SAAS,QAAQ;;;;iBCTvC,gBAAgB,MAAM,YAAY,QAAQ;;;;iBCmB1C,MAAM,MAAM,UAAU,UAAU"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/nodes/errors.ts","../src/nodes/base.ts","../src/nodes/types.ts","../src/nodes/expressions.ts","../src/nodes/data.ts","../src/nodes/statements.ts","../src/nodes/members.ts","../src/nodes/class.ts","../src/nodes/interface.ts","../src/printer/options.ts","../src/printer/writer.ts","../src/printer/print-types.ts","../src/printer/print-expressions.ts","../src/printer/index.ts"],"mappings":"A,cAAa,qBAAqB;EACpB,YAAA;;iBAME,aAAa,GAC3B,OAAO,sBACP,eACA,mBACC;;KCRS;;;;;KAqDA;;;;;;KAOA,mBAAmB;;UAGd;WACN,MAAM;WACN,UAAU;;;KAIT;;UAGK,gBAAgB;WACtB;WACA;WACA;;iB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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/nodes/errors.ts
1
+ // src/nodes/errors.ts
2
2
  var AbapAstError = class extends Error {
3
3
  constructor(message) {
4
4
  super(message);
@@ -10,8 +10,7 @@ function requireField(value, field, nodeKind) {
10
10
  return value;
11
11
  }
12
12
 
13
- //#endregion
14
- //#region src/nodes/base.ts
13
+ // src/nodes/base.ts
15
14
  function comment(input) {
16
15
  if (typeof input.text !== "string") throw new AbapAstError("Comment: required field \"text\" is missing");
17
16
  return Object.freeze({
@@ -21,8 +20,7 @@ function comment(input) {
21
20
  });
22
21
  }
23
22
 
24
- //#endregion
25
- //#region src/nodes/types.ts
23
+ // src/nodes/types.ts
26
24
  const BUILTIN_TYPE_NAMES = /* @__PURE__ */ new Set([
27
25
  "i",
28
26
  "int8",
@@ -95,8 +93,7 @@ function typeDef(input) {
95
93
  });
96
94
  }
97
95
 
98
- //#endregion
99
- //#region src/nodes/data.ts
96
+ // src/nodes/data.ts
100
97
  function dataDecl(input) {
101
98
  if (!input.name) throw new AbapAstError("DataDecl: required field \"name\" is missing");
102
99
  if (!input.type) throw new AbapAstError("DataDecl: required field \"type\" is missing");
@@ -131,8 +128,7 @@ function fieldSymbolDecl(input) {
131
128
  });
132
129
  }
133
130
 
134
- //#endregion
135
- //#region src/nodes/expressions.ts
131
+ // src/nodes/expressions.ts
136
132
  function literal(input) {
137
133
  if (!input.literalKind) throw new AbapAstError("Literal: required field \"literalKind\" is missing");
138
134
  if (input.value === void 0 || input.value === null) throw new AbapAstError("Literal: required field \"value\" is missing");
@@ -199,8 +195,7 @@ function cast(input) {
199
195
  });
200
196
  }
201
197
 
202
- //#endregion
203
- //#region src/nodes/statements.ts
198
+ // src/nodes/statements.ts
204
199
  function assign(input) {
205
200
  if (!input.target) throw new AbapAstError("Assign: required field \"target\" is missing");
206
201
  if (!input.value) throw new AbapAstError("Assign: required field \"value\" is missing");
@@ -332,8 +327,7 @@ function raw(input) {
332
327
  });
333
328
  }
334
329
 
335
- //#endregion
336
- //#region src/nodes/members.ts
330
+ // src/nodes/members.ts
337
331
  function methodParam(input) {
338
332
  if (!input.paramKind) throw new AbapAstError("MethodParam: required field \"paramKind\" is missing");
339
333
  if (!input.name) throw new AbapAstError("MethodParam: required field \"name\" is missing");
@@ -407,8 +401,7 @@ function attributeDef(input) {
407
401
  });
408
402
  }
409
403
 
410
- //#endregion
411
- //#region src/nodes/class.ts
404
+ // src/nodes/class.ts
412
405
  function section(input) {
413
406
  if (!input.visibility) throw new AbapAstError("Section: required field \"visibility\" is missing");
414
407
  const members = input.members ?? [];
@@ -453,8 +446,7 @@ function localClassDef(input) {
453
446
  });
454
447
  }
455
448
 
456
- //#endregion
457
- //#region src/nodes/interface.ts
449
+ // src/nodes/interface.ts
458
450
  function interfaceDef(input) {
459
451
  if (!input.name) throw new AbapAstError("InterfaceDef: required field \"name\" is missing");
460
452
  const members = input.members ?? [];
@@ -467,8 +459,7 @@ function interfaceDef(input) {
467
459
  });
468
460
  }
469
461
 
470
- //#endregion
471
- //#region src/printer/options.ts
462
+ // src/printer/options.ts
472
463
  function resolveOptions(o) {
473
464
  return {
474
465
  indent: o?.indent ?? 2,
@@ -477,8 +468,7 @@ function resolveOptions(o) {
477
468
  };
478
469
  }
479
470
 
480
- //#endregion
481
- //#region src/printer/writer.ts
471
+ // src/printer/writer.ts
482
472
  /** Tiny indentation-aware string builder. */
483
473
  var Writer = class {
484
474
  lines = [];
@@ -528,8 +518,7 @@ var Writer = class {
528
518
  }
529
519
  };
530
520
 
531
- //#endregion
532
- //#region src/printer/print-types.ts
521
+ // src/printer/print-types.ts
533
522
  /**
534
523
  * Emit each ABAPDoc line as `"! <line>` at the current indent, immediately
535
524
  * above the following declaration. Does nothing when `doc` is undefined or
@@ -602,8 +591,7 @@ function printTypeDef(node, writer) {
602
591
  writer.writeLine(`${K("TYPES")} ${node.name} ${K("TYPE")} ${printInlineType(t, writer)}.`);
603
592
  }
604
593
 
605
- //#endregion
606
- //#region src/printer/print-expressions.ts
594
+ // src/printer/print-expressions.ts
607
595
  /** Print an expression to a single string (no newlines unless forced by wrapping). */
608
596
  function printExpression(expr, writer) {
609
597
  switch (expr.kind) {
@@ -665,8 +653,7 @@ function printStringTemplate(node, writer) {
665
653
  return out;
666
654
  }
667
655
 
668
- //#endregion
669
- //#region src/printer/print-statements.ts
656
+ // src/printer/print-statements.ts
670
657
  function printStatements(stmts, writer) {
671
658
  for (const s of stmts) printStatement(s, writer);
672
659
  }
@@ -829,8 +816,7 @@ function printFieldSymbolDecl(node, writer) {
829
816
  writer.writeLine(`${K("FIELD-SYMBOLS")} ${node.name} ${K("TYPE")} ${type}.`);
830
817
  }
831
818
 
832
- //#endregion
833
- //#region src/printer/print-members.ts
819
+ // src/printer/print-members.ts
834
820
  function printAttributeDef(node, writer) {
835
821
  printAbapDoc(node.abapDoc, writer);
836
822
  const K = (s) => writer.kw(s);
@@ -936,8 +922,7 @@ function printMethodImpl(node, writer) {
936
922
  writer.writeLine(`${K("ENDMETHOD")}.`);
937
923
  }
938
924
 
939
- //#endregion
940
- //#region src/printer/print-class.ts
925
+ // src/printer/print-class.ts
941
926
  const VIS_KW = {
942
927
  public: "PUBLIC SECTION",
943
928
  protected: "PROTECTED SECTION",
@@ -1047,8 +1032,7 @@ function printLocalClassDef(node, writer) {
1047
1032
  }
1048
1033
  }
1049
1034
 
1050
- //#endregion
1051
- //#region src/printer/print-interface.ts
1035
+ // src/printer/print-interface.ts
1052
1036
  function printInterfaceDef(node, writer) {
1053
1037
  printAbapDoc(node.abapDoc, writer);
1054
1038
  const K = (s) => writer.kw(s);
@@ -1064,8 +1048,7 @@ function printInterfaceDef(node, writer) {
1064
1048
  writer.writeLine(`${K("ENDINTERFACE")}.`);
1065
1049
  }
1066
1050
 
1067
- //#endregion
1068
- //#region src/printer/index.ts
1051
+ // src/printer/index.ts
1069
1052
  /** Pretty-print an ABAP AST node to source code. */
1070
1053
  function print(node, options) {
1071
1054
  const writer = new Writer(resolveOptions(options));
@@ -1145,6 +1128,5 @@ function printNode(node, writer) {
1145
1128
  }
1146
1129
  }
1147
1130
 
1148
- //#endregion
1149
1131
  export { AbapAstError, Writer, append, assign, attributeDef, binOp, builtinType, call, cast, classDef, clear, comment, constantDecl, constructorExpr, continueStmt, dataDecl, enumType, eventDef, exit, fieldSymbolDecl, identifierExpr, ifStmt, insert, interfaceDef, literal, localClassDef, loop, methodCallExpr, methodDef, methodImpl, methodParam, namedTypeRef, print, printExpression, printInlineType, raise, raw, read, requireField, returnStmt, section, stringTemplate, structureType, tableType, tryStmt, typeDef };
1150
1132
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/nodes/errors.ts","../src/nodes/base.ts","../src/nodes/types.ts","../src/nodes/data.ts","../src/nodes/expressions.ts","../src/nodes/statements.ts","../src/nodes/members.ts","../src/nodes/class.ts","../src/nodes/interface.ts","../src/printer/options.ts","../src/printer/writer.ts","../src/printer/print-types.ts","../src/printer/print-expressions.ts","../src/printer/print-statements.ts","../src/printer/print-members.ts","../src/printer/print-class.ts","../src/printer/print-interface.ts","../src/printer/index.ts"],"sourcesContent":["export class AbapAstError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AbapAstError';\n }\n}\n\nexport function requireField<T>(\n value: T | undefined | null,\n field: string,\n nodeKind: string,\n): T {\n if (value === undefined || value === null || value === '') {\n throw new AbapAstError(`${nodeKind}: required field \"${field}\" is missing`);\n }\n return value;\n}\n","import { AbapAstError } from './errors';\n\n/** All node kinds in the AST. */\nexport type NodeKind =\n // types\n | 'BuiltinType'\n | 'TableType'\n | 'StructureType'\n | 'NamedTypeRef'\n | 'EnumType'\n | 'TypeDef'\n // data\n | 'DataDecl'\n | 'ConstantDecl'\n | 'FieldSymbolDecl'\n // statements\n | 'Assign'\n | 'Call'\n | 'Raise'\n | 'If'\n | 'Loop'\n | 'Return'\n | 'Try'\n | 'Append'\n | 'Insert'\n | 'Read'\n | 'Clear'\n | 'Exit'\n | 'Continue'\n | 'Raw'\n // expressions\n | 'Literal'\n | 'IdentifierExpr'\n | 'ConstructorExpr'\n | 'MethodCallExpr'\n | 'BinOp'\n | 'StringTemplate'\n | 'Cast'\n // members\n | 'MethodParam'\n | 'MethodDef'\n | 'MethodImpl'\n | 'EventDef'\n | 'AttributeDef'\n // class / interface\n | 'Section'\n | 'ClassDef'\n | 'LocalClassDef'\n | 'InterfaceDef'\n // shared\n | 'Comment';\n\n/**\n * A single ABAPDoc comment line. Stored without the leading `\"!` prefix.\n * The prefix is added by the printer at emit time.\n */\nexport type AbapDocLine = string;\n\n/**\n * ABAPDoc metadata attached to a declaration node. Each entry is a logical\n * line; printers emit one `\"! <line>` per entry immediately above the\n * declaration, at the same indentation as the declaration itself.\n */\nexport type AbapDoc = readonly AbapDocLine[];\n\n/** Base shape for any AST node. */\nexport interface AbapNode {\n readonly kind: NodeKind;\n readonly abapDoc?: AbapDoc;\n}\n\n/** An ABAP identifier (not validated beyond presence). */\nexport type Identifier = string;\n\n/** An ABAP comment. Star comments begin at column 1; line comments use `\"`. */\nexport interface Comment extends AbapNode {\n readonly kind: 'Comment';\n readonly text: string;\n readonly style: 'star' | 'line';\n}\n\nexport function comment(input: {\n text: string;\n style?: 'star' | 'line';\n}): Comment {\n if (typeof input.text !== 'string') {\n throw new AbapAstError('Comment: required field \"text\" is missing');\n }\n return Object.freeze({\n kind: 'Comment' as const,\n text: input.text,\n style: input.style ?? 'line',\n });\n}\n\n/** Visibility modifier for class members / sections. */\nexport type Visibility = 'public' | 'protected' | 'private';\n","import type { AbapDoc, AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\n\n/** ABAP builtin type names allowed in the AST. */\nexport type BuiltinTypeName =\n | 'i'\n | 'int8'\n | 'f'\n | 'decfloat34'\n | 'd'\n | 't'\n | 'timestampl'\n | 'string'\n | 'xstring'\n | 'abap_bool'\n | 'sysuuid_x16';\n\nconst BUILTIN_TYPE_NAMES: ReadonlySet<BuiltinTypeName> =\n new Set<BuiltinTypeName>([\n 'i',\n 'int8',\n 'f',\n 'decfloat34',\n 'd',\n 't',\n 'timestampl',\n 'string',\n 'xstring',\n 'abap_bool',\n 'sysuuid_x16',\n ]);\n\nexport interface BuiltinType extends AbapNode {\n readonly kind: 'BuiltinType';\n readonly name: BuiltinTypeName;\n readonly length?: number;\n readonly decimals?: number;\n}\n\nexport function builtinType(input: {\n name: BuiltinTypeName;\n length?: number;\n decimals?: number;\n}): BuiltinType {\n if (!input.name) {\n throw new AbapAstError('BuiltinType: required field \"name\" is missing');\n }\n if (!BUILTIN_TYPE_NAMES.has(input.name)) {\n throw new AbapAstError(\n `BuiltinType: unknown builtin type \"${String(input.name)}\"`,\n );\n }\n return Object.freeze({\n kind: 'BuiltinType' as const,\n name: input.name,\n length: input.length,\n decimals: input.decimals,\n });\n}\n\n/** Reference to a named type (e.g. `zif_foo=>ty_bar`). */\nexport interface NamedTypeRef extends AbapNode {\n readonly kind: 'NamedTypeRef';\n readonly name: Identifier;\n}\n\nexport function namedTypeRef(input: { name: Identifier }): NamedTypeRef {\n if (!input.name) {\n throw new AbapAstError('NamedTypeRef: required field \"name\" is missing');\n }\n return Object.freeze({ kind: 'NamedTypeRef' as const, name: input.name });\n}\n\n/** Type reference used in declarations. */\nexport type TypeRef = BuiltinType | NamedTypeRef | TableType | StructureType;\n\n/** ABAP internal table type. */\nexport interface TableType extends AbapNode {\n readonly kind: 'TableType';\n readonly rowType: TypeRef;\n readonly tableKind: 'standard' | 'sorted' | 'hashed';\n readonly uniqueness?: 'unique' | 'non-unique';\n readonly keyFields?: readonly Identifier[];\n}\n\nexport function tableType(input: {\n rowType: TypeRef;\n tableKind?: 'standard' | 'sorted' | 'hashed';\n uniqueness?: 'unique' | 'non-unique';\n keyFields?: readonly Identifier[];\n}): TableType {\n if (!input.rowType) {\n throw new AbapAstError('TableType: required field \"rowType\" is missing');\n }\n return Object.freeze({\n kind: 'TableType' as const,\n rowType: input.rowType,\n tableKind: input.tableKind ?? 'standard',\n uniqueness: input.uniqueness,\n keyFields: input.keyFields\n ? Object.freeze([...input.keyFields])\n : undefined,\n });\n}\n\n/** Field of a structure type. */\nexport interface StructureField {\n readonly name: Identifier;\n readonly type: TypeRef;\n}\n\n/** ABAP `BEGIN OF ... END OF` structure type. */\nexport interface StructureType extends AbapNode {\n readonly kind: 'StructureType';\n readonly fields: readonly StructureField[];\n}\n\nexport function structureType(input: {\n fields: readonly StructureField[];\n}): StructureType {\n if (!input.fields || input.fields.length === 0) {\n throw new AbapAstError('StructureType: must declare at least one field');\n }\n for (const f of input.fields) {\n if (!f.name) {\n throw new AbapAstError('StructureType: field is missing \"name\"');\n }\n if (!f.type) {\n throw new AbapAstError(\n `StructureType: field \"${f.name}\" is missing \"type\"`,\n );\n }\n }\n return Object.freeze({\n kind: 'StructureType' as const,\n fields: Object.freeze(input.fields.map((f) => Object.freeze({ ...f }))),\n });\n}\n\n/** Enum-like type: a fixed set of name/value pairs with a base type. */\nexport interface EnumMember {\n readonly name: Identifier;\n readonly value: string | number;\n}\n\nexport interface EnumType extends AbapNode {\n readonly kind: 'EnumType';\n readonly baseType: TypeRef;\n readonly members: readonly EnumMember[];\n}\n\nexport function enumType(input: {\n baseType: TypeRef;\n members: readonly EnumMember[];\n}): EnumType {\n if (!input.baseType) {\n throw new AbapAstError('EnumType: required field \"baseType\" is missing');\n }\n if (!input.members || input.members.length === 0) {\n throw new AbapAstError('EnumType: must declare at least one member');\n }\n for (const m of input.members) {\n if (!m.name) {\n throw new AbapAstError('EnumType: member is missing \"name\"');\n }\n }\n return Object.freeze({\n kind: 'EnumType' as const,\n baseType: input.baseType,\n members: Object.freeze(input.members.map((m) => Object.freeze({ ...m }))),\n });\n}\n\n/** Top-level `TYPES: <name> TYPE ...` declaration. */\nexport interface TypeDef extends AbapNode {\n readonly kind: 'TypeDef';\n readonly name: Identifier;\n readonly type: TypeRef | EnumType;\n}\n\nexport function typeDef(input: {\n name: Identifier;\n type: TypeRef | EnumType;\n abapDoc?: AbapDoc;\n}): TypeDef {\n if (!input.name) {\n throw new AbapAstError('TypeDef: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('TypeDef: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'TypeDef' as const,\n name: input.name,\n type: input.type,\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n","import type { AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeRef } from './types';\nimport type { Expression } from './expressions';\n\n/** `DATA lv_x TYPE ... [VALUE ...]`. */\nexport interface DataDecl extends AbapNode {\n readonly kind: 'DataDecl';\n readonly name: Identifier;\n readonly type: TypeRef;\n readonly initial?: Expression;\n readonly classData?: boolean;\n}\n\nexport function dataDecl(input: {\n name: Identifier;\n type: TypeRef;\n initial?: Expression;\n classData?: boolean;\n}): DataDecl {\n if (!input.name) {\n throw new AbapAstError('DataDecl: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('DataDecl: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'DataDecl' as const,\n name: input.name,\n type: input.type,\n initial: input.initial,\n classData: input.classData,\n });\n}\n\n/** `CONSTANTS c_x TYPE ... VALUE ...`. */\nexport interface ConstantDecl extends AbapNode {\n readonly kind: 'ConstantDecl';\n readonly name: Identifier;\n readonly type: TypeRef;\n readonly value: Expression;\n readonly classData?: boolean;\n}\n\nexport function constantDecl(input: {\n name: Identifier;\n type: TypeRef;\n value: Expression;\n classData?: boolean;\n}): ConstantDecl {\n if (!input.name) {\n throw new AbapAstError('ConstantDecl: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('ConstantDecl: required field \"type\" is missing');\n }\n if (!input.value) {\n throw new AbapAstError('ConstantDecl: required field \"value\" is missing');\n }\n return Object.freeze({\n kind: 'ConstantDecl' as const,\n name: input.name,\n type: input.type,\n value: input.value,\n classData: input.classData,\n });\n}\n\n/** `FIELD-SYMBOLS <fs_x> TYPE ...`. */\nexport interface FieldSymbolDecl extends AbapNode {\n readonly kind: 'FieldSymbolDecl';\n readonly name: Identifier;\n readonly type: TypeRef;\n}\n\nexport function fieldSymbolDecl(input: {\n name: Identifier;\n type: TypeRef;\n}): FieldSymbolDecl {\n if (!input.name) {\n throw new AbapAstError('FieldSymbolDecl: required field \"name\" is missing');\n }\n if (!input.name.startsWith('<') || !input.name.endsWith('>')) {\n throw new AbapAstError(\n `FieldSymbolDecl: name \"${input.name}\" must be wrapped in angle brackets (e.g. <fs_x>)`,\n );\n }\n if (!input.type) {\n throw new AbapAstError('FieldSymbolDecl: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'FieldSymbolDecl' as const,\n name: input.name,\n type: input.type,\n });\n}\n","import type { AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeRef } from './types';\n\n/** An expression node (forward-declared union). */\nexport type Expression =\n | Literal\n | IdentifierExpr\n | ConstructorExpr\n | MethodCallExpr\n | BinOp\n | StringTemplate\n | Cast;\n\n/** A literal value. */\nexport interface Literal extends AbapNode {\n readonly kind: 'Literal';\n readonly literalKind: 'string' | 'int' | 'bool' | 'hex';\n readonly value: string | number | boolean;\n}\n\nexport function literal(input: {\n literalKind: 'string' | 'int' | 'bool' | 'hex';\n value: string | number | boolean;\n}): Literal {\n if (!input.literalKind) {\n throw new AbapAstError('Literal: required field \"literalKind\" is missing');\n }\n if (input.value === undefined || input.value === null) {\n throw new AbapAstError('Literal: required field \"value\" is missing');\n }\n if (input.literalKind === 'int' && typeof input.value !== 'number') {\n throw new AbapAstError('Literal: int literal requires a number value');\n }\n if (input.literalKind === 'bool' && typeof input.value !== 'boolean') {\n throw new AbapAstError('Literal: bool literal requires a boolean value');\n }\n if (\n (input.literalKind === 'string' || input.literalKind === 'hex') &&\n typeof input.value !== 'string'\n ) {\n throw new AbapAstError(\n `Literal: ${input.literalKind} literal requires a string value`,\n );\n }\n return Object.freeze({\n kind: 'Literal' as const,\n literalKind: input.literalKind,\n value: input.value,\n });\n}\n\n/** A bare identifier used as an expression (variable, constant reference). */\nexport interface IdentifierExpr extends AbapNode {\n readonly kind: 'IdentifierExpr';\n readonly name: Identifier;\n}\n\nexport function identifierExpr(input: { name: Identifier }): IdentifierExpr {\n if (!input.name) {\n throw new AbapAstError('IdentifierExpr: required field \"name\" is missing');\n }\n return Object.freeze({\n kind: 'IdentifierExpr' as const,\n name: input.name,\n });\n}\n\n/** Named argument on a method call / constructor. */\nexport interface NamedArg {\n readonly name: Identifier;\n readonly value: Expression;\n}\n\n/** `NEW <type>( ... )`. */\nexport interface ConstructorExpr extends AbapNode {\n readonly kind: 'ConstructorExpr';\n readonly type: TypeRef;\n readonly args: readonly NamedArg[];\n}\n\nexport function constructorExpr(input: {\n type: TypeRef;\n args?: readonly NamedArg[];\n}): ConstructorExpr {\n if (!input.type) {\n throw new AbapAstError('ConstructorExpr: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'ConstructorExpr' as const,\n type: input.type,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** Chainable method call (static `cl=>m(...)` or instance `ref->m(...)`). */\nexport interface MethodCallExpr extends AbapNode {\n readonly kind: 'MethodCallExpr';\n readonly receiver: Expression | undefined;\n readonly method: Identifier;\n readonly callKind: 'static' | 'instance';\n readonly args: readonly NamedArg[];\n}\n\nexport function methodCallExpr(input: {\n receiver?: Expression;\n method: Identifier;\n callKind: 'static' | 'instance';\n args?: readonly NamedArg[];\n}): MethodCallExpr {\n if (!input.method) {\n throw new AbapAstError(\n 'MethodCallExpr: required field \"method\" is missing',\n );\n }\n if (input.callKind === 'instance' && !input.receiver) {\n throw new AbapAstError('MethodCallExpr: instance calls require a receiver');\n }\n return Object.freeze({\n kind: 'MethodCallExpr' as const,\n receiver: input.receiver,\n method: input.method,\n callKind: input.callKind,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** Comparison / arithmetic operators. */\nexport type BinOperator =\n | '='\n | '<>'\n | '<'\n | '<='\n | '>'\n | '>='\n | '+'\n | '-'\n | '*'\n | '/'\n | 'AND'\n | 'OR';\n\nexport interface BinOp extends AbapNode {\n readonly kind: 'BinOp';\n readonly op: BinOperator;\n readonly left: Expression;\n readonly right: Expression;\n}\n\nexport function binOp(input: {\n op: BinOperator;\n left: Expression;\n right: Expression;\n}): BinOp {\n if (!input.op) {\n throw new AbapAstError('BinOp: required field \"op\" is missing');\n }\n if (!input.left) {\n throw new AbapAstError('BinOp: required field \"left\" is missing');\n }\n if (!input.right) {\n throw new AbapAstError('BinOp: required field \"right\" is missing');\n }\n return Object.freeze({\n kind: 'BinOp' as const,\n op: input.op,\n left: input.left,\n right: input.right,\n });\n}\n\n/** Parts of a string template — literal text or an interpolated expression. */\nexport type StringTemplatePart =\n | { readonly partKind: 'text'; readonly text: string }\n | { readonly partKind: 'expr'; readonly expr: Expression };\n\n/** `|text { expr } more|`. */\nexport interface StringTemplate extends AbapNode {\n readonly kind: 'StringTemplate';\n readonly parts: readonly StringTemplatePart[];\n}\n\nexport function stringTemplate(input: {\n parts: readonly StringTemplatePart[];\n}): StringTemplate {\n if (!input.parts) {\n throw new AbapAstError('StringTemplate: required field \"parts\" is missing');\n }\n return Object.freeze({\n kind: 'StringTemplate' as const,\n parts: Object.freeze(input.parts.map((p) => Object.freeze({ ...p }))),\n });\n}\n\n/** `CAST <type>( expr )`. */\nexport interface Cast extends AbapNode {\n readonly kind: 'Cast';\n readonly type: TypeRef;\n readonly expr: Expression;\n}\n\nexport function cast(input: { type: TypeRef; expr: Expression }): Cast {\n if (!input.type) {\n throw new AbapAstError('Cast: required field \"type\" is missing');\n }\n if (!input.expr) {\n throw new AbapAstError('Cast: required field \"expr\" is missing');\n }\n return Object.freeze({\n kind: 'Cast' as const,\n type: input.type,\n expr: input.expr,\n });\n}\n","import type { AbapNode, Comment, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { Expression, NamedArg } from './expressions';\nimport type { TypeRef } from './types';\nimport type { DataDecl, FieldSymbolDecl } from './data';\n\n/** Union of all statement node types. */\nexport type Statement =\n | Assign\n | Call\n | Raise\n | If\n | Loop\n | Return\n | Try\n | Append\n | Insert\n | Read\n | Clear\n | Exit\n | Continue\n | Raw\n | Comment\n | DataDecl\n | FieldSymbolDecl;\n\n/** `target = value`. */\nexport interface Assign extends AbapNode {\n readonly kind: 'Assign';\n readonly target: Expression;\n readonly value: Expression;\n}\n\nexport function assign(input: {\n target: Expression;\n value: Expression;\n}): Assign {\n if (!input.target) {\n throw new AbapAstError('Assign: required field \"target\" is missing');\n }\n if (!input.value) {\n throw new AbapAstError('Assign: required field \"value\" is missing');\n }\n return Object.freeze({\n kind: 'Assign' as const,\n target: input.target,\n value: input.value,\n });\n}\n\n/** Statement-level method call, e.g. `cl_foo=>bar( iv = 1 ).`. */\nexport interface Call extends AbapNode {\n readonly kind: 'Call';\n readonly receiver: Expression | undefined;\n readonly method: Identifier;\n readonly callKind: 'static' | 'instance';\n readonly args: readonly NamedArg[];\n}\n\nexport function call(input: {\n receiver?: Expression;\n method: Identifier;\n callKind: 'static' | 'instance';\n args?: readonly NamedArg[];\n}): Call {\n if (!input.method) {\n throw new AbapAstError('Call: required field \"method\" is missing');\n }\n if (input.callKind !== 'static' && input.callKind !== 'instance') {\n throw new AbapAstError(\n 'Call: required field \"callKind\" must be \"static\" or \"instance\"',\n );\n }\n if (input.callKind === 'instance' && !input.receiver) {\n throw new AbapAstError('Call: instance calls require a receiver');\n }\n return Object.freeze({\n kind: 'Call' as const,\n receiver: input.receiver,\n method: input.method,\n callKind: input.callKind,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** `RAISE EXCEPTION NEW zcx_xxx( ... ).`. */\nexport interface Raise extends AbapNode {\n readonly kind: 'Raise';\n readonly exceptionType: TypeRef;\n readonly args: readonly NamedArg[];\n}\n\nexport function raise(input: {\n exceptionType: TypeRef;\n args?: readonly NamedArg[];\n}): Raise {\n if (!input.exceptionType) {\n throw new AbapAstError('Raise: required field \"exceptionType\" is missing');\n }\n return Object.freeze({\n kind: 'Raise' as const,\n exceptionType: input.exceptionType,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** A single ELSEIF branch. */\nexport interface ElseIfBranch {\n readonly condition: Expression;\n readonly body: readonly Statement[];\n}\n\n/** IF / ELSEIF / ELSE. */\nexport interface If extends AbapNode {\n readonly kind: 'If';\n readonly condition: Expression;\n readonly thenBody: readonly Statement[];\n readonly elseIfs: readonly ElseIfBranch[];\n readonly else?: readonly Statement[];\n}\n\nexport function ifStmt(input: {\n condition: Expression;\n thenBody: readonly Statement[];\n elseIfs?: readonly ElseIfBranch[];\n else?: readonly Statement[];\n}): If {\n if (!input.condition) {\n throw new AbapAstError('If: required field \"condition\" is missing');\n }\n if (!input.thenBody) {\n throw new AbapAstError('If: required field \"thenBody\" is missing');\n }\n return Object.freeze({\n kind: 'If' as const,\n condition: input.condition,\n thenBody: Object.freeze([...input.thenBody]),\n elseIfs: Object.freeze(\n (input.elseIfs ?? []).map((b) =>\n Object.freeze({ ...b, body: Object.freeze([...b.body]) }),\n ),\n ),\n else: input.else ? Object.freeze([...input.else]) : undefined,\n });\n}\n\n/** LOOP AT ... INTO wa / ASSIGNING <fs>. */\nexport interface Loop extends AbapNode {\n readonly kind: 'Loop';\n readonly table: Expression;\n readonly binding:\n | { readonly bindKind: 'into'; readonly target: Identifier }\n | { readonly bindKind: 'assigning'; readonly fieldSymbol: Identifier };\n readonly body: readonly Statement[];\n}\n\nexport function loop(input: {\n table: Expression;\n binding: Loop['binding'];\n body: readonly Statement[];\n}): Loop {\n if (!input.table) {\n throw new AbapAstError('Loop: required field \"table\" is missing');\n }\n if (!input.binding) {\n throw new AbapAstError('Loop: required field \"binding\" is missing');\n }\n if (input.binding.bindKind === 'assigning') {\n const fs = input.binding.fieldSymbol;\n if (!fs.startsWith('<') || !fs.endsWith('>')) {\n throw new AbapAstError(\n `Loop: assigning target \"${fs}\" must be a field symbol wrapped in angle brackets`,\n );\n }\n }\n if (!input.body) {\n throw new AbapAstError('Loop: required field \"body\" is missing');\n }\n return Object.freeze({\n kind: 'Loop' as const,\n table: input.table,\n binding: Object.freeze({ ...input.binding }),\n body: Object.freeze([...input.body]),\n });\n}\n\n/**\n * `RETURN.` statement, optionally preceded by an assignment to the\n * RETURNING parameter (e.g. `rv_result = <expr>.` + `RETURN.`).\n *\n * `target` is the ABAP identifier of the RETURNING parameter. When\n * `value` is set, `target` is required — ABAP has no implicit `rv`\n * variable.\n */\nexport interface Return extends AbapNode {\n readonly kind: 'Return';\n readonly value?: Expression;\n readonly target?: string;\n}\n\nexport function returnStmt(input?: {\n value?: Expression;\n target?: string;\n}): Return {\n if (input?.value !== undefined && !input.target) {\n throw new AbapAstError(\n 'returnStmt: `target` (the RETURNING parameter name) is required when `value` is set — ABAP has no implicit `rv` variable',\n );\n }\n return Object.freeze({\n kind: 'Return' as const,\n value: input?.value,\n target: input?.target,\n });\n}\n\n/** CATCH clause inside a TRY. */\nexport interface CatchClause {\n readonly exceptionTypes: readonly TypeRef[];\n readonly into?: Identifier;\n readonly body: readonly Statement[];\n}\n\n/** TRY / CATCH / CLEANUP. */\nexport interface Try extends AbapNode {\n readonly kind: 'Try';\n readonly body: readonly Statement[];\n readonly catches: readonly CatchClause[];\n readonly cleanup?: readonly Statement[];\n}\n\nexport function tryStmt(input: {\n body: readonly Statement[];\n catches: readonly CatchClause[];\n cleanup?: readonly Statement[];\n}): Try {\n if (!input.body) {\n throw new AbapAstError('Try: required field \"body\" is missing');\n }\n if (!input.catches || input.catches.length === 0) {\n throw new AbapAstError('Try: must declare at least one CATCH clause');\n }\n for (const c of input.catches) {\n if (!c.exceptionTypes || c.exceptionTypes.length === 0) {\n throw new AbapAstError(\n 'Try: CATCH clause must declare at least one exception type',\n );\n }\n }\n return Object.freeze({\n kind: 'Try' as const,\n body: Object.freeze([...input.body]),\n catches: Object.freeze(\n input.catches.map((c) =>\n Object.freeze({\n ...c,\n exceptionTypes: Object.freeze([...c.exceptionTypes]),\n body: Object.freeze([...c.body]),\n }),\n ),\n ),\n cleanup: input.cleanup ? Object.freeze([...input.cleanup]) : undefined,\n });\n}\n\n/** APPEND value TO table. */\nexport interface Append extends AbapNode {\n readonly kind: 'Append';\n readonly value: Expression;\n readonly table: Expression;\n}\n\nexport function append(input: {\n value: Expression;\n table: Expression;\n}): Append {\n if (!input.value) {\n throw new AbapAstError('Append: required field \"value\" is missing');\n }\n if (!input.table) {\n throw new AbapAstError('Append: required field \"table\" is missing');\n }\n return Object.freeze({\n kind: 'Append' as const,\n value: input.value,\n table: input.table,\n });\n}\n\n/** INSERT value INTO TABLE table. */\nexport interface Insert extends AbapNode {\n readonly kind: 'Insert';\n readonly value: Expression;\n readonly table: Expression;\n}\n\nexport function insert(input: {\n value: Expression;\n table: Expression;\n}): Insert {\n if (!input.value) {\n throw new AbapAstError('Insert: required field \"value\" is missing');\n }\n if (!input.table) {\n throw new AbapAstError('Insert: required field \"table\" is missing');\n }\n return Object.freeze({\n kind: 'Insert' as const,\n value: input.value,\n table: input.table,\n });\n}\n\n/** READ TABLE table INTO wa / ASSIGNING <fs> [WITH KEY ...]. */\nexport interface Read extends AbapNode {\n readonly kind: 'Read';\n readonly table: Expression;\n readonly binding:\n | { readonly bindKind: 'into'; readonly target: Identifier }\n | { readonly bindKind: 'assigning'; readonly fieldSymbol: Identifier };\n readonly withKey?: readonly NamedArg[];\n readonly index?: Expression;\n}\n\nexport function read(input: {\n table: Expression;\n binding: Read['binding'];\n withKey?: readonly NamedArg[];\n index?: Expression;\n}): Read {\n if (!input.table) {\n throw new AbapAstError('Read: required field \"table\" is missing');\n }\n if (!input.binding) {\n throw new AbapAstError('Read: required field \"binding\" is missing');\n }\n return Object.freeze({\n kind: 'Read' as const,\n table: input.table,\n binding: Object.freeze({ ...input.binding }),\n withKey: input.withKey\n ? Object.freeze(input.withKey.map((a) => Object.freeze({ ...a })))\n : undefined,\n index: input.index,\n });\n}\n\n/** CLEAR target. */\nexport interface Clear extends AbapNode {\n readonly kind: 'Clear';\n readonly target: Expression;\n}\n\nexport function clear(input: { target: Expression }): Clear {\n if (!input.target) {\n throw new AbapAstError('Clear: required field \"target\" is missing');\n }\n return Object.freeze({ kind: 'Clear' as const, target: input.target });\n}\n\n/** EXIT. */\nexport interface Exit extends AbapNode {\n readonly kind: 'Exit';\n}\n\nexport function exit(): Exit {\n return Object.freeze({ kind: 'Exit' as const });\n}\n\n/** CONTINUE. */\nexport interface Continue extends AbapNode {\n readonly kind: 'Continue';\n}\n\nexport function continueStmt(): Continue {\n return Object.freeze({ kind: 'Continue' as const });\n}\n\n/** Verbatim ABAP source — escape hatch when the AST can't express something. */\nexport interface Raw extends AbapNode {\n readonly kind: 'Raw';\n readonly source: string;\n}\n\nexport function raw(input: { source: string }): Raw {\n if (typeof input.source !== 'string' || input.source.length === 0) {\n throw new AbapAstError('Raw: required field \"source\" is missing');\n }\n return Object.freeze({ kind: 'Raw' as const, source: input.source });\n}\n","import type { AbapDoc, AbapNode, Identifier, Visibility } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeRef } from './types';\nimport type { Expression } from './expressions';\nimport type { Statement } from './statements';\n\n/** ABAP method parameter kind. */\nexport type ParamKind = 'importing' | 'exporting' | 'changing' | 'returning';\n\nexport interface MethodParam extends AbapNode {\n readonly kind: 'MethodParam';\n readonly paramKind: ParamKind;\n readonly name: Identifier;\n readonly typeRef: TypeRef;\n readonly optional?: boolean;\n readonly default?: Expression;\n}\n\nexport function methodParam(input: {\n paramKind: ParamKind;\n name: Identifier;\n typeRef: TypeRef;\n optional?: boolean;\n default?: Expression;\n}): MethodParam {\n if (!input.paramKind) {\n throw new AbapAstError(\n 'MethodParam: required field \"paramKind\" is missing',\n );\n }\n if (!input.name) {\n throw new AbapAstError('MethodParam: required field \"name\" is missing');\n }\n if (!input.typeRef) {\n throw new AbapAstError('MethodParam: required field \"typeRef\" is missing');\n }\n if (input.paramKind === 'returning' && input.optional) {\n throw new AbapAstError(\n 'MethodParam: RETURNING parameters cannot be optional',\n );\n }\n if (input.paramKind === 'returning' && input.default !== undefined) {\n throw new AbapAstError(\n 'MethodParam: RETURNING parameters cannot have a default',\n );\n }\n return Object.freeze({\n kind: 'MethodParam' as const,\n paramKind: input.paramKind,\n name: input.name,\n typeRef: input.typeRef,\n optional: input.optional,\n default: input.default,\n });\n}\n\nexport interface MethodDef extends AbapNode {\n readonly kind: 'MethodDef';\n readonly name: Identifier;\n readonly params: readonly MethodParam[];\n readonly raising: readonly TypeRef[];\n readonly visibility: Visibility;\n readonly isClassMethod?: boolean;\n readonly isAbstract?: boolean;\n readonly isFinal?: boolean;\n readonly isRedefinition?: boolean;\n readonly isForTesting?: boolean;\n}\n\nexport function methodDef(input: {\n name: Identifier;\n params?: readonly MethodParam[];\n raising?: readonly TypeRef[];\n visibility: Visibility;\n isClassMethod?: boolean;\n isAbstract?: boolean;\n isFinal?: boolean;\n isRedefinition?: boolean;\n isForTesting?: boolean;\n abapDoc?: AbapDoc;\n}): MethodDef {\n if (!input.name) {\n throw new AbapAstError('MethodDef: required field \"name\" is missing');\n }\n if (!input.visibility) {\n throw new AbapAstError('MethodDef: required field \"visibility\" is missing');\n }\n const params = input.params ?? [];\n // Validate: at most one RETURNING, and if present no EXPORTING/CHANGING.\n const returning = params.filter((p) => p.paramKind === 'returning');\n if (returning.length > 1) {\n throw new AbapAstError(\n 'MethodDef: a method can have at most one RETURNING parameter',\n );\n }\n if (returning.length === 1) {\n const hasExportingOrChanging = params.some(\n (p) => p.paramKind === 'exporting' || p.paramKind === 'changing',\n );\n if (hasExportingOrChanging) {\n throw new AbapAstError(\n 'MethodDef: RETURNING parameter cannot be combined with EXPORTING or CHANGING',\n );\n }\n }\n return Object.freeze({\n kind: 'MethodDef' as const,\n name: input.name,\n params: Object.freeze([...params]),\n raising: Object.freeze([...(input.raising ?? [])]),\n visibility: input.visibility,\n isClassMethod: input.isClassMethod,\n isAbstract: input.isAbstract,\n isFinal: input.isFinal,\n isRedefinition: input.isRedefinition,\n isForTesting: input.isForTesting,\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n\n/** Body of a method in the IMPLEMENTATION block. */\nexport interface MethodImpl extends AbapNode {\n readonly kind: 'MethodImpl';\n readonly name: Identifier;\n readonly body: readonly Statement[];\n}\n\nexport function methodImpl(input: {\n name: Identifier;\n body: readonly Statement[];\n}): MethodImpl {\n if (!input.name) {\n throw new AbapAstError('MethodImpl: required field \"name\" is missing');\n }\n if (!input.body) {\n throw new AbapAstError('MethodImpl: required field \"body\" is missing');\n }\n return Object.freeze({\n kind: 'MethodImpl' as const,\n name: input.name,\n body: Object.freeze([...input.body]),\n });\n}\n\n/** EVENT declaration (stub — body not modelled yet). */\nexport interface EventDef extends AbapNode {\n readonly kind: 'EventDef';\n readonly name: Identifier;\n readonly visibility: Visibility;\n readonly isClassEvent?: boolean;\n}\n\nexport function eventDef(input: {\n name: Identifier;\n visibility: Visibility;\n isClassEvent?: boolean;\n}): EventDef {\n if (!input.name) {\n throw new AbapAstError('EventDef: required field \"name\" is missing');\n }\n if (!input.visibility) {\n throw new AbapAstError('EventDef: required field \"visibility\" is missing');\n }\n return Object.freeze({\n kind: 'EventDef' as const,\n name: input.name,\n visibility: input.visibility,\n isClassEvent: input.isClassEvent,\n });\n}\n\n/** DATA / CLASS-DATA declaration inside a class section. */\nexport interface AttributeDef extends AbapNode {\n readonly kind: 'AttributeDef';\n readonly name: Identifier;\n readonly type: TypeRef;\n readonly visibility: Visibility;\n readonly classData?: boolean;\n readonly readOnly?: boolean;\n readonly initial?: Expression;\n}\n\nexport function attributeDef(input: {\n name: Identifier;\n type: TypeRef;\n visibility: Visibility;\n classData?: boolean;\n readOnly?: boolean;\n initial?: Expression;\n abapDoc?: AbapDoc;\n}): AttributeDef {\n if (!input.name) {\n throw new AbapAstError('AttributeDef: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('AttributeDef: required field \"type\" is missing');\n }\n if (!input.visibility) {\n throw new AbapAstError(\n 'AttributeDef: required field \"visibility\" is missing',\n );\n }\n return Object.freeze({\n kind: 'AttributeDef' as const,\n name: input.name,\n type: input.type,\n visibility: input.visibility,\n classData: input.classData,\n readOnly: input.readOnly,\n initial: input.initial,\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n","import type { AbapDoc, AbapNode, Identifier, Visibility } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeDef } from './types';\nimport type { ConstantDecl } from './data';\nimport type { AttributeDef, EventDef, MethodDef, MethodImpl } from './members';\n\n/** A member that may appear inside a class section. */\nexport type SectionMember =\n | TypeDef\n | AttributeDef\n | MethodDef\n | ConstantDecl\n | EventDef;\n\n/** A visibility section of a class definition. */\nexport interface Section extends AbapNode {\n readonly kind: 'Section';\n readonly visibility: Visibility;\n readonly members: readonly SectionMember[];\n}\n\nexport function section(input: {\n visibility: Visibility;\n members?: readonly SectionMember[];\n}): Section {\n if (!input.visibility) {\n throw new AbapAstError('Section: required field \"visibility\" is missing');\n }\n const members = input.members ?? [];\n for (const m of members) {\n if ('visibility' in m && m.visibility !== input.visibility) {\n throw new AbapAstError(\n `Section: member \"${m.name}\" has visibility \"${m.visibility}\" but section is \"${input.visibility}\"`,\n );\n }\n }\n return Object.freeze({\n kind: 'Section' as const,\n visibility: input.visibility,\n members: Object.freeze([...members]),\n });\n}\n\n/** Top-level global class (`CLASS ... DEFINITION` + `IMPLEMENTATION`). */\nexport interface ClassDef extends AbapNode {\n readonly kind: 'ClassDef';\n readonly name: Identifier;\n readonly superclass?: Identifier;\n readonly interfaces: readonly Identifier[];\n readonly isFinal?: boolean;\n readonly isAbstract?: boolean;\n readonly isForTesting?: boolean;\n readonly isCreatePrivate?: boolean;\n readonly sections: readonly Section[];\n readonly implementations: readonly MethodImpl[];\n}\n\nexport function classDef(input: {\n name: Identifier;\n superclass?: Identifier;\n interfaces?: readonly Identifier[];\n isFinal?: boolean;\n isAbstract?: boolean;\n isForTesting?: boolean;\n isCreatePrivate?: boolean;\n sections?: readonly Section[];\n implementations?: readonly MethodImpl[];\n abapDoc?: AbapDoc;\n}): ClassDef {\n if (!input.name) {\n throw new AbapAstError('ClassDef: required field \"name\" is missing');\n }\n if (input.isFinal && input.isAbstract) {\n throw new AbapAstError('ClassDef: class cannot be both FINAL and ABSTRACT');\n }\n return Object.freeze({\n kind: 'ClassDef' as const,\n name: input.name,\n superclass: input.superclass,\n interfaces: Object.freeze([...(input.interfaces ?? [])]),\n isFinal: input.isFinal,\n isAbstract: input.isAbstract,\n isForTesting: input.isForTesting,\n isCreatePrivate: input.isCreatePrivate,\n sections: Object.freeze([...(input.sections ?? [])]),\n implementations: Object.freeze([...(input.implementations ?? [])]),\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n\n/** A local class inside a CLAS-POOL (same shape as ClassDef, flagged local). */\nexport interface LocalClassDef extends AbapNode {\n readonly kind: 'LocalClassDef';\n readonly name: Identifier;\n readonly superclass?: Identifier;\n readonly interfaces: readonly Identifier[];\n readonly isFinal?: boolean;\n readonly isAbstract?: boolean;\n readonly isForTesting?: boolean;\n readonly sections: readonly Section[];\n readonly implementations: readonly MethodImpl[];\n readonly local: true;\n}\n\nexport function localClassDef(input: {\n name: Identifier;\n superclass?: Identifier;\n interfaces?: readonly Identifier[];\n isFinal?: boolean;\n isAbstract?: boolean;\n isForTesting?: boolean;\n sections?: readonly Section[];\n implementations?: readonly MethodImpl[];\n}): LocalClassDef {\n if (!input.name) {\n throw new AbapAstError('LocalClassDef: required field \"name\" is missing');\n }\n if (input.isFinal && input.isAbstract) {\n throw new AbapAstError(\n 'LocalClassDef: class cannot be both FINAL and ABSTRACT',\n );\n }\n return Object.freeze({\n kind: 'LocalClassDef' as const,\n name: input.name,\n superclass: input.superclass,\n interfaces: Object.freeze([...(input.interfaces ?? [])]),\n isFinal: input.isFinal,\n isAbstract: input.isAbstract,\n isForTesting: input.isForTesting,\n sections: Object.freeze([...(input.sections ?? [])]),\n implementations: Object.freeze([...(input.implementations ?? [])]),\n local: true as const,\n });\n}\n","import type { AbapDoc, AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeDef } from './types';\nimport type { MethodDef } from './members';\n\n/** A member that may appear inside an interface definition. */\nexport type InterfaceMember = TypeDef | MethodDef;\n\n/** `INTERFACE zif_foo. ... ENDINTERFACE.`. */\nexport interface InterfaceDef extends AbapNode {\n readonly kind: 'InterfaceDef';\n readonly name: Identifier;\n readonly members: readonly InterfaceMember[];\n}\n\nexport function interfaceDef(input: {\n name: Identifier;\n members?: readonly InterfaceMember[];\n abapDoc?: AbapDoc;\n}): InterfaceDef {\n if (!input.name) {\n throw new AbapAstError('InterfaceDef: required field \"name\" is missing');\n }\n const members = input.members ?? [];\n for (const m of members) {\n if (m.kind === 'MethodDef' && m.visibility !== 'public') {\n throw new AbapAstError(\n `InterfaceDef: method \"${m.name}\" must be public (interfaces expose only public methods)`,\n );\n }\n }\n return Object.freeze({\n kind: 'InterfaceDef' as const,\n name: input.name,\n members: Object.freeze([...members]),\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n","export interface PrintOptions {\n /** Spaces per indentation level. Default 2. */\n indent?: number;\n /** 'upper' (default) or 'lower' for ABAP keywords. */\n keywordCase?: 'upper' | 'lower';\n /** Line ending. Default '\\n'. */\n eol?: string;\n}\n\nexport type ResolvedPrintOptions = Required<PrintOptions>;\n\nexport function resolveOptions(o?: PrintOptions): ResolvedPrintOptions {\n return {\n indent: o?.indent ?? 2,\n keywordCase: o?.keywordCase ?? 'upper',\n eol: o?.eol ?? '\\n',\n };\n}\n","import type { ResolvedPrintOptions } from './options';\n\n/** Tiny indentation-aware string builder. */\nexport class Writer {\n private readonly lines: string[] = [];\n private level = 0;\n private readonly opts: ResolvedPrintOptions;\n\n constructor(opts: ResolvedPrintOptions) {\n this.opts = opts;\n }\n\n get options(): ResolvedPrintOptions {\n return this.opts;\n }\n\n indent(): void {\n this.level += 1;\n }\n\n dedent(): void {\n if (this.level === 0) {\n throw new Error('Writer: cannot dedent below 0');\n }\n this.level -= 1;\n }\n\n /** Current indent prefix. */\n prefix(): string {\n return ' '.repeat(this.level * this.opts.indent);\n }\n\n /** Write a full line with current indent. Empty string = blank line (no whitespace). */\n writeLine(s = ''): void {\n if (s.length === 0) {\n this.lines.push('');\n } else {\n this.lines.push(this.prefix() + s);\n }\n }\n\n /** Append text to the most recent line (no newline). Starts a new indented line if none exists. */\n write(s: string): void {\n if (this.lines.length === 0) {\n this.lines.push(this.prefix() + s);\n } else {\n this.lines[this.lines.length - 1] += s;\n }\n }\n\n /** Emit a blank line. */\n blank(): void {\n this.lines.push('');\n }\n\n /** Emit a line with no indent prefix (used by star comments, which must begin at column 1). */\n rawLine(s: string): void {\n this.lines.push(s);\n }\n\n /** Transform a keyword according to keywordCase. */\n kw(word: string): string {\n return this.opts.keywordCase === 'lower'\n ? word.toLowerCase()\n : word.toUpperCase();\n }\n\n toString(): string {\n return this.lines.join(this.opts.eol);\n }\n}\n","import type { Writer } from './writer';\nimport type { AbapDoc } from '../nodes/base';\nimport type { TypeRef, EnumType, TypeDef } from '../nodes/types';\n\n/**\n * Emit each ABAPDoc line as `\"! <line>` at the current indent, immediately\n * above the following declaration. Does nothing when `doc` is undefined or\n * empty. Content is passed through verbatim — tabs and special characters\n * are preserved.\n */\nexport function printAbapDoc(doc: AbapDoc | undefined, writer: Writer): void {\n if (!doc || doc.length === 0) return;\n for (const line of doc) {\n writer.writeLine(line.length === 0 ? '\"!' : `\"! ${line}`);\n }\n}\n\n/** Print a TypeRef as an inline type expression (e.g. 'string', 'i', 'zcl_foo'). */\nexport function printInlineType(type: TypeRef, writer: Writer): string {\n switch (type.kind) {\n case 'BuiltinType': {\n const parts: string[] = [type.name];\n if (type.length !== undefined) {\n parts.push(`${writer.kw('LENGTH')} ${type.length}`);\n }\n if (type.decimals !== undefined) {\n parts.push(`${writer.kw('DECIMALS')} ${type.decimals}`);\n }\n return parts.join(' ');\n }\n case 'NamedTypeRef':\n return type.name;\n case 'TableType':\n throw new Error(\n 'printInlineType: TableType cannot be used as an inline type reference',\n );\n case 'StructureType':\n throw new Error(\n 'printInlineType: StructureType cannot be used as an inline type reference',\n );\n }\n}\n\n/** Print a TYPES top-level declaration. */\nexport function printTypeDef(node: TypeDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const t: TypeRef | EnumType = node.type;\n if (t.kind === 'StructureType') {\n writer.writeLine(`${K('TYPES')}: ${K('BEGIN OF')} ${node.name},`);\n writer.indent();\n const maxName = Math.max(...t.fields.map((f) => f.name.length));\n t.fields.forEach((f) => {\n const pad = ' '.repeat(maxName - f.name.length);\n writer.writeLine(\n `${f.name}${pad} ${K('TYPE')} ${printInlineType(f.type, writer)},`,\n );\n });\n writer.dedent();\n writer.writeLine(`${K('END OF')} ${node.name}.`);\n return;\n }\n if (t.kind === 'TableType') {\n const tableKindKw: Record<typeof t.tableKind, string> = {\n standard: K('STANDARD'),\n sorted: K('SORTED'),\n hashed: K('HASHED'),\n };\n const kindKw = tableKindKw[t.tableKind];\n const row = printInlineType(t.rowType, writer);\n let key: string;\n if (t.keyFields && t.keyFields.length > 0) {\n const uniq = t.uniqueness === 'unique' ? K('UNIQUE') : K('NON-UNIQUE');\n key = `${K('WITH')} ${uniq} ${K('KEY')} ${t.keyFields.join(' ')}`;\n } else {\n key = `${K('WITH')} ${K('DEFAULT KEY')}`;\n }\n writer.writeLine(\n `${K('TYPES')} ${node.name} ${K('TYPE')} ${kindKw} ${K('TABLE OF')} ${row} ${key}.`,\n );\n return;\n }\n if (t.kind === 'EnumType') {\n writer.writeLine(\n `${K('TYPES')}: ${K('BEGIN OF ENUM')} ${node.name} ${K('BASE TYPE')} ${printInlineType(t.baseType, writer)},`,\n );\n writer.indent();\n const maxName = Math.max(...t.members.map((m) => m.name.length));\n t.members.forEach((m) => {\n const pad = ' '.repeat(maxName - m.name.length);\n const val =\n typeof m.value === 'number' ? String(m.value) : `'${m.value}'`;\n writer.writeLine(`${m.name}${pad} ${K('VALUE')} ${val},`);\n });\n writer.dedent();\n writer.writeLine(`${K('END OF ENUM')} ${node.name}.`);\n return;\n }\n // BuiltinType or NamedTypeRef\n writer.writeLine(\n `${K('TYPES')} ${node.name} ${K('TYPE')} ${printInlineType(t, writer)}.`,\n );\n}\n","import type { Writer } from './writer';\nimport type {\n Expression,\n NamedArg,\n StringTemplate,\n} from '../nodes/expressions';\nimport { printInlineType } from './print-types';\n\n/** Print an expression to a single string (no newlines unless forced by wrapping). */\nexport function printExpression(expr: Expression, writer: Writer): string {\n switch (expr.kind) {\n case 'Literal':\n return printLiteral(expr.literalKind, expr.value);\n case 'IdentifierExpr':\n return expr.name;\n case 'ConstructorExpr': {\n const type = printInlineType(expr.type, writer);\n const args = printArgs(expr.args, writer, 0);\n return `${writer.kw('NEW')} ${type}(${args})`;\n }\n case 'MethodCallExpr': {\n const args = printArgs(expr.args, writer, 0);\n if (expr.callKind === 'static') {\n const recv =\n expr.receiver !== undefined\n ? printExpression(expr.receiver, writer)\n : '';\n const head = recv.length > 0 ? `${recv}=>${expr.method}` : expr.method;\n return `${head}(${args})`;\n }\n if (expr.receiver === undefined) {\n throw new Error('MethodCallExpr: instance call has no receiver');\n }\n const recv = printExpression(expr.receiver, writer);\n return `${recv}->${expr.method}(${args})`;\n }\n case 'BinOp': {\n // Preserve operator grouping — wrap nested BinOp operands in parens\n // so that `a AND (b OR c)` does not flatten to `a AND b OR c` and\n // change the ABAP condition semantics.\n const wrap = (inner: Expression): string => {\n const src = printExpression(inner, writer);\n return inner.kind === 'BinOp' ? `( ${src} )` : src;\n };\n const left = wrap(expr.left);\n const right = wrap(expr.right);\n const op =\n expr.op === 'AND' || expr.op === 'OR' ? writer.kw(expr.op) : expr.op;\n return `${left} ${op} ${right}`;\n }\n case 'StringTemplate':\n return printStringTemplate(expr, writer);\n case 'Cast': {\n const type = printInlineType(expr.type, writer);\n const inner = printExpression(expr.expr, writer);\n return `${writer.kw('CAST')} ${type}( ${inner} )`;\n }\n }\n}\n\nfunction printLiteral(\n kind: 'string' | 'int' | 'bool' | 'hex',\n value: string | number | boolean,\n): string {\n switch (kind) {\n case 'string':\n return `'${String(value).replaceAll(\"'\", `''`)}'`;\n case 'int':\n return String(value);\n case 'bool':\n return (value as boolean) ? 'abap_true' : 'abap_false';\n case 'hex':\n return `'${String(value)}'`;\n }\n}\n\n/** Print the inside of `( ... )` for a named-arg list. Empty → ' ' (ABAP convention). */\nexport function printArgs(\n args: readonly NamedArg[],\n writer: Writer,\n currentColumn: number,\n): string {\n if (args.length === 0) {\n return ' ';\n }\n const single = args\n .map((a) => `${a.name} = ${printExpression(a.value, writer)}`)\n .join(' ');\n const singleLine = ` ${single} `;\n // Heuristic: wrap when total column would exceed 80.\n if (currentColumn + singleLine.length + 2 <= 80) {\n return singleLine;\n }\n const eol = writer.options.eol;\n const pad = ' '.repeat(currentColumn + writer.options.indent);\n const parts = args.map(\n (a) => `${pad}${a.name} = ${printExpression(a.value, writer)}`,\n );\n return eol + parts.join(eol) + eol + ' '.repeat(currentColumn);\n}\n\nfunction printStringTemplate(node: StringTemplate, writer: Writer): string {\n let out = '|';\n for (const part of node.parts) {\n if (part.partKind === 'text') {\n out += part.text;\n } else {\n out += `{ ${printExpression(part.expr, writer)} }`;\n }\n }\n out += '|';\n return out;\n}\n","import type { Writer } from './writer';\nimport type { Statement } from '../nodes/statements';\nimport type { DataDecl, FieldSymbolDecl } from '../nodes/data';\nimport type { Comment } from '../nodes/base';\nimport { printExpression, printArgs } from './print-expressions';\nimport { printInlineType } from './print-types';\n\nexport function printStatements(\n stmts: readonly Statement[],\n writer: Writer,\n): void {\n for (const s of stmts) {\n printStatement(s, writer);\n }\n}\n\nexport function printStatement(stmt: Statement, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n switch (stmt.kind) {\n case 'Comment':\n printComment(stmt, writer);\n return;\n case 'DataDecl':\n printDataDecl(stmt, writer);\n return;\n case 'FieldSymbolDecl':\n printFieldSymbolDecl(stmt, writer);\n return;\n case 'Assign': {\n const target = printExpression(stmt.target, writer);\n const value = printExpression(stmt.value, writer);\n writer.writeLine(`${target} = ${value}.`);\n return;\n }\n case 'Call': {\n const col = writer.prefix().length;\n if (stmt.callKind === 'static') {\n const recv =\n stmt.receiver !== undefined\n ? printExpression(stmt.receiver, writer)\n : '';\n const head = recv.length > 0 ? `${recv}=>${stmt.method}` : stmt.method;\n const args = printArgs(stmt.args, writer, col + head.length + 1);\n writer.writeLine(`${head}(${args}).`);\n } else {\n if (stmt.receiver === undefined) {\n throw new Error('Call: instance call has no receiver');\n }\n const recv = printExpression(stmt.receiver, writer);\n const head = `${recv}->${stmt.method}`;\n const args = printArgs(stmt.args, writer, col + head.length + 1);\n writer.writeLine(`${head}(${args}).`);\n }\n return;\n }\n case 'Raise': {\n const col = writer.prefix().length;\n const type = printInlineType(stmt.exceptionType, writer);\n const head = `${K('RAISE EXCEPTION')} ${K('NEW')} ${type}`;\n const args = printArgs(stmt.args, writer, col + head.length + 1);\n writer.writeLine(`${head}(${args}).`);\n return;\n }\n case 'If': {\n writer.writeLine(\n `${K('IF')} ${printExpression(stmt.condition, writer)}.`,\n );\n writer.indent();\n printStatements(stmt.thenBody, writer);\n writer.dedent();\n for (const b of stmt.elseIfs) {\n writer.writeLine(\n `${K('ELSEIF')} ${printExpression(b.condition, writer)}.`,\n );\n writer.indent();\n printStatements(b.body, writer);\n writer.dedent();\n }\n if (stmt.else) {\n writer.writeLine(`${K('ELSE')}.`);\n writer.indent();\n printStatements(stmt.else, writer);\n writer.dedent();\n }\n writer.writeLine(`${K('ENDIF')}.`);\n return;\n }\n case 'Loop': {\n const table = printExpression(stmt.table, writer);\n const bind =\n stmt.binding.bindKind === 'into'\n ? `${K('INTO')} ${stmt.binding.target}`\n : `${K('ASSIGNING')} ${stmt.binding.fieldSymbol}`;\n writer.writeLine(`${K('LOOP AT')} ${table} ${bind}.`);\n writer.indent();\n printStatements(stmt.body, writer);\n writer.dedent();\n writer.writeLine(`${K('ENDLOOP')}.`);\n return;\n }\n case 'Return': {\n if (stmt.value !== undefined) {\n writer.writeLine(\n `${stmt.target} = ${printExpression(stmt.value, writer)}.`,\n );\n }\n writer.writeLine(`${K('RETURN')}.`);\n return;\n }\n case 'Try': {\n writer.writeLine(`${K('TRY')}.`);\n writer.indent();\n printStatements(stmt.body, writer);\n writer.dedent();\n for (const c of stmt.catches) {\n const types = c.exceptionTypes\n .map((t) => printInlineType(t, writer))\n .join(' ');\n const into = c.into ? ` ${K('INTO')} ${c.into}` : '';\n writer.writeLine(`${K('CATCH')} ${types}${into}.`);\n writer.indent();\n printStatements(c.body, writer);\n writer.dedent();\n }\n if (stmt.cleanup) {\n writer.writeLine(`${K('CLEANUP')}.`);\n writer.indent();\n printStatements(stmt.cleanup, writer);\n writer.dedent();\n }\n writer.writeLine(`${K('ENDTRY')}.`);\n return;\n }\n case 'Append': {\n const v = printExpression(stmt.value, writer);\n const t = printExpression(stmt.table, writer);\n writer.writeLine(`${K('APPEND')} ${v} ${K('TO')} ${t}.`);\n return;\n }\n case 'Insert': {\n const v = printExpression(stmt.value, writer);\n const t = printExpression(stmt.table, writer);\n writer.writeLine(`${K('INSERT')} ${v} ${K('INTO TABLE')} ${t}.`);\n return;\n }\n case 'Read': {\n const t = printExpression(stmt.table, writer);\n const bind =\n stmt.binding.bindKind === 'into'\n ? `${K('INTO')} ${stmt.binding.target}`\n : `${K('ASSIGNING')} ${stmt.binding.fieldSymbol}`;\n const parts: string[] = [`${K('READ TABLE')} ${t}`];\n if (stmt.index !== undefined) {\n parts.push(`${K('INDEX')} ${printExpression(stmt.index, writer)}`);\n }\n parts.push(bind);\n if (stmt.withKey && stmt.withKey.length > 0) {\n const kv = stmt.withKey\n .map((a) => `${a.name} = ${printExpression(a.value, writer)}`)\n .join(' ');\n parts.push(`${K('WITH KEY')} ${kv}`);\n }\n writer.writeLine(parts.join(' ') + '.');\n return;\n }\n case 'Clear': {\n writer.writeLine(\n `${K('CLEAR')} ${printExpression(stmt.target, writer)}.`,\n );\n return;\n }\n case 'Exit':\n writer.writeLine(`${K('EXIT')}.`);\n return;\n case 'Continue':\n writer.writeLine(`${K('CONTINUE')}.`);\n return;\n case 'Raw': {\n const lines = stmt.source.split(/\\r?\\n/);\n for (const line of lines) {\n writer.writeLine(line);\n }\n return;\n }\n }\n}\n\nexport function printComment(node: Comment, writer: Writer): void {\n if (node.style === 'star') {\n // Star comments begin at column 1.\n const lines = node.text.split(/\\r?\\n/);\n for (const line of lines) {\n // Push raw line — bypass indent prefix.\n writer.rawLine(`* ${line}`);\n }\n } else {\n const lines = node.text.split(/\\r?\\n/);\n for (const line of lines) {\n writer.writeLine(`\" ${line}`);\n }\n }\n}\n\nexport function printDataDecl(node: DataDecl, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n const kw = node.classData ? K('CLASS-DATA') : K('DATA');\n const type = printInlineType(node.type, writer);\n let line = `${kw} ${node.name} ${K('TYPE')} ${type}`;\n if (node.initial !== undefined) {\n line += ` ${K('VALUE')} ${printExpression(node.initial, writer)}`;\n }\n writer.writeLine(`${line}.`);\n}\n\nexport function printFieldSymbolDecl(\n node: FieldSymbolDecl,\n writer: Writer,\n): void {\n const K = (s: string): string => writer.kw(s);\n const type = printInlineType(node.type, writer);\n writer.writeLine(`${K('FIELD-SYMBOLS')} ${node.name} ${K('TYPE')} ${type}.`);\n}\n","import type { Writer } from './writer';\nimport type {\n AttributeDef,\n EventDef,\n MethodDef,\n MethodImpl,\n MethodParam,\n} from '../nodes/members';\nimport type { ConstantDecl } from '../nodes/data';\nimport { printInlineType, printAbapDoc } from './print-types';\nimport { printExpression } from './print-expressions';\nimport { printStatements } from './print-statements';\n\nexport function printAttributeDef(node: AttributeDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const kw = node.classData ? K('CLASS-DATA') : K('DATA');\n const type = printInlineType(node.type, writer);\n let line = `${kw} ${node.name} ${K('TYPE')} ${type}`;\n if (node.readOnly) {\n line += ` ${K('READ-ONLY')}`;\n }\n if (node.initial !== undefined) {\n line += ` ${K('VALUE')} ${printExpression(node.initial, writer)}`;\n }\n writer.writeLine(`${line}.`);\n}\n\nexport function printConstantDecl(node: ConstantDecl, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n const kw = node.classData ? K('CLASS-CONSTANTS') : K('CONSTANTS');\n const type = printInlineType(node.type, writer);\n writer.writeLine(\n `${kw} ${node.name} ${K('TYPE')} ${type} ${K('VALUE')} ${printExpression(node.value, writer)}.`,\n );\n}\n\nexport function printEventDef(node: EventDef, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n const kw = node.isClassEvent ? K('CLASS-EVENTS') : K('EVENTS');\n writer.writeLine(`${kw} ${node.name}.`);\n}\n\nconst PARAM_KW: Record<MethodParam['paramKind'], string> = {\n importing: 'IMPORTING',\n exporting: 'EXPORTING',\n changing: 'CHANGING',\n returning: 'RETURNING',\n};\n\n/** Group params by kind (preserving AST order within each group). */\nfunction groupParams(\n params: readonly MethodParam[],\n): ReadonlyArray<{ kind: MethodParam['paramKind']; items: MethodParam[] }> {\n const order: MethodParam['paramKind'][] = [\n 'importing',\n 'exporting',\n 'changing',\n 'returning',\n ];\n const result: { kind: MethodParam['paramKind']; items: MethodParam[] }[] = [];\n for (const k of order) {\n const items = params.filter((p) => p.paramKind === k);\n if (items.length > 0) {\n result.push({ kind: k, items });\n }\n }\n return result;\n}\n\nfunction printParamBody(p: MethodParam, writer: Writer): string {\n const K = (s: string): string => writer.kw(s);\n const type = printInlineType(p.typeRef, writer);\n let body: string;\n if (p.paramKind === 'returning') {\n body = `${K('VALUE')}(${p.name}) ${K('TYPE')} ${type}`;\n } else {\n body = `${p.name} ${K('TYPE')} ${type}`;\n }\n if (p.optional) {\n body += ` ${K('OPTIONAL')}`;\n }\n if (p.default !== undefined) {\n body += ` ${K('DEFAULT')} ${printExpression(p.default, writer)}`;\n }\n return body;\n}\n\nexport function printMethodDef(node: MethodDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const flagsPrefix = node.isClassMethod ? K('CLASS-METHODS') : K('METHODS');\n const suffixFlags: string[] = [];\n if (node.isAbstract) suffixFlags.push(K('ABSTRACT'));\n if (node.isFinal) suffixFlags.push(K('FINAL'));\n if (node.isRedefinition) suffixFlags.push(K('REDEFINITION'));\n if (node.isForTesting) suffixFlags.push(K('FOR TESTING'));\n\n const groups = groupParams(node.params);\n const hasAny = groups.length > 0 || node.raising.length > 0;\n\n if (!hasAny && suffixFlags.length === 0) {\n writer.writeLine(`${flagsPrefix} ${node.name}.`);\n return;\n }\n\n if (!hasAny) {\n writer.writeLine(`${flagsPrefix} ${node.name} ${suffixFlags.join(' ')}.`);\n return;\n }\n\n // Header line\n writer.writeLine(`${flagsPrefix} ${node.name}`);\n writer.indent();\n // Parameter groups\n for (const g of groups) {\n const kw = K(PARAM_KW[g.kind]);\n if (g.items.length === 1) {\n writer.writeLine(`${kw} ${printParamBody(g.items[0], writer)}`);\n } else {\n writer.writeLine(kw);\n writer.indent();\n g.items.forEach((p) => {\n writer.writeLine(printParamBody(p, writer));\n });\n writer.dedent();\n }\n }\n if (node.raising.length > 0) {\n const types = node.raising.map((t) => printInlineType(t, writer)).join(' ');\n writer.writeLine(`${K('RAISING')} ${types}`);\n }\n if (suffixFlags.length > 0) {\n writer.writeLine(suffixFlags.join(' '));\n }\n writer.dedent();\n // Terminate last emitted line with a period.\n // Find the last non-empty line and add '.'.\n // The writer's toString uses internal lines[]; append '.' via write().\n writer.write('.');\n}\n\nexport function printMethodImpl(node: MethodImpl, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('METHOD')} ${node.name}.`);\n writer.indent();\n printStatements(node.body, writer);\n writer.dedent();\n writer.writeLine(`${K('ENDMETHOD')}.`);\n}\n","import type { Writer } from './writer';\nimport type { ClassDef, LocalClassDef, Section } from '../nodes/class';\nimport type { Visibility } from '../nodes/base';\nimport { printTypeDef, printAbapDoc } from './print-types';\nimport {\n printAttributeDef,\n printConstantDecl,\n printEventDef,\n printMethodDef,\n printMethodImpl,\n} from './print-members';\n\nconst VIS_KW: Record<Visibility, string> = {\n public: 'PUBLIC SECTION',\n protected: 'PROTECTED SECTION',\n private: 'PRIVATE SECTION',\n};\n\nfunction printSection(\n sec: Section,\n writer: Writer,\n opts?: { readonly leadingInterfaces?: readonly string[] },\n): void {\n writer.writeLine(`${writer.kw(VIS_KW[sec.visibility])}.`);\n writer.indent();\n for (const i of opts?.leadingInterfaces ?? []) {\n writer.writeLine(`${writer.kw('INTERFACES')} ${i}.`);\n }\n for (const m of sec.members) {\n switch (m.kind) {\n case 'TypeDef':\n printTypeDef(m, writer);\n break;\n case 'AttributeDef':\n printAttributeDef(m, writer);\n break;\n case 'MethodDef':\n printMethodDef(m, writer);\n break;\n case 'ConstantDecl':\n printConstantDecl(m, writer);\n break;\n case 'EventDef':\n printEventDef(m, writer);\n break;\n }\n }\n writer.dedent();\n}\n\nfunction printDefinitionHeader(\n name: string,\n opts: {\n readonly local: boolean;\n readonly superclass?: string;\n readonly interfaces: readonly string[];\n readonly isFinal?: boolean;\n readonly isAbstract?: boolean;\n readonly isForTesting?: boolean;\n readonly isCreatePrivate?: boolean;\n /**\n * When true, the class has explicit visibility sections and the\n * `INTERFACES` declarations must be emitted inside the first public\n * section rather than at class-body level. ABAP cloud rejects\n * `INTERFACES` placed outside a SECTION with\n * \"There is no PUBLIC / PROTECTED / PRIVATE SECTION statement\".\n */\n readonly interfacesInsidePublicSection?: boolean;\n },\n writer: Writer,\n): void {\n const K = (s: string): string => writer.kw(s);\n const parts: string[] = [`${K('CLASS')} ${name} ${K('DEFINITION')}`];\n if (!opts.local) {\n parts.push(K('PUBLIC'));\n }\n if (opts.isFinal) parts.push(K('FINAL'));\n if (opts.isAbstract) parts.push(K('ABSTRACT'));\n if (opts.isForTesting) parts.push(K('FOR TESTING'));\n if (opts.superclass) {\n parts.push(`${K('INHERITING FROM')} ${opts.superclass}`);\n }\n if (!opts.local) {\n parts.push(opts.isCreatePrivate ? K('CREATE PRIVATE') : K('CREATE PUBLIC'));\n }\n writer.writeLine(parts.join(' ') + '.');\n if (!opts.interfacesInsidePublicSection && opts.interfaces.length > 0) {\n writer.indent();\n for (const i of opts.interfaces) {\n writer.writeLine(`${K('INTERFACES')} ${i}.`);\n }\n writer.dedent();\n }\n}\n\nfunction printSections(\n sections: readonly Section[],\n writer: Writer,\n opts?: { readonly leadingInterfaces?: readonly string[] },\n): void {\n const leadingInterfaces = opts?.leadingInterfaces ?? [];\n let publicEmitted = false;\n for (const s of sections) {\n if (!publicEmitted && s.visibility === 'public') {\n printSection(s, writer, { leadingInterfaces });\n publicEmitted = true;\n } else {\n printSection(s, writer);\n }\n }\n // If we have leading INTERFACES but no public section was emitted, emit a\n // minimal public section containing them so the class still compiles.\n if (!publicEmitted && leadingInterfaces.length > 0) {\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('PUBLIC SECTION')}.`);\n writer.indent();\n for (const i of leadingInterfaces) {\n writer.writeLine(`${K('INTERFACES')} ${i}.`);\n }\n writer.dedent();\n }\n}\n\nfunction printImplementations(\n name: string,\n impls: ReadonlyArray<import('../nodes/members').MethodImpl>,\n writer: Writer,\n): void {\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('CLASS')} ${name} ${K('IMPLEMENTATION')}.`);\n writer.indent();\n impls.forEach((impl, idx) => {\n if (idx > 0) writer.blank();\n printMethodImpl(impl, writer);\n });\n writer.dedent();\n writer.writeLine(`${K('ENDCLASS')}.`);\n}\n\nexport function printClassDef(node: ClassDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const hasSections = node.sections.length > 0;\n printDefinitionHeader(\n node.name,\n {\n local: false,\n superclass: node.superclass,\n interfaces: node.interfaces,\n isFinal: node.isFinal,\n isAbstract: node.isAbstract,\n isForTesting: node.isForTesting,\n isCreatePrivate: node.isCreatePrivate,\n interfacesInsidePublicSection: hasSections,\n },\n writer,\n );\n writer.indent();\n printSections(node.sections, writer, {\n leadingInterfaces: hasSections ? node.interfaces : [],\n });\n writer.dedent();\n writer.writeLine(`${K('ENDCLASS')}.`);\n writer.blank();\n printImplementations(node.name, node.implementations, writer);\n}\n\nexport function printLocalClassDef(node: LocalClassDef, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n printDefinitionHeader(\n node.name,\n {\n local: true,\n superclass: node.superclass,\n interfaces: node.interfaces,\n isFinal: node.isFinal,\n isAbstract: node.isAbstract,\n isForTesting: node.isForTesting,\n },\n writer,\n );\n writer.indent();\n printSections(node.sections, writer);\n writer.dedent();\n writer.writeLine(`${K('ENDCLASS')}.`);\n if (node.implementations.length > 0) {\n writer.blank();\n printImplementations(node.name, node.implementations, writer);\n }\n}\n","import type { Writer } from './writer';\nimport type { InterfaceDef } from '../nodes/interface';\nimport { printTypeDef, printAbapDoc } from './print-types';\nimport { printMethodDef } from './print-members';\n\nexport function printInterfaceDef(node: InterfaceDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('INTERFACE')} ${node.name} ${K('PUBLIC')}.`);\n writer.indent();\n for (const m of node.members) {\n switch (m.kind) {\n case 'TypeDef':\n printTypeDef(m, writer);\n break;\n case 'MethodDef':\n printMethodDef(m, writer);\n break;\n }\n }\n writer.dedent();\n writer.writeLine(`${K('ENDINTERFACE')}.`);\n}\n","import type { AbapNode } from '../nodes/base';\nimport type { PrintOptions } from './options';\nimport { resolveOptions } from './options';\nimport { Writer } from './writer';\nimport { printTypeDef } from './print-types';\nimport { printExpression } from './print-expressions';\nimport {\n printStatement,\n printDataDecl,\n printFieldSymbolDecl,\n printComment,\n} from './print-statements';\nimport {\n printAttributeDef,\n printConstantDecl,\n printEventDef,\n printMethodDef,\n printMethodImpl,\n} from './print-members';\nimport { printClassDef, printLocalClassDef } from './print-class';\nimport { printInterfaceDef } from './print-interface';\n\nexport type { PrintOptions, ResolvedPrintOptions } from './options';\nexport { Writer } from './writer';\nexport { printInlineType } from './print-types';\nexport { printExpression } from './print-expressions';\n\n/** Pretty-print an ABAP AST node to source code. */\nexport function print(node: AbapNode, options?: PrintOptions): string {\n const writer = new Writer(resolveOptions(options));\n printNode(node, writer);\n return writer.toString();\n}\n\nfunction printNode(node: AbapNode, writer: Writer): void {\n switch (node.kind) {\n // Top-level / structural\n case 'ClassDef':\n printClassDef(node as Parameters<typeof printClassDef>[0], writer);\n return;\n case 'LocalClassDef':\n printLocalClassDef(\n node as Parameters<typeof printLocalClassDef>[0],\n writer,\n );\n return;\n case 'InterfaceDef':\n printInterfaceDef(\n node as Parameters<typeof printInterfaceDef>[0],\n writer,\n );\n return;\n // Type-level\n case 'TypeDef':\n printTypeDef(node as Parameters<typeof printTypeDef>[0], writer);\n return;\n case 'BuiltinType':\n case 'NamedTypeRef':\n case 'TableType':\n case 'StructureType':\n case 'EnumType':\n throw new Error(\n `print: ${node.kind} is not a top-level node — wrap it in a TypeDef`,\n );\n // Members\n case 'AttributeDef':\n printAttributeDef(\n node as Parameters<typeof printAttributeDef>[0],\n writer,\n );\n return;\n case 'MethodDef':\n printMethodDef(node as Parameters<typeof printMethodDef>[0], writer);\n return;\n case 'MethodImpl':\n printMethodImpl(node as Parameters<typeof printMethodImpl>[0], writer);\n return;\n case 'EventDef':\n printEventDef(node as Parameters<typeof printEventDef>[0], writer);\n return;\n case 'ConstantDecl':\n printConstantDecl(\n node as Parameters<typeof printConstantDecl>[0],\n writer,\n );\n return;\n case 'Section':\n throw new Error(\n 'print: Section is an internal node — print its enclosing ClassDef/LocalClassDef instead',\n );\n case 'MethodParam':\n throw new Error(\n 'print: MethodParam is an internal node — print its enclosing MethodDef',\n );\n // Data (as statement)\n case 'DataDecl':\n printDataDecl(node as Parameters<typeof printDataDecl>[0], writer);\n return;\n case 'FieldSymbolDecl':\n printFieldSymbolDecl(\n node as Parameters<typeof printFieldSymbolDecl>[0],\n writer,\n );\n return;\n // Statements\n case 'Assign':\n case 'Call':\n case 'Raise':\n case 'If':\n case 'Loop':\n case 'Return':\n case 'Try':\n case 'Append':\n case 'Insert':\n case 'Read':\n case 'Clear':\n case 'Exit':\n case 'Continue':\n case 'Raw':\n printStatement(node as Parameters<typeof printStatement>[0], writer);\n return;\n case 'Comment':\n printComment(node as Parameters<typeof printComment>[0], writer);\n return;\n // Expressions (printed as a single-line expression — no trailing period)\n case 'Literal':\n case 'IdentifierExpr':\n case 'ConstructorExpr':\n case 'MethodCallExpr':\n case 'BinOp':\n case 'StringTemplate':\n case 'Cast':\n writer.writeLine(\n printExpression(node as Parameters<typeof printExpression>[0], writer),\n );\n return;\n }\n}\n"],"mappings":";AAAA,IAAa,eAAb,cAAkC,MAAM;CACtC,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,aACd,OACA,OACA,UACG;CACH,IAAI,UAAU,UAAa,UAAU,QAAQ,UAAU,IACrD,MAAM,IAAI,aAAa,GAAG,SAAS,oBAAoB,MAAM,aAAa;CAE5E,OAAO;AACT;;;;ACiEA,SAAgB,QAAQ,OAGZ;CACV,IAAI,OAAO,MAAM,SAAS,UACxB,MAAM,IAAI,aAAa,6CAA2C;CAEpE,OAAO,OAAO,OAAO;EACnB,MAAM;EACN,MAAM,MAAM;EACZ,OAAO,MAAM,SAAS;CACxB,CAAC;AACH;;;;AC5EA,MAAM,qCACJ,IAAI,IAAqB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AASH,SAAgB,YAAY,OAIZ;CACd,IAAI,CAAC,MAAM,MACT,MAAM,IAAI,aAAa,iDAA+C;CAExE,IAAI,CAAC,mBAAmB,IAAI,MAAM,IAAI,GACpC,MAAM,IAAI,aACR,sCAAsC,OAAO,M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AAO,OAAO,SAAS;AACzB;AAEA,SAAS,UAAU,MAAgB,QAAsB;CACvD,QAAQ,KAAK,MAAb;EAEE,KAAK;GACH,cAAc,MAA6C,MAAM;GACjE;EACF,KAAK;GACH,mBACE,MACA,MACF;GACA;EACF,KAAK;GACH,kBACE,MACA,MACF;GACA;EAEF,KAAK;GACH,aAAa,MAA4C,MAAM;GAC/D;EACF,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,YACH,MAAM,IAAI,MACR,UAAU,KAAK,KAAK,gDACtB;EAEF,KAAK;GACH,kBACE,MACA,MACF;GACA;EACF,KAAK;GACH,eAAe,MAA8C,MAAM;GACnE;EACF,KAAK;GACH,gBAAgB,MAA+C,MAAM;GACrE;EACF,KAAK;GACH,cAAc,MAA6C,MAAM;GACjE;EACF,KAAK;GACH,kBACE,MACA,MACF;GACA;EACF,KAAK,WACH,MAAM,IAAI,MACR,yFACF;EACF,KAAK,eACH,MAAM,IAAI,MACR,wEACF;EAEF,KAAK;GACH,cAAc,MAA6C,MAAM;GACjE;EACF,KAAK;GACH,qBACE,MACA,MACF;GACA;EAEF,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;GACH,eAAe,MAA8C,MAAM;GACnE;EACF,KAAK;GACH,aAAa,MAA4C,MAAM;GAC/D;EAEF,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;GACH,OAAO,UACL,gBAAgB,MAA+C,MAAM,CACvE;GACA;CACJ;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/nodes/errors.ts","../src/nodes/base.ts","../src/nodes/types.ts","../src/nodes/data.ts","../src/nodes/expressions.ts","../src/nodes/statements.ts","../src/nodes/members.ts","../src/nodes/class.ts","../src/nodes/interface.ts","../src/printer/options.ts","../src/printer/writer.ts","../src/printer/print-types.ts","../src/printer/print-expressions.ts","../src/printer/print-statements.ts","../src/printer/print-members.ts","../src/printer/print-class.ts","../src/printer/print-interface.ts","../src/printer/index.ts"],"sourcesContent":["export class AbapAstError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AbapAstError';\n }\n}\n\nexport function requireField<T>(\n value: T | undefined | null,\n field: string,\n nodeKind: string,\n): T {\n if (value === undefined || value === null || value === '') {\n throw new AbapAstError(`${nodeKind}: required field \"${field}\" is missing`);\n }\n return value;\n}\n","import { AbapAstError } from './errors';\n\n/** All node kinds in the AST. */\nexport type NodeKind =\n // types\n | 'BuiltinType'\n | 'TableType'\n | 'StructureType'\n | 'NamedTypeRef'\n | 'EnumType'\n | 'TypeDef'\n // data\n | 'DataDecl'\n | 'ConstantDecl'\n | 'FieldSymbolDecl'\n // statements\n | 'Assign'\n | 'Call'\n | 'Raise'\n | 'If'\n | 'Loop'\n | 'Return'\n | 'Try'\n | 'Append'\n | 'Insert'\n | 'Read'\n | 'Clear'\n | 'Exit'\n | 'Continue'\n | 'Raw'\n // expressions\n | 'Literal'\n | 'IdentifierExpr'\n | 'ConstructorExpr'\n | 'MethodCallExpr'\n | 'BinOp'\n | 'StringTemplate'\n | 'Cast'\n // members\n | 'MethodParam'\n | 'MethodDef'\n | 'MethodImpl'\n | 'EventDef'\n | 'AttributeDef'\n // class / interface\n | 'Section'\n | 'ClassDef'\n | 'LocalClassDef'\n | 'InterfaceDef'\n // shared\n | 'Comment';\n\n/**\n * A single ABAPDoc comment line. Stored without the leading `\"!` prefix.\n * The prefix is added by the printer at emit time.\n */\nexport type AbapDocLine = string;\n\n/**\n * ABAPDoc metadata attached to a declaration node. Each entry is a logical\n * line; printers emit one `\"! <line>` per entry immediately above the\n * declaration, at the same indentation as the declaration itself.\n */\nexport type AbapDoc = readonly AbapDocLine[];\n\n/** Base shape for any AST node. */\nexport interface AbapNode {\n readonly kind: NodeKind;\n readonly abapDoc?: AbapDoc;\n}\n\n/** An ABAP identifier (not validated beyond presence). */\nexport type Identifier = string;\n\n/** An ABAP comment. Star comments begin at column 1; line comments use `\"`. */\nexport interface Comment extends AbapNode {\n readonly kind: 'Comment';\n readonly text: string;\n readonly style: 'star' | 'line';\n}\n\nexport function comment(input: {\n text: string;\n style?: 'star' | 'line';\n}): Comment {\n if (typeof input.text !== 'string') {\n throw new AbapAstError('Comment: required field \"text\" is missing');\n }\n return Object.freeze({\n kind: 'Comment' as const,\n text: input.text,\n style: input.style ?? 'line',\n });\n}\n\n/** Visibility modifier for class members / sections. */\nexport type Visibility = 'public' | 'protected' | 'private';\n","import type { AbapDoc, AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\n\n/** ABAP builtin type names allowed in the AST. */\nexport type BuiltinTypeName =\n | 'i'\n | 'int8'\n | 'f'\n | 'decfloat34'\n | 'd'\n | 't'\n | 'timestampl'\n | 'string'\n | 'xstring'\n | 'abap_bool'\n | 'sysuuid_x16';\n\nconst BUILTIN_TYPE_NAMES: ReadonlySet<BuiltinTypeName> =\n new Set<BuiltinTypeName>([\n 'i',\n 'int8',\n 'f',\n 'decfloat34',\n 'd',\n 't',\n 'timestampl',\n 'string',\n 'xstring',\n 'abap_bool',\n 'sysuuid_x16',\n ]);\n\nexport interface BuiltinType extends AbapNode {\n readonly kind: 'BuiltinType';\n readonly name: BuiltinTypeName;\n readonly length?: number;\n readonly decimals?: number;\n}\n\nexport function builtinType(input: {\n name: BuiltinTypeName;\n length?: number;\n decimals?: number;\n}): BuiltinType {\n if (!input.name) {\n throw new AbapAstError('BuiltinType: required field \"name\" is missing');\n }\n if (!BUILTIN_TYPE_NAMES.has(input.name)) {\n throw new AbapAstError(\n `BuiltinType: unknown builtin type \"${String(input.name)}\"`,\n );\n }\n return Object.freeze({\n kind: 'BuiltinType' as const,\n name: input.name,\n length: input.length,\n decimals: input.decimals,\n });\n}\n\n/** Reference to a named type (e.g. `zif_foo=>ty_bar`). */\nexport interface NamedTypeRef extends AbapNode {\n readonly kind: 'NamedTypeRef';\n readonly name: Identifier;\n}\n\nexport function namedTypeRef(input: { name: Identifier }): NamedTypeRef {\n if (!input.name) {\n throw new AbapAstError('NamedTypeRef: required field \"name\" is missing');\n }\n return Object.freeze({ kind: 'NamedTypeRef' as const, name: input.name });\n}\n\n/** Type reference used in declarations. */\nexport type TypeRef = BuiltinType | NamedTypeRef | TableType | StructureType;\n\n/** ABAP internal table type. */\nexport interface TableType extends AbapNode {\n readonly kind: 'TableType';\n readonly rowType: TypeRef;\n readonly tableKind: 'standard' | 'sorted' | 'hashed';\n readonly uniqueness?: 'unique' | 'non-unique';\n readonly keyFields?: readonly Identifier[];\n}\n\nexport function tableType(input: {\n rowType: TypeRef;\n tableKind?: 'standard' | 'sorted' | 'hashed';\n uniqueness?: 'unique' | 'non-unique';\n keyFields?: readonly Identifier[];\n}): TableType {\n if (!input.rowType) {\n throw new AbapAstError('TableType: required field \"rowType\" is missing');\n }\n return Object.freeze({\n kind: 'TableType' as const,\n rowType: input.rowType,\n tableKind: input.tableKind ?? 'standard',\n uniqueness: input.uniqueness,\n keyFields: input.keyFields\n ? Object.freeze([...input.keyFields])\n : undefined,\n });\n}\n\n/** Field of a structure type. */\nexport interface StructureField {\n readonly name: Identifier;\n readonly type: TypeRef;\n}\n\n/** ABAP `BEGIN OF ... END OF` structure type. */\nexport interface StructureType extends AbapNode {\n readonly kind: 'StructureType';\n readonly fields: readonly StructureField[];\n}\n\nexport function structureType(input: {\n fields: readonly StructureField[];\n}): StructureType {\n if (!input.fields || input.fields.length === 0) {\n throw new AbapAstError('StructureType: must declare at least one field');\n }\n for (const f of input.fields) {\n if (!f.name) {\n throw new AbapAstError('StructureType: field is missing \"name\"');\n }\n if (!f.type) {\n throw new AbapAstError(\n `StructureType: field \"${f.name}\" is missing \"type\"`,\n );\n }\n }\n return Object.freeze({\n kind: 'StructureType' as const,\n fields: Object.freeze(input.fields.map((f) => Object.freeze({ ...f }))),\n });\n}\n\n/** Enum-like type: a fixed set of name/value pairs with a base type. */\nexport interface EnumMember {\n readonly name: Identifier;\n readonly value: string | number;\n}\n\nexport interface EnumType extends AbapNode {\n readonly kind: 'EnumType';\n readonly baseType: TypeRef;\n readonly members: readonly EnumMember[];\n}\n\nexport function enumType(input: {\n baseType: TypeRef;\n members: readonly EnumMember[];\n}): EnumType {\n if (!input.baseType) {\n throw new AbapAstError('EnumType: required field \"baseType\" is missing');\n }\n if (!input.members || input.members.length === 0) {\n throw new AbapAstError('EnumType: must declare at least one member');\n }\n for (const m of input.members) {\n if (!m.name) {\n throw new AbapAstError('EnumType: member is missing \"name\"');\n }\n }\n return Object.freeze({\n kind: 'EnumType' as const,\n baseType: input.baseType,\n members: Object.freeze(input.members.map((m) => Object.freeze({ ...m }))),\n });\n}\n\n/** Top-level `TYPES: <name> TYPE ...` declaration. */\nexport interface TypeDef extends AbapNode {\n readonly kind: 'TypeDef';\n readonly name: Identifier;\n readonly type: TypeRef | EnumType;\n}\n\nexport function typeDef(input: {\n name: Identifier;\n type: TypeRef | EnumType;\n abapDoc?: AbapDoc;\n}): TypeDef {\n if (!input.name) {\n throw new AbapAstError('TypeDef: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('TypeDef: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'TypeDef' as const,\n name: input.name,\n type: input.type,\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n","import type { AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeRef } from './types';\nimport type { Expression } from './expressions';\n\n/** `DATA lv_x TYPE ... [VALUE ...]`. */\nexport interface DataDecl extends AbapNode {\n readonly kind: 'DataDecl';\n readonly name: Identifier;\n readonly type: TypeRef;\n readonly initial?: Expression;\n readonly classData?: boolean;\n}\n\nexport function dataDecl(input: {\n name: Identifier;\n type: TypeRef;\n initial?: Expression;\n classData?: boolean;\n}): DataDecl {\n if (!input.name) {\n throw new AbapAstError('DataDecl: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('DataDecl: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'DataDecl' as const,\n name: input.name,\n type: input.type,\n initial: input.initial,\n classData: input.classData,\n });\n}\n\n/** `CONSTANTS c_x TYPE ... VALUE ...`. */\nexport interface ConstantDecl extends AbapNode {\n readonly kind: 'ConstantDecl';\n readonly name: Identifier;\n readonly type: TypeRef;\n readonly value: Expression;\n readonly classData?: boolean;\n}\n\nexport function constantDecl(input: {\n name: Identifier;\n type: TypeRef;\n value: Expression;\n classData?: boolean;\n}): ConstantDecl {\n if (!input.name) {\n throw new AbapAstError('ConstantDecl: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('ConstantDecl: required field \"type\" is missing');\n }\n if (!input.value) {\n throw new AbapAstError('ConstantDecl: required field \"value\" is missing');\n }\n return Object.freeze({\n kind: 'ConstantDecl' as const,\n name: input.name,\n type: input.type,\n value: input.value,\n classData: input.classData,\n });\n}\n\n/** `FIELD-SYMBOLS <fs_x> TYPE ...`. */\nexport interface FieldSymbolDecl extends AbapNode {\n readonly kind: 'FieldSymbolDecl';\n readonly name: Identifier;\n readonly type: TypeRef;\n}\n\nexport function fieldSymbolDecl(input: {\n name: Identifier;\n type: TypeRef;\n}): FieldSymbolDecl {\n if (!input.name) {\n throw new AbapAstError('FieldSymbolDecl: required field \"name\" is missing');\n }\n if (!input.name.startsWith('<') || !input.name.endsWith('>')) {\n throw new AbapAstError(\n `FieldSymbolDecl: name \"${input.name}\" must be wrapped in angle brackets (e.g. <fs_x>)`,\n );\n }\n if (!input.type) {\n throw new AbapAstError('FieldSymbolDecl: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'FieldSymbolDecl' as const,\n name: input.name,\n type: input.type,\n });\n}\n","import type { AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeRef } from './types';\n\n/** An expression node (forward-declared union). */\nexport type Expression =\n | Literal\n | IdentifierExpr\n | ConstructorExpr\n | MethodCallExpr\n | BinOp\n | StringTemplate\n | Cast;\n\n/** A literal value. */\nexport interface Literal extends AbapNode {\n readonly kind: 'Literal';\n readonly literalKind: 'string' | 'int' | 'bool' | 'hex';\n readonly value: string | number | boolean;\n}\n\nexport function literal(input: {\n literalKind: 'string' | 'int' | 'bool' | 'hex';\n value: string | number | boolean;\n}): Literal {\n if (!input.literalKind) {\n throw new AbapAstError('Literal: required field \"literalKind\" is missing');\n }\n if (input.value === undefined || input.value === null) {\n throw new AbapAstError('Literal: required field \"value\" is missing');\n }\n if (input.literalKind === 'int' && typeof input.value !== 'number') {\n throw new AbapAstError('Literal: int literal requires a number value');\n }\n if (input.literalKind === 'bool' && typeof input.value !== 'boolean') {\n throw new AbapAstError('Literal: bool literal requires a boolean value');\n }\n if (\n (input.literalKind === 'string' || input.literalKind === 'hex') &&\n typeof input.value !== 'string'\n ) {\n throw new AbapAstError(\n `Literal: ${input.literalKind} literal requires a string value`,\n );\n }\n return Object.freeze({\n kind: 'Literal' as const,\n literalKind: input.literalKind,\n value: input.value,\n });\n}\n\n/** A bare identifier used as an expression (variable, constant reference). */\nexport interface IdentifierExpr extends AbapNode {\n readonly kind: 'IdentifierExpr';\n readonly name: Identifier;\n}\n\nexport function identifierExpr(input: { name: Identifier }): IdentifierExpr {\n if (!input.name) {\n throw new AbapAstError('IdentifierExpr: required field \"name\" is missing');\n }\n return Object.freeze({\n kind: 'IdentifierExpr' as const,\n name: input.name,\n });\n}\n\n/** Named argument on a method call / constructor. */\nexport interface NamedArg {\n readonly name: Identifier;\n readonly value: Expression;\n}\n\n/** `NEW <type>( ... )`. */\nexport interface ConstructorExpr extends AbapNode {\n readonly kind: 'ConstructorExpr';\n readonly type: TypeRef;\n readonly args: readonly NamedArg[];\n}\n\nexport function constructorExpr(input: {\n type: TypeRef;\n args?: readonly NamedArg[];\n}): ConstructorExpr {\n if (!input.type) {\n throw new AbapAstError('ConstructorExpr: required field \"type\" is missing');\n }\n return Object.freeze({\n kind: 'ConstructorExpr' as const,\n type: input.type,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** Chainable method call (static `cl=>m(...)` or instance `ref->m(...)`). */\nexport interface MethodCallExpr extends AbapNode {\n readonly kind: 'MethodCallExpr';\n readonly receiver: Expression | undefined;\n readonly method: Identifier;\n readonly callKind: 'static' | 'instance';\n readonly args: readonly NamedArg[];\n}\n\nexport function methodCallExpr(input: {\n receiver?: Expression;\n method: Identifier;\n callKind: 'static' | 'instance';\n args?: readonly NamedArg[];\n}): MethodCallExpr {\n if (!input.method) {\n throw new AbapAstError(\n 'MethodCallExpr: required field \"method\" is missing',\n );\n }\n if (input.callKind === 'instance' && !input.receiver) {\n throw new AbapAstError('MethodCallExpr: instance calls require a receiver');\n }\n return Object.freeze({\n kind: 'MethodCallExpr' as const,\n receiver: input.receiver,\n method: input.method,\n callKind: input.callKind,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** Comparison / arithmetic operators. */\nexport type BinOperator =\n | '='\n | '<>'\n | '<'\n | '<='\n | '>'\n | '>='\n | '+'\n | '-'\n | '*'\n | '/'\n | 'AND'\n | 'OR';\n\nexport interface BinOp extends AbapNode {\n readonly kind: 'BinOp';\n readonly op: BinOperator;\n readonly left: Expression;\n readonly right: Expression;\n}\n\nexport function binOp(input: {\n op: BinOperator;\n left: Expression;\n right: Expression;\n}): BinOp {\n if (!input.op) {\n throw new AbapAstError('BinOp: required field \"op\" is missing');\n }\n if (!input.left) {\n throw new AbapAstError('BinOp: required field \"left\" is missing');\n }\n if (!input.right) {\n throw new AbapAstError('BinOp: required field \"right\" is missing');\n }\n return Object.freeze({\n kind: 'BinOp' as const,\n op: input.op,\n left: input.left,\n right: input.right,\n });\n}\n\n/** Parts of a string template — literal text or an interpolated expression. */\nexport type StringTemplatePart =\n | { readonly partKind: 'text'; readonly text: string }\n | { readonly partKind: 'expr'; readonly expr: Expression };\n\n/** `|text { expr } more|`. */\nexport interface StringTemplate extends AbapNode {\n readonly kind: 'StringTemplate';\n readonly parts: readonly StringTemplatePart[];\n}\n\nexport function stringTemplate(input: {\n parts: readonly StringTemplatePart[];\n}): StringTemplate {\n if (!input.parts) {\n throw new AbapAstError('StringTemplate: required field \"parts\" is missing');\n }\n return Object.freeze({\n kind: 'StringTemplate' as const,\n parts: Object.freeze(input.parts.map((p) => Object.freeze({ ...p }))),\n });\n}\n\n/** `CAST <type>( expr )`. */\nexport interface Cast extends AbapNode {\n readonly kind: 'Cast';\n readonly type: TypeRef;\n readonly expr: Expression;\n}\n\nexport function cast(input: { type: TypeRef; expr: Expression }): Cast {\n if (!input.type) {\n throw new AbapAstError('Cast: required field \"type\" is missing');\n }\n if (!input.expr) {\n throw new AbapAstError('Cast: required field \"expr\" is missing');\n }\n return Object.freeze({\n kind: 'Cast' as const,\n type: input.type,\n expr: input.expr,\n });\n}\n","import type { AbapNode, Comment, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { Expression, NamedArg } from './expressions';\nimport type { TypeRef } from './types';\nimport type { DataDecl, FieldSymbolDecl } from './data';\n\n/** Union of all statement node types. */\nexport type Statement =\n | Assign\n | Call\n | Raise\n | If\n | Loop\n | Return\n | Try\n | Append\n | Insert\n | Read\n | Clear\n | Exit\n | Continue\n | Raw\n | Comment\n | DataDecl\n | FieldSymbolDecl;\n\n/** `target = value`. */\nexport interface Assign extends AbapNode {\n readonly kind: 'Assign';\n readonly target: Expression;\n readonly value: Expression;\n}\n\nexport function assign(input: {\n target: Expression;\n value: Expression;\n}): Assign {\n if (!input.target) {\n throw new AbapAstError('Assign: required field \"target\" is missing');\n }\n if (!input.value) {\n throw new AbapAstError('Assign: required field \"value\" is missing');\n }\n return Object.freeze({\n kind: 'Assign' as const,\n target: input.target,\n value: input.value,\n });\n}\n\n/** Statement-level method call, e.g. `cl_foo=>bar( iv = 1 ).`. */\nexport interface Call extends AbapNode {\n readonly kind: 'Call';\n readonly receiver: Expression | undefined;\n readonly method: Identifier;\n readonly callKind: 'static' | 'instance';\n readonly args: readonly NamedArg[];\n}\n\nexport function call(input: {\n receiver?: Expression;\n method: Identifier;\n callKind: 'static' | 'instance';\n args?: readonly NamedArg[];\n}): Call {\n if (!input.method) {\n throw new AbapAstError('Call: required field \"method\" is missing');\n }\n if (input.callKind !== 'static' && input.callKind !== 'instance') {\n throw new AbapAstError(\n 'Call: required field \"callKind\" must be \"static\" or \"instance\"',\n );\n }\n if (input.callKind === 'instance' && !input.receiver) {\n throw new AbapAstError('Call: instance calls require a receiver');\n }\n return Object.freeze({\n kind: 'Call' as const,\n receiver: input.receiver,\n method: input.method,\n callKind: input.callKind,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** `RAISE EXCEPTION NEW zcx_xxx( ... ).`. */\nexport interface Raise extends AbapNode {\n readonly kind: 'Raise';\n readonly exceptionType: TypeRef;\n readonly args: readonly NamedArg[];\n}\n\nexport function raise(input: {\n exceptionType: TypeRef;\n args?: readonly NamedArg[];\n}): Raise {\n if (!input.exceptionType) {\n throw new AbapAstError('Raise: required field \"exceptionType\" is missing');\n }\n return Object.freeze({\n kind: 'Raise' as const,\n exceptionType: input.exceptionType,\n args: Object.freeze((input.args ?? []).map((a) => Object.freeze({ ...a }))),\n });\n}\n\n/** A single ELSEIF branch. */\nexport interface ElseIfBranch {\n readonly condition: Expression;\n readonly body: readonly Statement[];\n}\n\n/** IF / ELSEIF / ELSE. */\nexport interface If extends AbapNode {\n readonly kind: 'If';\n readonly condition: Expression;\n readonly thenBody: readonly Statement[];\n readonly elseIfs: readonly ElseIfBranch[];\n readonly else?: readonly Statement[];\n}\n\nexport function ifStmt(input: {\n condition: Expression;\n thenBody: readonly Statement[];\n elseIfs?: readonly ElseIfBranch[];\n else?: readonly Statement[];\n}): If {\n if (!input.condition) {\n throw new AbapAstError('If: required field \"condition\" is missing');\n }\n if (!input.thenBody) {\n throw new AbapAstError('If: required field \"thenBody\" is missing');\n }\n return Object.freeze({\n kind: 'If' as const,\n condition: input.condition,\n thenBody: Object.freeze([...input.thenBody]),\n elseIfs: Object.freeze(\n (input.elseIfs ?? []).map((b) =>\n Object.freeze({ ...b, body: Object.freeze([...b.body]) }),\n ),\n ),\n else: input.else ? Object.freeze([...input.else]) : undefined,\n });\n}\n\n/** LOOP AT ... INTO wa / ASSIGNING <fs>. */\nexport interface Loop extends AbapNode {\n readonly kind: 'Loop';\n readonly table: Expression;\n readonly binding:\n | { readonly bindKind: 'into'; readonly target: Identifier }\n | { readonly bindKind: 'assigning'; readonly fieldSymbol: Identifier };\n readonly body: readonly Statement[];\n}\n\nexport function loop(input: {\n table: Expression;\n binding: Loop['binding'];\n body: readonly Statement[];\n}): Loop {\n if (!input.table) {\n throw new AbapAstError('Loop: required field \"table\" is missing');\n }\n if (!input.binding) {\n throw new AbapAstError('Loop: required field \"binding\" is missing');\n }\n if (input.binding.bindKind === 'assigning') {\n const fs = input.binding.fieldSymbol;\n if (!fs.startsWith('<') || !fs.endsWith('>')) {\n throw new AbapAstError(\n `Loop: assigning target \"${fs}\" must be a field symbol wrapped in angle brackets`,\n );\n }\n }\n if (!input.body) {\n throw new AbapAstError('Loop: required field \"body\" is missing');\n }\n return Object.freeze({\n kind: 'Loop' as const,\n table: input.table,\n binding: Object.freeze({ ...input.binding }),\n body: Object.freeze([...input.body]),\n });\n}\n\n/**\n * `RETURN.` statement, optionally preceded by an assignment to the\n * RETURNING parameter (e.g. `rv_result = <expr>.` + `RETURN.`).\n *\n * `target` is the ABAP identifier of the RETURNING parameter. When\n * `value` is set, `target` is required — ABAP has no implicit `rv`\n * variable.\n */\nexport interface Return extends AbapNode {\n readonly kind: 'Return';\n readonly value?: Expression;\n readonly target?: string;\n}\n\nexport function returnStmt(input?: {\n value?: Expression;\n target?: string;\n}): Return {\n if (input?.value !== undefined && !input.target) {\n throw new AbapAstError(\n 'returnStmt: `target` (the RETURNING parameter name) is required when `value` is set — ABAP has no implicit `rv` variable',\n );\n }\n return Object.freeze({\n kind: 'Return' as const,\n value: input?.value,\n target: input?.target,\n });\n}\n\n/** CATCH clause inside a TRY. */\nexport interface CatchClause {\n readonly exceptionTypes: readonly TypeRef[];\n readonly into?: Identifier;\n readonly body: readonly Statement[];\n}\n\n/** TRY / CATCH / CLEANUP. */\nexport interface Try extends AbapNode {\n readonly kind: 'Try';\n readonly body: readonly Statement[];\n readonly catches: readonly CatchClause[];\n readonly cleanup?: readonly Statement[];\n}\n\nexport function tryStmt(input: {\n body: readonly Statement[];\n catches: readonly CatchClause[];\n cleanup?: readonly Statement[];\n}): Try {\n if (!input.body) {\n throw new AbapAstError('Try: required field \"body\" is missing');\n }\n if (!input.catches || input.catches.length === 0) {\n throw new AbapAstError('Try: must declare at least one CATCH clause');\n }\n for (const c of input.catches) {\n if (!c.exceptionTypes || c.exceptionTypes.length === 0) {\n throw new AbapAstError(\n 'Try: CATCH clause must declare at least one exception type',\n );\n }\n }\n return Object.freeze({\n kind: 'Try' as const,\n body: Object.freeze([...input.body]),\n catches: Object.freeze(\n input.catches.map((c) =>\n Object.freeze({\n ...c,\n exceptionTypes: Object.freeze([...c.exceptionTypes]),\n body: Object.freeze([...c.body]),\n }),\n ),\n ),\n cleanup: input.cleanup ? Object.freeze([...input.cleanup]) : undefined,\n });\n}\n\n/** APPEND value TO table. */\nexport interface Append extends AbapNode {\n readonly kind: 'Append';\n readonly value: Expression;\n readonly table: Expression;\n}\n\nexport function append(input: {\n value: Expression;\n table: Expression;\n}): Append {\n if (!input.value) {\n throw new AbapAstError('Append: required field \"value\" is missing');\n }\n if (!input.table) {\n throw new AbapAstError('Append: required field \"table\" is missing');\n }\n return Object.freeze({\n kind: 'Append' as const,\n value: input.value,\n table: input.table,\n });\n}\n\n/** INSERT value INTO TABLE table. */\nexport interface Insert extends AbapNode {\n readonly kind: 'Insert';\n readonly value: Expression;\n readonly table: Expression;\n}\n\nexport function insert(input: {\n value: Expression;\n table: Expression;\n}): Insert {\n if (!input.value) {\n throw new AbapAstError('Insert: required field \"value\" is missing');\n }\n if (!input.table) {\n throw new AbapAstError('Insert: required field \"table\" is missing');\n }\n return Object.freeze({\n kind: 'Insert' as const,\n value: input.value,\n table: input.table,\n });\n}\n\n/** READ TABLE table INTO wa / ASSIGNING <fs> [WITH KEY ...]. */\nexport interface Read extends AbapNode {\n readonly kind: 'Read';\n readonly table: Expression;\n readonly binding:\n | { readonly bindKind: 'into'; readonly target: Identifier }\n | { readonly bindKind: 'assigning'; readonly fieldSymbol: Identifier };\n readonly withKey?: readonly NamedArg[];\n readonly index?: Expression;\n}\n\nexport function read(input: {\n table: Expression;\n binding: Read['binding'];\n withKey?: readonly NamedArg[];\n index?: Expression;\n}): Read {\n if (!input.table) {\n throw new AbapAstError('Read: required field \"table\" is missing');\n }\n if (!input.binding) {\n throw new AbapAstError('Read: required field \"binding\" is missing');\n }\n return Object.freeze({\n kind: 'Read' as const,\n table: input.table,\n binding: Object.freeze({ ...input.binding }),\n withKey: input.withKey\n ? Object.freeze(input.withKey.map((a) => Object.freeze({ ...a })))\n : undefined,\n index: input.index,\n });\n}\n\n/** CLEAR target. */\nexport interface Clear extends AbapNode {\n readonly kind: 'Clear';\n readonly target: Expression;\n}\n\nexport function clear(input: { target: Expression }): Clear {\n if (!input.target) {\n throw new AbapAstError('Clear: required field \"target\" is missing');\n }\n return Object.freeze({ kind: 'Clear' as const, target: input.target });\n}\n\n/** EXIT. */\nexport interface Exit extends AbapNode {\n readonly kind: 'Exit';\n}\n\nexport function exit(): Exit {\n return Object.freeze({ kind: 'Exit' as const });\n}\n\n/** CONTINUE. */\nexport interface Continue extends AbapNode {\n readonly kind: 'Continue';\n}\n\nexport function continueStmt(): Continue {\n return Object.freeze({ kind: 'Continue' as const });\n}\n\n/** Verbatim ABAP source — escape hatch when the AST can't express something. */\nexport interface Raw extends AbapNode {\n readonly kind: 'Raw';\n readonly source: string;\n}\n\nexport function raw(input: { source: string }): Raw {\n if (typeof input.source !== 'string' || input.source.length === 0) {\n throw new AbapAstError('Raw: required field \"source\" is missing');\n }\n return Object.freeze({ kind: 'Raw' as const, source: input.source });\n}\n","import type { AbapDoc, AbapNode, Identifier, Visibility } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeRef } from './types';\nimport type { Expression } from './expressions';\nimport type { Statement } from './statements';\n\n/** ABAP method parameter kind. */\nexport type ParamKind = 'importing' | 'exporting' | 'changing' | 'returning';\n\nexport interface MethodParam extends AbapNode {\n readonly kind: 'MethodParam';\n readonly paramKind: ParamKind;\n readonly name: Identifier;\n readonly typeRef: TypeRef;\n readonly optional?: boolean;\n readonly default?: Expression;\n}\n\nexport function methodParam(input: {\n paramKind: ParamKind;\n name: Identifier;\n typeRef: TypeRef;\n optional?: boolean;\n default?: Expression;\n}): MethodParam {\n if (!input.paramKind) {\n throw new AbapAstError(\n 'MethodParam: required field \"paramKind\" is missing',\n );\n }\n if (!input.name) {\n throw new AbapAstError('MethodParam: required field \"name\" is missing');\n }\n if (!input.typeRef) {\n throw new AbapAstError('MethodParam: required field \"typeRef\" is missing');\n }\n if (input.paramKind === 'returning' && input.optional) {\n throw new AbapAstError(\n 'MethodParam: RETURNING parameters cannot be optional',\n );\n }\n if (input.paramKind === 'returning' && input.default !== undefined) {\n throw new AbapAstError(\n 'MethodParam: RETURNING parameters cannot have a default',\n );\n }\n return Object.freeze({\n kind: 'MethodParam' as const,\n paramKind: input.paramKind,\n name: input.name,\n typeRef: input.typeRef,\n optional: input.optional,\n default: input.default,\n });\n}\n\nexport interface MethodDef extends AbapNode {\n readonly kind: 'MethodDef';\n readonly name: Identifier;\n readonly params: readonly MethodParam[];\n readonly raising: readonly TypeRef[];\n readonly visibility: Visibility;\n readonly isClassMethod?: boolean;\n readonly isAbstract?: boolean;\n readonly isFinal?: boolean;\n readonly isRedefinition?: boolean;\n readonly isForTesting?: boolean;\n}\n\nexport function methodDef(input: {\n name: Identifier;\n params?: readonly MethodParam[];\n raising?: readonly TypeRef[];\n visibility: Visibility;\n isClassMethod?: boolean;\n isAbstract?: boolean;\n isFinal?: boolean;\n isRedefinition?: boolean;\n isForTesting?: boolean;\n abapDoc?: AbapDoc;\n}): MethodDef {\n if (!input.name) {\n throw new AbapAstError('MethodDef: required field \"name\" is missing');\n }\n if (!input.visibility) {\n throw new AbapAstError('MethodDef: required field \"visibility\" is missing');\n }\n const params = input.params ?? [];\n // Validate: at most one RETURNING, and if present no EXPORTING/CHANGING.\n const returning = params.filter((p) => p.paramKind === 'returning');\n if (returning.length > 1) {\n throw new AbapAstError(\n 'MethodDef: a method can have at most one RETURNING parameter',\n );\n }\n if (returning.length === 1) {\n const hasExportingOrChanging = params.some(\n (p) => p.paramKind === 'exporting' || p.paramKind === 'changing',\n );\n if (hasExportingOrChanging) {\n throw new AbapAstError(\n 'MethodDef: RETURNING parameter cannot be combined with EXPORTING or CHANGING',\n );\n }\n }\n return Object.freeze({\n kind: 'MethodDef' as const,\n name: input.name,\n params: Object.freeze([...params]),\n raising: Object.freeze([...(input.raising ?? [])]),\n visibility: input.visibility,\n isClassMethod: input.isClassMethod,\n isAbstract: input.isAbstract,\n isFinal: input.isFinal,\n isRedefinition: input.isRedefinition,\n isForTesting: input.isForTesting,\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n\n/** Body of a method in the IMPLEMENTATION block. */\nexport interface MethodImpl extends AbapNode {\n readonly kind: 'MethodImpl';\n readonly name: Identifier;\n readonly body: readonly Statement[];\n}\n\nexport function methodImpl(input: {\n name: Identifier;\n body: readonly Statement[];\n}): MethodImpl {\n if (!input.name) {\n throw new AbapAstError('MethodImpl: required field \"name\" is missing');\n }\n if (!input.body) {\n throw new AbapAstError('MethodImpl: required field \"body\" is missing');\n }\n return Object.freeze({\n kind: 'MethodImpl' as const,\n name: input.name,\n body: Object.freeze([...input.body]),\n });\n}\n\n/** EVENT declaration (stub — body not modelled yet). */\nexport interface EventDef extends AbapNode {\n readonly kind: 'EventDef';\n readonly name: Identifier;\n readonly visibility: Visibility;\n readonly isClassEvent?: boolean;\n}\n\nexport function eventDef(input: {\n name: Identifier;\n visibility: Visibility;\n isClassEvent?: boolean;\n}): EventDef {\n if (!input.name) {\n throw new AbapAstError('EventDef: required field \"name\" is missing');\n }\n if (!input.visibility) {\n throw new AbapAstError('EventDef: required field \"visibility\" is missing');\n }\n return Object.freeze({\n kind: 'EventDef' as const,\n name: input.name,\n visibility: input.visibility,\n isClassEvent: input.isClassEvent,\n });\n}\n\n/** DATA / CLASS-DATA declaration inside a class section. */\nexport interface AttributeDef extends AbapNode {\n readonly kind: 'AttributeDef';\n readonly name: Identifier;\n readonly type: TypeRef;\n readonly visibility: Visibility;\n readonly classData?: boolean;\n readonly readOnly?: boolean;\n readonly initial?: Expression;\n}\n\nexport function attributeDef(input: {\n name: Identifier;\n type: TypeRef;\n visibility: Visibility;\n classData?: boolean;\n readOnly?: boolean;\n initial?: Expression;\n abapDoc?: AbapDoc;\n}): AttributeDef {\n if (!input.name) {\n throw new AbapAstError('AttributeDef: required field \"name\" is missing');\n }\n if (!input.type) {\n throw new AbapAstError('AttributeDef: required field \"type\" is missing');\n }\n if (!input.visibility) {\n throw new AbapAstError(\n 'AttributeDef: required field \"visibility\" is missing',\n );\n }\n return Object.freeze({\n kind: 'AttributeDef' as const,\n name: input.name,\n type: input.type,\n visibility: input.visibility,\n classData: input.classData,\n readOnly: input.readOnly,\n initial: input.initial,\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n","import type { AbapDoc, AbapNode, Identifier, Visibility } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeDef } from './types';\nimport type { ConstantDecl } from './data';\nimport type { AttributeDef, EventDef, MethodDef, MethodImpl } from './members';\n\n/** A member that may appear inside a class section. */\nexport type SectionMember =\n | TypeDef\n | AttributeDef\n | MethodDef\n | ConstantDecl\n | EventDef;\n\n/** A visibility section of a class definition. */\nexport interface Section extends AbapNode {\n readonly kind: 'Section';\n readonly visibility: Visibility;\n readonly members: readonly SectionMember[];\n}\n\nexport function section(input: {\n visibility: Visibility;\n members?: readonly SectionMember[];\n}): Section {\n if (!input.visibility) {\n throw new AbapAstError('Section: required field \"visibility\" is missing');\n }\n const members = input.members ?? [];\n for (const m of members) {\n if ('visibility' in m && m.visibility !== input.visibility) {\n throw new AbapAstError(\n `Section: member \"${m.name}\" has visibility \"${m.visibility}\" but section is \"${input.visibility}\"`,\n );\n }\n }\n return Object.freeze({\n kind: 'Section' as const,\n visibility: input.visibility,\n members: Object.freeze([...members]),\n });\n}\n\n/** Top-level global class (`CLASS ... DEFINITION` + `IMPLEMENTATION`). */\nexport interface ClassDef extends AbapNode {\n readonly kind: 'ClassDef';\n readonly name: Identifier;\n readonly superclass?: Identifier;\n readonly interfaces: readonly Identifier[];\n readonly isFinal?: boolean;\n readonly isAbstract?: boolean;\n readonly isForTesting?: boolean;\n readonly isCreatePrivate?: boolean;\n readonly sections: readonly Section[];\n readonly implementations: readonly MethodImpl[];\n}\n\nexport function classDef(input: {\n name: Identifier;\n superclass?: Identifier;\n interfaces?: readonly Identifier[];\n isFinal?: boolean;\n isAbstract?: boolean;\n isForTesting?: boolean;\n isCreatePrivate?: boolean;\n sections?: readonly Section[];\n implementations?: readonly MethodImpl[];\n abapDoc?: AbapDoc;\n}): ClassDef {\n if (!input.name) {\n throw new AbapAstError('ClassDef: required field \"name\" is missing');\n }\n if (input.isFinal && input.isAbstract) {\n throw new AbapAstError('ClassDef: class cannot be both FINAL and ABSTRACT');\n }\n return Object.freeze({\n kind: 'ClassDef' as const,\n name: input.name,\n superclass: input.superclass,\n interfaces: Object.freeze([...(input.interfaces ?? [])]),\n isFinal: input.isFinal,\n isAbstract: input.isAbstract,\n isForTesting: input.isForTesting,\n isCreatePrivate: input.isCreatePrivate,\n sections: Object.freeze([...(input.sections ?? [])]),\n implementations: Object.freeze([...(input.implementations ?? [])]),\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n\n/** A local class inside a CLAS-POOL (same shape as ClassDef, flagged local). */\nexport interface LocalClassDef extends AbapNode {\n readonly kind: 'LocalClassDef';\n readonly name: Identifier;\n readonly superclass?: Identifier;\n readonly interfaces: readonly Identifier[];\n readonly isFinal?: boolean;\n readonly isAbstract?: boolean;\n readonly isForTesting?: boolean;\n readonly sections: readonly Section[];\n readonly implementations: readonly MethodImpl[];\n readonly local: true;\n}\n\nexport function localClassDef(input: {\n name: Identifier;\n superclass?: Identifier;\n interfaces?: readonly Identifier[];\n isFinal?: boolean;\n isAbstract?: boolean;\n isForTesting?: boolean;\n sections?: readonly Section[];\n implementations?: readonly MethodImpl[];\n}): LocalClassDef {\n if (!input.name) {\n throw new AbapAstError('LocalClassDef: required field \"name\" is missing');\n }\n if (input.isFinal && input.isAbstract) {\n throw new AbapAstError(\n 'LocalClassDef: class cannot be both FINAL and ABSTRACT',\n );\n }\n return Object.freeze({\n kind: 'LocalClassDef' as const,\n name: input.name,\n superclass: input.superclass,\n interfaces: Object.freeze([...(input.interfaces ?? [])]),\n isFinal: input.isFinal,\n isAbstract: input.isAbstract,\n isForTesting: input.isForTesting,\n sections: Object.freeze([...(input.sections ?? [])]),\n implementations: Object.freeze([...(input.implementations ?? [])]),\n local: true as const,\n });\n}\n","import type { AbapDoc, AbapNode, Identifier } from './base';\nimport { AbapAstError } from './errors';\nimport type { TypeDef } from './types';\nimport type { MethodDef } from './members';\n\n/** A member that may appear inside an interface definition. */\nexport type InterfaceMember = TypeDef | MethodDef;\n\n/** `INTERFACE zif_foo. ... ENDINTERFACE.`. */\nexport interface InterfaceDef extends AbapNode {\n readonly kind: 'InterfaceDef';\n readonly name: Identifier;\n readonly members: readonly InterfaceMember[];\n}\n\nexport function interfaceDef(input: {\n name: Identifier;\n members?: readonly InterfaceMember[];\n abapDoc?: AbapDoc;\n}): InterfaceDef {\n if (!input.name) {\n throw new AbapAstError('InterfaceDef: required field \"name\" is missing');\n }\n const members = input.members ?? [];\n for (const m of members) {\n if (m.kind === 'MethodDef' && m.visibility !== 'public') {\n throw new AbapAstError(\n `InterfaceDef: method \"${m.name}\" must be public (interfaces expose only public methods)`,\n );\n }\n }\n return Object.freeze({\n kind: 'InterfaceDef' as const,\n name: input.name,\n members: Object.freeze([...members]),\n abapDoc: input.abapDoc ? Object.freeze([...input.abapDoc]) : undefined,\n });\n}\n","export interface PrintOptions {\n /** Spaces per indentation level. Default 2. */\n indent?: number;\n /** 'upper' (default) or 'lower' for ABAP keywords. */\n keywordCase?: 'upper' | 'lower';\n /** Line ending. Default '\\n'. */\n eol?: string;\n}\n\nexport type ResolvedPrintOptions = Required<PrintOptions>;\n\nexport function resolveOptions(o?: PrintOptions): ResolvedPrintOptions {\n return {\n indent: o?.indent ?? 2,\n keywordCase: o?.keywordCase ?? 'upper',\n eol: o?.eol ?? '\\n',\n };\n}\n","import type { ResolvedPrintOptions } from './options';\n\n/** Tiny indentation-aware string builder. */\nexport class Writer {\n private readonly lines: string[] = [];\n private level = 0;\n private readonly opts: ResolvedPrintOptions;\n\n constructor(opts: ResolvedPrintOptions) {\n this.opts = opts;\n }\n\n get options(): ResolvedPrintOptions {\n return this.opts;\n }\n\n indent(): void {\n this.level += 1;\n }\n\n dedent(): void {\n if (this.level === 0) {\n throw new Error('Writer: cannot dedent below 0');\n }\n this.level -= 1;\n }\n\n /** Current indent prefix. */\n prefix(): string {\n return ' '.repeat(this.level * this.opts.indent);\n }\n\n /** Write a full line with current indent. Empty string = blank line (no whitespace). */\n writeLine(s = ''): void {\n if (s.length === 0) {\n this.lines.push('');\n } else {\n this.lines.push(this.prefix() + s);\n }\n }\n\n /** Append text to the most recent line (no newline). Starts a new indented line if none exists. */\n write(s: string): void {\n if (this.lines.length === 0) {\n this.lines.push(this.prefix() + s);\n } else {\n this.lines[this.lines.length - 1] += s;\n }\n }\n\n /** Emit a blank line. */\n blank(): void {\n this.lines.push('');\n }\n\n /** Emit a line with no indent prefix (used by star comments, which must begin at column 1). */\n rawLine(s: string): void {\n this.lines.push(s);\n }\n\n /** Transform a keyword according to keywordCase. */\n kw(word: string): string {\n return this.opts.keywordCase === 'lower'\n ? word.toLowerCase()\n : word.toUpperCase();\n }\n\n toString(): string {\n return this.lines.join(this.opts.eol);\n }\n}\n","import type { Writer } from './writer';\nimport type { AbapDoc } from '../nodes/base';\nimport type { TypeRef, EnumType, TypeDef } from '../nodes/types';\n\n/**\n * Emit each ABAPDoc line as `\"! <line>` at the current indent, immediately\n * above the following declaration. Does nothing when `doc` is undefined or\n * empty. Content is passed through verbatim — tabs and special characters\n * are preserved.\n */\nexport function printAbapDoc(doc: AbapDoc | undefined, writer: Writer): void {\n if (!doc || doc.length === 0) return;\n for (const line of doc) {\n writer.writeLine(line.length === 0 ? '\"!' : `\"! ${line}`);\n }\n}\n\n/** Print a TypeRef as an inline type expression (e.g. 'string', 'i', 'zcl_foo'). */\nexport function printInlineType(type: TypeRef, writer: Writer): string {\n switch (type.kind) {\n case 'BuiltinType': {\n const parts: string[] = [type.name];\n if (type.length !== undefined) {\n parts.push(`${writer.kw('LENGTH')} ${type.length}`);\n }\n if (type.decimals !== undefined) {\n parts.push(`${writer.kw('DECIMALS')} ${type.decimals}`);\n }\n return parts.join(' ');\n }\n case 'NamedTypeRef':\n return type.name;\n case 'TableType':\n throw new Error(\n 'printInlineType: TableType cannot be used as an inline type reference',\n );\n case 'StructureType':\n throw new Error(\n 'printInlineType: StructureType cannot be used as an inline type reference',\n );\n }\n}\n\n/** Print a TYPES top-level declaration. */\nexport function printTypeDef(node: TypeDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const t: TypeRef | EnumType = node.type;\n if (t.kind === 'StructureType') {\n writer.writeLine(`${K('TYPES')}: ${K('BEGIN OF')} ${node.name},`);\n writer.indent();\n const maxName = Math.max(...t.fields.map((f) => f.name.length));\n t.fields.forEach((f) => {\n const pad = ' '.repeat(maxName - f.name.length);\n writer.writeLine(\n `${f.name}${pad} ${K('TYPE')} ${printInlineType(f.type, writer)},`,\n );\n });\n writer.dedent();\n writer.writeLine(`${K('END OF')} ${node.name}.`);\n return;\n }\n if (t.kind === 'TableType') {\n const tableKindKw: Record<typeof t.tableKind, string> = {\n standard: K('STANDARD'),\n sorted: K('SORTED'),\n hashed: K('HASHED'),\n };\n const kindKw = tableKindKw[t.tableKind];\n const row = printInlineType(t.rowType, writer);\n let key: string;\n if (t.keyFields && t.keyFields.length > 0) {\n const uniq = t.uniqueness === 'unique' ? K('UNIQUE') : K('NON-UNIQUE');\n key = `${K('WITH')} ${uniq} ${K('KEY')} ${t.keyFields.join(' ')}`;\n } else {\n key = `${K('WITH')} ${K('DEFAULT KEY')}`;\n }\n writer.writeLine(\n `${K('TYPES')} ${node.name} ${K('TYPE')} ${kindKw} ${K('TABLE OF')} ${row} ${key}.`,\n );\n return;\n }\n if (t.kind === 'EnumType') {\n writer.writeLine(\n `${K('TYPES')}: ${K('BEGIN OF ENUM')} ${node.name} ${K('BASE TYPE')} ${printInlineType(t.baseType, writer)},`,\n );\n writer.indent();\n const maxName = Math.max(...t.members.map((m) => m.name.length));\n t.members.forEach((m) => {\n const pad = ' '.repeat(maxName - m.name.length);\n const val =\n typeof m.value === 'number' ? String(m.value) : `'${m.value}'`;\n writer.writeLine(`${m.name}${pad} ${K('VALUE')} ${val},`);\n });\n writer.dedent();\n writer.writeLine(`${K('END OF ENUM')} ${node.name}.`);\n return;\n }\n // BuiltinType or NamedTypeRef\n writer.writeLine(\n `${K('TYPES')} ${node.name} ${K('TYPE')} ${printInlineType(t, writer)}.`,\n );\n}\n","import type { Writer } from './writer';\nimport type {\n Expression,\n NamedArg,\n StringTemplate,\n} from '../nodes/expressions';\nimport { printInlineType } from './print-types';\n\n/** Print an expression to a single string (no newlines unless forced by wrapping). */\nexport function printExpression(expr: Expression, writer: Writer): string {\n switch (expr.kind) {\n case 'Literal':\n return printLiteral(expr.literalKind, expr.value);\n case 'IdentifierExpr':\n return expr.name;\n case 'ConstructorExpr': {\n const type = printInlineType(expr.type, writer);\n const args = printArgs(expr.args, writer, 0);\n return `${writer.kw('NEW')} ${type}(${args})`;\n }\n case 'MethodCallExpr': {\n const args = printArgs(expr.args, writer, 0);\n if (expr.callKind === 'static') {\n const recv =\n expr.receiver !== undefined\n ? printExpression(expr.receiver, writer)\n : '';\n const head = recv.length > 0 ? `${recv}=>${expr.method}` : expr.method;\n return `${head}(${args})`;\n }\n if (expr.receiver === undefined) {\n throw new Error('MethodCallExpr: instance call has no receiver');\n }\n const recv = printExpression(expr.receiver, writer);\n return `${recv}->${expr.method}(${args})`;\n }\n case 'BinOp': {\n // Preserve operator grouping — wrap nested BinOp operands in parens\n // so that `a AND (b OR c)` does not flatten to `a AND b OR c` and\n // change the ABAP condition semantics.\n const wrap = (inner: Expression): string => {\n const src = printExpression(inner, writer);\n return inner.kind === 'BinOp' ? `( ${src} )` : src;\n };\n const left = wrap(expr.left);\n const right = wrap(expr.right);\n const op =\n expr.op === 'AND' || expr.op === 'OR' ? writer.kw(expr.op) : expr.op;\n return `${left} ${op} ${right}`;\n }\n case 'StringTemplate':\n return printStringTemplate(expr, writer);\n case 'Cast': {\n const type = printInlineType(expr.type, writer);\n const inner = printExpression(expr.expr, writer);\n return `${writer.kw('CAST')} ${type}( ${inner} )`;\n }\n }\n}\n\nfunction printLiteral(\n kind: 'string' | 'int' | 'bool' | 'hex',\n value: string | number | boolean,\n): string {\n switch (kind) {\n case 'string':\n return `'${String(value).replaceAll(\"'\", `''`)}'`;\n case 'int':\n return String(value);\n case 'bool':\n return (value as boolean) ? 'abap_true' : 'abap_false';\n case 'hex':\n return `'${String(value)}'`;\n }\n}\n\n/** Print the inside of `( ... )` for a named-arg list. Empty → ' ' (ABAP convention). */\nexport function printArgs(\n args: readonly NamedArg[],\n writer: Writer,\n currentColumn: number,\n): string {\n if (args.length === 0) {\n return ' ';\n }\n const single = args\n .map((a) => `${a.name} = ${printExpression(a.value, writer)}`)\n .join(' ');\n const singleLine = ` ${single} `;\n // Heuristic: wrap when total column would exceed 80.\n if (currentColumn + singleLine.length + 2 <= 80) {\n return singleLine;\n }\n const eol = writer.options.eol;\n const pad = ' '.repeat(currentColumn + writer.options.indent);\n const parts = args.map(\n (a) => `${pad}${a.name} = ${printExpression(a.value, writer)}`,\n );\n return eol + parts.join(eol) + eol + ' '.repeat(currentColumn);\n}\n\nfunction printStringTemplate(node: StringTemplate, writer: Writer): string {\n let out = '|';\n for (const part of node.parts) {\n if (part.partKind === 'text') {\n out += part.text;\n } else {\n out += `{ ${printExpression(part.expr, writer)} }`;\n }\n }\n out += '|';\n return out;\n}\n","import type { Writer } from './writer';\nimport type { Statement } from '../nodes/statements';\nimport type { DataDecl, FieldSymbolDecl } from '../nodes/data';\nimport type { Comment } from '../nodes/base';\nimport { printExpression, printArgs } from './print-expressions';\nimport { printInlineType } from './print-types';\n\nexport function printStatements(\n stmts: readonly Statement[],\n writer: Writer,\n): void {\n for (const s of stmts) {\n printStatement(s, writer);\n }\n}\n\nexport function printStatement(stmt: Statement, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n switch (stmt.kind) {\n case 'Comment':\n printComment(stmt, writer);\n return;\n case 'DataDecl':\n printDataDecl(stmt, writer);\n return;\n case 'FieldSymbolDecl':\n printFieldSymbolDecl(stmt, writer);\n return;\n case 'Assign': {\n const target = printExpression(stmt.target, writer);\n const value = printExpression(stmt.value, writer);\n writer.writeLine(`${target} = ${value}.`);\n return;\n }\n case 'Call': {\n const col = writer.prefix().length;\n if (stmt.callKind === 'static') {\n const recv =\n stmt.receiver !== undefined\n ? printExpression(stmt.receiver, writer)\n : '';\n const head = recv.length > 0 ? `${recv}=>${stmt.method}` : stmt.method;\n const args = printArgs(stmt.args, writer, col + head.length + 1);\n writer.writeLine(`${head}(${args}).`);\n } else {\n if (stmt.receiver === undefined) {\n throw new Error('Call: instance call has no receiver');\n }\n const recv = printExpression(stmt.receiver, writer);\n const head = `${recv}->${stmt.method}`;\n const args = printArgs(stmt.args, writer, col + head.length + 1);\n writer.writeLine(`${head}(${args}).`);\n }\n return;\n }\n case 'Raise': {\n const col = writer.prefix().length;\n const type = printInlineType(stmt.exceptionType, writer);\n const head = `${K('RAISE EXCEPTION')} ${K('NEW')} ${type}`;\n const args = printArgs(stmt.args, writer, col + head.length + 1);\n writer.writeLine(`${head}(${args}).`);\n return;\n }\n case 'If': {\n writer.writeLine(\n `${K('IF')} ${printExpression(stmt.condition, writer)}.`,\n );\n writer.indent();\n printStatements(stmt.thenBody, writer);\n writer.dedent();\n for (const b of stmt.elseIfs) {\n writer.writeLine(\n `${K('ELSEIF')} ${printExpression(b.condition, writer)}.`,\n );\n writer.indent();\n printStatements(b.body, writer);\n writer.dedent();\n }\n if (stmt.else) {\n writer.writeLine(`${K('ELSE')}.`);\n writer.indent();\n printStatements(stmt.else, writer);\n writer.dedent();\n }\n writer.writeLine(`${K('ENDIF')}.`);\n return;\n }\n case 'Loop': {\n const table = printExpression(stmt.table, writer);\n const bind =\n stmt.binding.bindKind === 'into'\n ? `${K('INTO')} ${stmt.binding.target}`\n : `${K('ASSIGNING')} ${stmt.binding.fieldSymbol}`;\n writer.writeLine(`${K('LOOP AT')} ${table} ${bind}.`);\n writer.indent();\n printStatements(stmt.body, writer);\n writer.dedent();\n writer.writeLine(`${K('ENDLOOP')}.`);\n return;\n }\n case 'Return': {\n if (stmt.value !== undefined) {\n writer.writeLine(\n `${stmt.target} = ${printExpression(stmt.value, writer)}.`,\n );\n }\n writer.writeLine(`${K('RETURN')}.`);\n return;\n }\n case 'Try': {\n writer.writeLine(`${K('TRY')}.`);\n writer.indent();\n printStatements(stmt.body, writer);\n writer.dedent();\n for (const c of stmt.catches) {\n const types = c.exceptionTypes\n .map((t) => printInlineType(t, writer))\n .join(' ');\n const into = c.into ? ` ${K('INTO')} ${c.into}` : '';\n writer.writeLine(`${K('CATCH')} ${types}${into}.`);\n writer.indent();\n printStatements(c.body, writer);\n writer.dedent();\n }\n if (stmt.cleanup) {\n writer.writeLine(`${K('CLEANUP')}.`);\n writer.indent();\n printStatements(stmt.cleanup, writer);\n writer.dedent();\n }\n writer.writeLine(`${K('ENDTRY')}.`);\n return;\n }\n case 'Append': {\n const v = printExpression(stmt.value, writer);\n const t = printExpression(stmt.table, writer);\n writer.writeLine(`${K('APPEND')} ${v} ${K('TO')} ${t}.`);\n return;\n }\n case 'Insert': {\n const v = printExpression(stmt.value, writer);\n const t = printExpression(stmt.table, writer);\n writer.writeLine(`${K('INSERT')} ${v} ${K('INTO TABLE')} ${t}.`);\n return;\n }\n case 'Read': {\n const t = printExpression(stmt.table, writer);\n const bind =\n stmt.binding.bindKind === 'into'\n ? `${K('INTO')} ${stmt.binding.target}`\n : `${K('ASSIGNING')} ${stmt.binding.fieldSymbol}`;\n const parts: string[] = [`${K('READ TABLE')} ${t}`];\n if (stmt.index !== undefined) {\n parts.push(`${K('INDEX')} ${printExpression(stmt.index, writer)}`);\n }\n parts.push(bind);\n if (stmt.withKey && stmt.withKey.length > 0) {\n const kv = stmt.withKey\n .map((a) => `${a.name} = ${printExpression(a.value, writer)}`)\n .join(' ');\n parts.push(`${K('WITH KEY')} ${kv}`);\n }\n writer.writeLine(parts.join(' ') + '.');\n return;\n }\n case 'Clear': {\n writer.writeLine(\n `${K('CLEAR')} ${printExpression(stmt.target, writer)}.`,\n );\n return;\n }\n case 'Exit':\n writer.writeLine(`${K('EXIT')}.`);\n return;\n case 'Continue':\n writer.writeLine(`${K('CONTINUE')}.`);\n return;\n case 'Raw': {\n const lines = stmt.source.split(/\\r?\\n/);\n for (const line of lines) {\n writer.writeLine(line);\n }\n return;\n }\n }\n}\n\nexport function printComment(node: Comment, writer: Writer): void {\n if (node.style === 'star') {\n // Star comments begin at column 1.\n const lines = node.text.split(/\\r?\\n/);\n for (const line of lines) {\n // Push raw line — bypass indent prefix.\n writer.rawLine(`* ${line}`);\n }\n } else {\n const lines = node.text.split(/\\r?\\n/);\n for (const line of lines) {\n writer.writeLine(`\" ${line}`);\n }\n }\n}\n\nexport function printDataDecl(node: DataDecl, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n const kw = node.classData ? K('CLASS-DATA') : K('DATA');\n const type = printInlineType(node.type, writer);\n let line = `${kw} ${node.name} ${K('TYPE')} ${type}`;\n if (node.initial !== undefined) {\n line += ` ${K('VALUE')} ${printExpression(node.initial, writer)}`;\n }\n writer.writeLine(`${line}.`);\n}\n\nexport function printFieldSymbolDecl(\n node: FieldSymbolDecl,\n writer: Writer,\n): void {\n const K = (s: string): string => writer.kw(s);\n const type = printInlineType(node.type, writer);\n writer.writeLine(`${K('FIELD-SYMBOLS')} ${node.name} ${K('TYPE')} ${type}.`);\n}\n","import type { Writer } from './writer';\nimport type {\n AttributeDef,\n EventDef,\n MethodDef,\n MethodImpl,\n MethodParam,\n} from '../nodes/members';\nimport type { ConstantDecl } from '../nodes/data';\nimport { printInlineType, printAbapDoc } from './print-types';\nimport { printExpression } from './print-expressions';\nimport { printStatements } from './print-statements';\n\nexport function printAttributeDef(node: AttributeDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const kw = node.classData ? K('CLASS-DATA') : K('DATA');\n const type = printInlineType(node.type, writer);\n let line = `${kw} ${node.name} ${K('TYPE')} ${type}`;\n if (node.readOnly) {\n line += ` ${K('READ-ONLY')}`;\n }\n if (node.initial !== undefined) {\n line += ` ${K('VALUE')} ${printExpression(node.initial, writer)}`;\n }\n writer.writeLine(`${line}.`);\n}\n\nexport function printConstantDecl(node: ConstantDecl, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n const kw = node.classData ? K('CLASS-CONSTANTS') : K('CONSTANTS');\n const type = printInlineType(node.type, writer);\n writer.writeLine(\n `${kw} ${node.name} ${K('TYPE')} ${type} ${K('VALUE')} ${printExpression(node.value, writer)}.`,\n );\n}\n\nexport function printEventDef(node: EventDef, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n const kw = node.isClassEvent ? K('CLASS-EVENTS') : K('EVENTS');\n writer.writeLine(`${kw} ${node.name}.`);\n}\n\nconst PARAM_KW: Record<MethodParam['paramKind'], string> = {\n importing: 'IMPORTING',\n exporting: 'EXPORTING',\n changing: 'CHANGING',\n returning: 'RETURNING',\n};\n\n/** Group params by kind (preserving AST order within each group). */\nfunction groupParams(\n params: readonly MethodParam[],\n): ReadonlyArray<{ kind: MethodParam['paramKind']; items: MethodParam[] }> {\n const order: MethodParam['paramKind'][] = [\n 'importing',\n 'exporting',\n 'changing',\n 'returning',\n ];\n const result: { kind: MethodParam['paramKind']; items: MethodParam[] }[] = [];\n for (const k of order) {\n const items = params.filter((p) => p.paramKind === k);\n if (items.length > 0) {\n result.push({ kind: k, items });\n }\n }\n return result;\n}\n\nfunction printParamBody(p: MethodParam, writer: Writer): string {\n const K = (s: string): string => writer.kw(s);\n const type = printInlineType(p.typeRef, writer);\n let body: string;\n if (p.paramKind === 'returning') {\n body = `${K('VALUE')}(${p.name}) ${K('TYPE')} ${type}`;\n } else {\n body = `${p.name} ${K('TYPE')} ${type}`;\n }\n if (p.optional) {\n body += ` ${K('OPTIONAL')}`;\n }\n if (p.default !== undefined) {\n body += ` ${K('DEFAULT')} ${printExpression(p.default, writer)}`;\n }\n return body;\n}\n\nexport function printMethodDef(node: MethodDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const flagsPrefix = node.isClassMethod ? K('CLASS-METHODS') : K('METHODS');\n const suffixFlags: string[] = [];\n if (node.isAbstract) suffixFlags.push(K('ABSTRACT'));\n if (node.isFinal) suffixFlags.push(K('FINAL'));\n if (node.isRedefinition) suffixFlags.push(K('REDEFINITION'));\n if (node.isForTesting) suffixFlags.push(K('FOR TESTING'));\n\n const groups = groupParams(node.params);\n const hasAny = groups.length > 0 || node.raising.length > 0;\n\n if (!hasAny && suffixFlags.length === 0) {\n writer.writeLine(`${flagsPrefix} ${node.name}.`);\n return;\n }\n\n if (!hasAny) {\n writer.writeLine(`${flagsPrefix} ${node.name} ${suffixFlags.join(' ')}.`);\n return;\n }\n\n // Header line\n writer.writeLine(`${flagsPrefix} ${node.name}`);\n writer.indent();\n // Parameter groups\n for (const g of groups) {\n const kw = K(PARAM_KW[g.kind]);\n if (g.items.length === 1) {\n writer.writeLine(`${kw} ${printParamBody(g.items[0], writer)}`);\n } else {\n writer.writeLine(kw);\n writer.indent();\n g.items.forEach((p) => {\n writer.writeLine(printParamBody(p, writer));\n });\n writer.dedent();\n }\n }\n if (node.raising.length > 0) {\n const types = node.raising.map((t) => printInlineType(t, writer)).join(' ');\n writer.writeLine(`${K('RAISING')} ${types}`);\n }\n if (suffixFlags.length > 0) {\n writer.writeLine(suffixFlags.join(' '));\n }\n writer.dedent();\n // Terminate last emitted line with a period.\n // Find the last non-empty line and add '.'.\n // The writer's toString uses internal lines[]; append '.' via write().\n writer.write('.');\n}\n\nexport function printMethodImpl(node: MethodImpl, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('METHOD')} ${node.name}.`);\n writer.indent();\n printStatements(node.body, writer);\n writer.dedent();\n writer.writeLine(`${K('ENDMETHOD')}.`);\n}\n","import type { Writer } from './writer';\nimport type { ClassDef, LocalClassDef, Section } from '../nodes/class';\nimport type { Visibility } from '../nodes/base';\nimport { printTypeDef, printAbapDoc } from './print-types';\nimport {\n printAttributeDef,\n printConstantDecl,\n printEventDef,\n printMethodDef,\n printMethodImpl,\n} from './print-members';\n\nconst VIS_KW: Record<Visibility, string> = {\n public: 'PUBLIC SECTION',\n protected: 'PROTECTED SECTION',\n private: 'PRIVATE SECTION',\n};\n\nfunction printSection(\n sec: Section,\n writer: Writer,\n opts?: { readonly leadingInterfaces?: readonly string[] },\n): void {\n writer.writeLine(`${writer.kw(VIS_KW[sec.visibility])}.`);\n writer.indent();\n for (const i of opts?.leadingInterfaces ?? []) {\n writer.writeLine(`${writer.kw('INTERFACES')} ${i}.`);\n }\n for (const m of sec.members) {\n switch (m.kind) {\n case 'TypeDef':\n printTypeDef(m, writer);\n break;\n case 'AttributeDef':\n printAttributeDef(m, writer);\n break;\n case 'MethodDef':\n printMethodDef(m, writer);\n break;\n case 'ConstantDecl':\n printConstantDecl(m, writer);\n break;\n case 'EventDef':\n printEventDef(m, writer);\n break;\n }\n }\n writer.dedent();\n}\n\nfunction printDefinitionHeader(\n name: string,\n opts: {\n readonly local: boolean;\n readonly superclass?: string;\n readonly interfaces: readonly string[];\n readonly isFinal?: boolean;\n readonly isAbstract?: boolean;\n readonly isForTesting?: boolean;\n readonly isCreatePrivate?: boolean;\n /**\n * When true, the class has explicit visibility sections and the\n * `INTERFACES` declarations must be emitted inside the first public\n * section rather than at class-body level. ABAP cloud rejects\n * `INTERFACES` placed outside a SECTION with\n * \"There is no PUBLIC / PROTECTED / PRIVATE SECTION statement\".\n */\n readonly interfacesInsidePublicSection?: boolean;\n },\n writer: Writer,\n): void {\n const K = (s: string): string => writer.kw(s);\n const parts: string[] = [`${K('CLASS')} ${name} ${K('DEFINITION')}`];\n if (!opts.local) {\n parts.push(K('PUBLIC'));\n }\n if (opts.isFinal) parts.push(K('FINAL'));\n if (opts.isAbstract) parts.push(K('ABSTRACT'));\n if (opts.isForTesting) parts.push(K('FOR TESTING'));\n if (opts.superclass) {\n parts.push(`${K('INHERITING FROM')} ${opts.superclass}`);\n }\n if (!opts.local) {\n parts.push(opts.isCreatePrivate ? K('CREATE PRIVATE') : K('CREATE PUBLIC'));\n }\n writer.writeLine(parts.join(' ') + '.');\n if (!opts.interfacesInsidePublicSection && opts.interfaces.length > 0) {\n writer.indent();\n for (const i of opts.interfaces) {\n writer.writeLine(`${K('INTERFACES')} ${i}.`);\n }\n writer.dedent();\n }\n}\n\nfunction printSections(\n sections: readonly Section[],\n writer: Writer,\n opts?: { readonly leadingInterfaces?: readonly string[] },\n): void {\n const leadingInterfaces = opts?.leadingInterfaces ?? [];\n let publicEmitted = false;\n for (const s of sections) {\n if (!publicEmitted && s.visibility === 'public') {\n printSection(s, writer, { leadingInterfaces });\n publicEmitted = true;\n } else {\n printSection(s, writer);\n }\n }\n // If we have leading INTERFACES but no public section was emitted, emit a\n // minimal public section containing them so the class still compiles.\n if (!publicEmitted && leadingInterfaces.length > 0) {\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('PUBLIC SECTION')}.`);\n writer.indent();\n for (const i of leadingInterfaces) {\n writer.writeLine(`${K('INTERFACES')} ${i}.`);\n }\n writer.dedent();\n }\n}\n\nfunction printImplementations(\n name: string,\n impls: ReadonlyArray<import('../nodes/members').MethodImpl>,\n writer: Writer,\n): void {\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('CLASS')} ${name} ${K('IMPLEMENTATION')}.`);\n writer.indent();\n impls.forEach((impl, idx) => {\n if (idx > 0) writer.blank();\n printMethodImpl(impl, writer);\n });\n writer.dedent();\n writer.writeLine(`${K('ENDCLASS')}.`);\n}\n\nexport function printClassDef(node: ClassDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n const hasSections = node.sections.length > 0;\n printDefinitionHeader(\n node.name,\n {\n local: false,\n superclass: node.superclass,\n interfaces: node.interfaces,\n isFinal: node.isFinal,\n isAbstract: node.isAbstract,\n isForTesting: node.isForTesting,\n isCreatePrivate: node.isCreatePrivate,\n interfacesInsidePublicSection: hasSections,\n },\n writer,\n );\n writer.indent();\n printSections(node.sections, writer, {\n leadingInterfaces: hasSections ? node.interfaces : [],\n });\n writer.dedent();\n writer.writeLine(`${K('ENDCLASS')}.`);\n writer.blank();\n printImplementations(node.name, node.implementations, writer);\n}\n\nexport function printLocalClassDef(node: LocalClassDef, writer: Writer): void {\n const K = (s: string): string => writer.kw(s);\n printDefinitionHeader(\n node.name,\n {\n local: true,\n superclass: node.superclass,\n interfaces: node.interfaces,\n isFinal: node.isFinal,\n isAbstract: node.isAbstract,\n isForTesting: node.isForTesting,\n },\n writer,\n );\n writer.indent();\n printSections(node.sections, writer);\n writer.dedent();\n writer.writeLine(`${K('ENDCLASS')}.`);\n if (node.implementations.length > 0) {\n writer.blank();\n printImplementations(node.name, node.implementations, writer);\n }\n}\n","import type { Writer } from './writer';\nimport type { InterfaceDef } from '../nodes/interface';\nimport { printTypeDef, printAbapDoc } from './print-types';\nimport { printMethodDef } from './print-members';\n\nexport function printInterfaceDef(node: InterfaceDef, writer: Writer): void {\n printAbapDoc(node.abapDoc, writer);\n const K = (s: string): string => writer.kw(s);\n writer.writeLine(`${K('INTERFACE')} ${node.name} ${K('PUBLIC')}.`);\n writer.indent();\n for (const m of node.members) {\n switch (m.kind) {\n case 'TypeDef':\n printTypeDef(m, writer);\n break;\n case 'MethodDef':\n printMethodDef(m, writer);\n break;\n }\n }\n writer.dedent();\n writer.writeLine(`${K('ENDINTERFACE')}.`);\n}\n","import type { AbapNode } from '../nodes/base';\nimport type { PrintOptions } from './options';\nimport { resolveOptions } from './options';\nimport { Writer } from './writer';\nimport { printTypeDef } from './print-types';\nimport { printExpression } from './print-expressions';\nimport {\n printStatement,\n printDataDecl,\n printFieldSymbolDecl,\n printComment,\n} from './print-statements';\nimport {\n printAttributeDef,\n printConstantDecl,\n printEventDef,\n printMethodDef,\n printMethodImpl,\n} from './print-members';\nimport { printClassDef, printLocalClassDef } from './print-class';\nimport { printInterfaceDef } from './print-interface';\n\nexport type { PrintOptions, ResolvedPrintOptions } from './options';\nexport { Writer } from './writer';\nexport { printInlineType } from './print-types';\nexport { printExpression } from './print-expressions';\n\n/** Pretty-print an ABAP AST node to source code. */\nexport function print(node: AbapNode, options?: PrintOptions): string {\n const writer = new Writer(resolveOptions(options));\n printNode(node, writer);\n return writer.toString();\n}\n\nfunction printNode(node: AbapNode, writer: Writer): void {\n switch (node.kind) {\n // Top-level / structural\n case 'ClassDef':\n printClassDef(node as Parameters<typeof printClassDef>[0], writer);\n return;\n case 'LocalClassDef':\n printLocalClassDef(\n node as Parameters<typeof printLocalClassDef>[0],\n writer,\n );\n return;\n case 'InterfaceDef':\n printInterfaceDef(\n node as Parameters<typeof printInterfaceDef>[0],\n writer,\n );\n return;\n // Type-level\n case 'TypeDef':\n printTypeDef(node as Parameters<typeof printTypeDef>[0], writer);\n return;\n case 'BuiltinType':\n case 'NamedTypeRef':\n case 'TableType':\n case 'StructureType':\n case 'EnumType':\n throw new Error(\n `print: ${node.kind} is not a top-level node — wrap it in a TypeDef`,\n );\n // Members\n case 'AttributeDef':\n printAttributeDef(\n node as Parameters<typeof printAttributeDef>[0],\n writer,\n );\n return;\n case 'MethodDef':\n printMethodDef(node as Parameters<typeof printMethodDef>[0], writer);\n return;\n case 'MethodImpl':\n printMethodImpl(node as Parameters<typeof printMethodImpl>[0], writer);\n return;\n case 'EventDef':\n printEventDef(node as Parameters<typeof printEventDef>[0], writer);\n return;\n case 'ConstantDecl':\n printConstantDecl(\n node as Parameters<typeof printConstantDecl>[0],\n writer,\n );\n return;\n case 'Section':\n throw new Error(\n 'print: Section is an internal node — print its enclosing ClassDef/LocalClassDef instead',\n );\n case 'MethodParam':\n throw new Error(\n 'print: MethodParam is an internal node — print its enclosing MethodDef',\n );\n // Data (as statement)\n case 'DataDecl':\n printDataDecl(node as Parameters<typeof printDataDecl>[0], writer);\n return;\n case 'FieldSymbolDecl':\n printFieldSymbolDecl(\n node as Parameters<typeof printFieldSymbolDecl>[0],\n writer,\n );\n return;\n // Statements\n case 'Assign':\n case 'Call':\n case 'Raise':\n case 'If':\n case 'Loop':\n case 'Return':\n case 'Try':\n case 'Append':\n case 'Insert':\n case 'Read':\n case 'Clear':\n case 'Exit':\n case 'Continue':\n case 'Raw':\n printStatement(node as Parameters<typeof printStatement>[0], writer);\n return;\n case 'Comment':\n printComment(node as Parameters<typeof printComment>[0], writer);\n return;\n // Expressions (printed as a single-line expression — no trailing period)\n case 'Literal':\n case 'IdentifierExpr':\n case 'ConstructorExpr':\n case 'MethodCallExpr':\n case 'BinOp':\n case 'StringTemplate':\n case 'Cast':\n writer.writeLine(\n printExpression(node as Parameters<typeof printExpression>[0], writer),\n );\n return;\n }\n}\n"],"mappings":";AAAA,IAAa,eAAb,cAAkC,MAAM;CACtC,YAA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AM,IAAI,MACR,wEACF;EAEF,KAAK;GACH,cAAc,MAA6C,MAAM;GACjE;EACF,KAAK;GACH,qBACE,MACA,MACF;GACA;EAEF,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;GACH,eAAe,MAA8C,MAAM;GACnE;EACF,KAAK;GACH,aAAa,MAA4C,MAAM;GAC/D;EAEF,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;GACH,OAAO,UACL,gBAAgB,MAA+C,MAAM,CACvE;GACA;CACJ;AACF"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.4.16",
6
+ "version": "0.4.19",
7
7
  "description": "Zero-dependency typed AST and pretty-printer for ABAP source code (classes, interfaces, types, statements)",
8
8
  "type": "module",
9
9
  "types": "./dist/index.d.mts",