Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COBOL-X

Build Version VS Code Extension License npm

COBOL-X is a modern COBOL-inspired programming platform for readable business logic, deterministic tooling, and backend-oriented workflows. This repository ships a TypeScript-based compiler toolchain, runtime, package manager layer, editor integration, and release validation flow.

Features

  • Working compiler pipeline with lexer, parser, AST, semantic analysis, HIR, MIR, optimization, and JavaScript backend emission
  • CLI workflows for build, run, check, test, bench, debug, dev, docs, code generation, migrations, visualization, deploy, and package management
  • CargoX manifest, dependency graph, lockfile, install, update, and local publish support
  • Runtime modules for scheduling, actors, events, distributed service discovery, observability, workflows, self-healing, and versioned state
  • Time-travel debugging support with trace recording and rewind playback
  • LSP and VS Code extension support for .cbx, .cob, and .col

Installation

npm install cobolx-2

Build from source

npm install
npm run build
npm run validate

Helper scripts are available in install.ps1 and install.sh.

Quick Start

node cli/cobolx-cli/dist/index.js new my-service api
cd my-service
node ..\cli\cobolx-cli\dist\index.js add ledger 1.2.3
node ..\cli\cobolx-cli\dist\index.js install
node ..\cli\cobolx-cli\dist\index.js run
node ..\cli\cobolx-cli\dist\index.js debug --rewind

COBOL-X Example

PROGRAM Payments

ENUM Result:
OK(value)
ERR(message)
END

FUNCTION add(left, right)
BEGIN
  RETURN left + right
END-FUNCTION

BEGIN
  LET subtotal = add(20, 22)
  DISPLAY subtotal
END

Repository Layout

cobolx/
├── compiler/
├── runtime/
├── stdlib/
├── cli/
├── cargox/
├── lsp/
├── vscode-extension/
├── formatter/
├── linter/
├── debugger/
├── profiler/
├── examples/
├── tests/
├── benchmarks/
├── docs/
├── LICENSE
├── CONTRIBUTING.md
├── CHANGELOG.md
└── .gitignore

CLI

  • cobolx build
  • cobolx run
  • cobolx check
  • cobolx test
  • cobolx bench
  • cobolx add <pkg> <version>
  • cobolx install
  • cobolx update
  • cobolx publish
  • cobolx dev
  • cobolx doc
  • cobolx repl
  • cobolx visualize
  • cobolx deploy

VS Code Extension

The publishable extension lives in vscode-extension. It includes language registration, syntax highlighting, snippets, LSP-backed diagnostics/hover/completions, and VS Code commands for run, build, REPL, and debug.

VS Code Marketplace:

Packaging flow:

cd vscode-extension
npm install -g vsce
npx @vscode/vsce package
vsce login Magnexis
vsce publish

Examples

Runnable example apps live under examples:

Screenshots:

  • docs/screenshots/cli-build.png
  • docs/screenshots/debug-rewind.png
  • docs/screenshots/vscode-extension.png

Development

npm install
npm run build
npm run check
npm run test
npm run validate

Further reading:

About

COBOL-X is a modern COBOL-inspired programming platform for readable business logic, deterministic tooling, and backend-oriented workflows. This repository ships a TypeScript-based compiler toolchain, runtime, package manager layer, editor integration, and release validation flow.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages