@abapify/abap-ast
v0.4.60
Published
Zero-dependency typed AST and pretty-printer for ABAP source code (classes, interfaces, types, statements)
Readme
@abapify/abap-ast
Zero-dependency typed AST and pretty-printer for ABAP source code (classes, interfaces, types, statements).
Install
npm install @abapify/abap-astUsage
import {
print,
classDef,
section,
methodDef,
methodImpl,
returnStmt,
} from '@abapify/abap-ast';
const cls = classDef({
name: 'zcl_greeter',
isFinal: true,
sections: [
section({
visibility: 'public',
members: [methodDef({ name: 'greet', visibility: 'public' })],
}),
],
implementations: [methodImpl({ name: 'greet', body: [returnStmt()] })],
});
console.log(print(cls)); // CLASS zcl_greeter DEFINITION PUBLIC FINAL ...Features
- Typed node factories for classes, interfaces, types, and statements
- Deterministic pretty-printer with ABAPDoc support
- Zero runtime dependencies
Documentation
adt-cli.netlify.app/sdk/packages/abap-ast
Part of abapify — open, typed tooling for SAP ABAP Development Tools (ADT): CLI, MCP server, and SDK.
