Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

A WIP compiler for the Catspeak modding language.

License

Notifications You must be signed in to change notification settings

Schwungus/catspeak-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catspeak-compiler

A WIP compiler for the Catspeak modding language.

The compiler is currently able to parse a limited subset of the language and convert it to Catspeak IR in JSON format.

This project is in its infancy; expect breaking bugs and breaking changes. Catspeak will not run all code compiled by this program, and not all Catspeak code can be compiled either.

The project is not tied to a specific release of Catspeak yet since its API is changing constantly. As such, it may become outdated overnight.

Usage

catspeak-compiler file1.txt file2.txt

The command above will produce files file1.ast.json, file2.ast.json, file1.ir.json, and file2.ir.json. The AST and the IR files reside in the same directory as the original scripts.

WARNING: the IR files cannot be read properly with the built-in json_parse function since it converts null fields to null pointers rather than the undefined Catspeak expects. As of now, you should use SNAP by JujuAdams for parsing JSON.

Releases

No releases published

Packages

No packages published

Languages