2023.6.7 • Published 11 months ago

tscpl v2023.6.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

TSCPL

TSCPL (TypeScript Compiled Programming Language) is a port of ACPL. The original ACPL compiler compiles ACPL files to C, but TSCPL can compile ACPL files to TypeScript and even run ACPL files after compilation.

Installation

npm install -g tscpl

Compiling and Running ACPL files

Compiling

To compile a ACPL file, you just need to run the following command:

tscpl [ACPL file here]

Running

Since version 1.1.0, TSCPL can run ACPL files automatically after the file is compiled. To do this, run the following command:

tscpl [ACPL file here] --run

Output files

TSCPL compiles ACPL files to TypeScript in the file format of [original ACPL file name].ts. Since version 1.2.0, you can use the --output flag to output the compiled ACPL file to any file name you want! Please note that this doesn't change the output language. To do this, run the following command:

tscpl [ACPL file here] --output [compiled ACPL file name here]

libtscpl

Since version 1.2.0, libtscpl is the backend for TSCPL written in TypeScript. It provides TSCPL with it's core functions, such as compiling ACPL files.

Documentation

compile()

Compiles a ACPL file.

Example script

# main.acpl
outln "Hello from libtscpl!"
// index.ts
import { compile } from "tscpl";

try {
    compile("main.acpl", "main.acpl.ts");
} catch(e) {
    console.error(e);
}
2023.6.7

11 months ago

2023.4.17

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago