@abapify/abap-ast 0.4.1 → 0.4.4

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.
@@ -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,YAAA,SAAqB,KAAA;cACpB,OAAA;AAAA;AAAA,iBAME,YAAA,GAAA,CACd,KAAA,EAAO,CAAA,qBACP,KAAA,UACA,QAAA,WACC,CAAA;;;;KCRS,QAAA;;;;;KAqDA,WAAA;;;;ADjDZ;;KCwDY,OAAA,YAAmB,WAAA;;UAGd,QAAA;EAAA,SACN,IAAA,EAAM,QAAA;EAAA,SACN,OAAA,GAAU,OAAA;AAAA;;KAIT,UAAA;;UAGK,OAAA,SAAgB,QAAA;EAAA,SACtB,IAAA;EAAA,SACA,IAAA;EAAA,SACA,KAAA;AAAA;AAAA,iBAGK,OAAA,CAAQ,KAAA;EACtB,IAAA;EACA,KAAA;AAAA,IACE,OAAA;AA5BJ;AAAA,KAwCY,UAAA;;;ADhGZ;AAAA,KEIY,eAAA;AAAA,UA4BK,WAAA,SAAoB,QAAA;EAAA,SAC1B,IAAA;EAAA,SACA,IAAA,EAAM,eAAA;EAAA,SACN,MAAA;EAAA,SACA,QAAA;AAAA;AAAA,iBAGK,WAAA,CAAY,KAAA;EAC1B,IAAA,EAAM,eAAA;EACN,MAAA;EACA,QAAA;AAAA,IACE,WAAA;;UAkBa,YAAA,SAAqB,QAAA;EAAA,SAC3B,IAAA;EAAA,SACA,IAAA,EAAM,UAAA;AAAA;AAAA,iBAGD,YAAA,CAAa,KAAA;EAAS,IAAA,EAAM,UAA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C,eAAA,CAAgB,IAAA,EAAM,UAAA,EAAY,MAAA,EAAQ,MAAA;;;;iBCmB1C,KAAA,CAAM,IAAA,EAAM,QAAA,EAAU,OAAA,GAAU,YAAA"}
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,MAAM;WACN;;UAGM,iBAAiB;WACvB;WACA,UAAU;WACV,kBAAkB;;iBAGb,SAAS;EACvB,UAAU;EACV,kBAAkB;IAChB;;UAoBa,gBAAgB;WACtB;WACA,MAAM;WACN,MAAM,UAAU;;iBAGX,QAAQ;EACtB,MAAM;EACN,MAAM,UAAU;EACh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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"}
package/dist/index.mjs CHANGED
@@ -23,7 +23,7 @@ function comment(input) {
23
23
 
24
24
  //#endregion
25
25
  //#region src/nodes/types.ts
26
- const BUILTIN_TYPE_NAMES = new Set([
26
+ const BUILTIN_TYPE_NAMES = /* @__PURE__ */ new Set([
27
27
  "i",
28
28
  "int8",
29
29
  "f",
@@ -960,9 +960,7 @@ function printSection(sec, writer, opts) {
960
960
  case "ConstantDecl":
961
961
  printConstantDecl(m, writer);
962
962
  break;
963
- case "EventDef":
964
- printEventDef(m, writer);
965
- break;
963
+ case "EventDef": printEventDef(m, writer);
966
964
  }
967
965
  writer.dedent();
968
966
  }
@@ -1060,9 +1058,7 @@ function printInterfaceDef(node, writer) {
1060
1058
  case "TypeDef":
1061
1059
  printTypeDef(m, writer);
1062
1060
  break;
1063
- case "MethodDef":
1064
- printMethodDef(m, writer);
1065
- break;
1061
+ case "MethodDef": printMethodDef(m, writer);
1066
1062
  }
1067
1063
  writer.dedent();
1068
1064
  writer.writeLine(`${K("ENDINTERFACE")}.`);
@@ -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;AAC3B,QAAM,QAAQ;AACd,OAAK,OAAO;;;AAIhB,SAAgB,aACd,OACA,OACA,UACG;AACH,KAAI,UAAU,UAAa,UAAU,QAAQ,UAAU,GACrD,OAAM,IAAI,aAAa,GAAG,SAAS,oBAAoB,MAAM,cAAc;AAE7E,QAAO;;;;;ACkET,SAAgB,QAAQ,OAGZ;AACV,KAAI,OAAO,MAAM,SAAS,SACxB,OAAM,IAAI,aAAa,8CAA4C;AAErE,QAAO,OAAO,OAAO;EACnB,MAAM;EACN,MAAM,MAAM;EACZ,OAAO,MAAM,SAAS;EACvB,CAAC;;;;;AC3EJ,MAAM,qBACJ,IAAI,IAAqB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AASJ,SAAgB,YAAY,OAIZ;AACd,KAAI,CAAC,MAAM,KACT,OAAM,IAAI,aAAa,kDAAgD;AAEzE,KAAI,CAAC,mBAAmB,IAAI,MAAM,KAAK,CACrC,OAAM,IAAI,aACR,sCAAsC,OAAO,MAAM,KAAK,CAAC,GAC1D;AAEH,QAAO,OAAO,OAAO;EACnB,MAAM;EACN,MAAM,MAAM;EACZ,QAAQ,MAAM;EACd,UAAU,MAAM;EACjB,CAAC;;AASJ,SAAgB,aAAa,OAA2C;AACtE,KAAI,CAAC,MAAM,KACT,OAAM,IAAI,aAAa,mDAAiD;AAE1E,QAAO,OAAO,OAAO;EAAE,MAAM;EAAyB,MAAM,MAAM;EAAM,CAAC;;AAe3E,SAAgB,UAAU,OAKZ;AACZ,KAAI,CAAC,MAAM,QACT,OAAM,IAAI,aAAa,mDAAiD;AAE1E,QAAO,OAAO,OAAO;EACnB,MAAM;EACN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KAAK;EACL,KAAK;AACH,kBAAe,MAA8C,OAAO;AACpE;EACF,KAAK;AACH,gBAAa,MAA4C,OAAO;AAChE;EAEF,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;AACH,UAAO,UACL,gBAAgB,MAA+C,OAAO,CACvE;AACD"}
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,MAAM,IAAI,EAAE,EAC3D;CAEF,OAAO,OAAO,OAAO;EACnB,MAAM;EACN,MAAM,MAAM;EACZ,QAAQ,MAAM;EACd,UAAU,MAAM;CAClB,CAAC;AACH;AAQA,SAAgB,aAAa,OAA2C;CACtE,IAAI,CAAC,MAAM,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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"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.4.1",
6
+ "version": "0.4.4",
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",