Skip to content

Inky-developer/debris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debris Language

ci dependency status Visual Studio Marketplace Version

Debris is a powerful language & compiler which aims to make the process of creating a datapack easier and quicker. For a working prototype in python, take a look at McScript.

There is an interactive online playground available: https://inky-developer.github.io/debris-playground/

Status

This language is in a very early state.

Documentation for the Project can be found here

Goal for version 0.1: Feature parity with the mcscript prototype

  • Internal support for types
  • Internal support for variables
  • Support for modules
  • Support for integers and arithmetic operations (+, -, *, /, %)
  • Support for booleans and relations (==, !=, <, >, <=, >=)
  • Support for conditions
  • Support for recursive loops
  • Support for functions
  • Control flow (return statements)
  • Support for structs
    • Struct declaration and initialization
    • Struct objects as function parameters
    • Associated methods and values for structs
  • Support for sum types
    • Declaring sum tyes
    • Matching on sum types
  • Function expressions (comptime my_func = fn() { ... })
  • Struct expressions (comptime my_struct = struct { ... })
  • Interfaces
  • Support for tuples
    • tuple patterns for variable assignment
    • tuple patterns for variable updates
    • tuple methods, including .length(), .get(0), .added(element) and .join(separator)
    • iterating tuples (comptime for i in (1, 2, 3) { print(i) })
  • Basic minecraft standard library
  • Builtin functionality for more control over the generated datapack
    • execute function for inserting any command
    • export function for generating a function at a specific path
    • on_tick function for calling a function every tick
  • Context manipulators (execute as/at/positioned/...)
  • Syntax sugar
    • In-place operators (+=, -=, *=, /=, %=)
    • While loops
    • attribute to declare ticking functions
    • syntax sugar for for-loops (Blocked on interfaces?)
  • Basic optimization passes
  • Further optimizations
  • Automated integration tests
  • Internal refactoring to remove some recursive implementations
  • Improved parser for more flexibility
  • Good error messages

Editor Support

A basic vscode extension can be found at the latest run of the extensions action.