https://github.com/redstonewizard08/dpscript
A programming language for datapacks, inspired by SethBling's CBScript.
https://github.com/redstonewizard08/dpscript
Last synced: 6 months ago
JSON representation
A programming language for datapacks, inspired by SethBling's CBScript.
- Host: GitHub
- URL: https://github.com/redstonewizard08/dpscript
- Owner: RedstoneWizard08
- License: mit
- Created: 2024-04-30T15:40:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-10T23:51:46.000Z (over 1 year ago)
- Last Synced: 2025-04-12T00:51:49.253Z (9 months ago)
- Language: Rust
- Size: 390 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DPScript
DPScript is a transpiled programming language to aid in Datapack development, inspired by CBScript.
# Features
- Extremely comfortable syntax
- A friendly and familiar syntax
- An IR form to allow other syntaxes to grow on top of DPScript's framework
- Advanced conditionals
- Scoreboard & store manipulation
- A batteries-included standard library (WIP)
- Full array support
- Support for loops
- Compile-time constants
- Easy text components and NBT manipulation
- Functions & subroutines
- Tags
- Init & Tick blocks
- Modules
- Imports & Exports
- A language server for auto-completion (Coming Soon!)
- Support for your favorite IDEs (WIP)
- A fully-fledged package registry and build system (Coming Soon!)
- And much more!
DPScript features a fully custom tokenizer, lexer, validator, and AST to provide an extremely comfortable
syntax while being very stable. By merging all imported files into a single AST it can provide the best
error detection and validation possible. Don't worry anymore about strange issues when making datapacks!
## TODO List
### Core
- [x] Tokenizer
- [x] AST
- [x] Lexer
- [x] AST Validator
- [x] IR (DPIR)
- [x] Codegen
- [x] Build System
### Language Features
- [x] Functions
- [x] Variables
- [x] Compile-time constants
- [x] Imports
- [x] Exports
- [x] If/else statements
- [x] Subroutines & goto
- [x] `for entity in selector` loops
- [ ] `for ... in ...` loops
- [ ] `for ... in [0..3]` loop unrolling
### QoL
- [x] Syntax Highlighting
- [x] IR Syntax Highlighting
- [ ] More CLI commands and options
- [ ] Language server
- [ ] Code formatter
### Future Plans
- [ ] Package Registry
- [ ] Build system support for the package registry
- [ ] IR-level optimizer