AbySS (Advanced-scripting by Symbolic Syntax) is a programming language designed to combine the thrill of casting spells with the power of advanced scripting. AbySS aims to provide an intuitive and symbolically rich syntax that allows developers to interact with their code as if they were performing magic. Whether you're scripting a simple operation or crafting complex systems, AbySS offers a unique and immersive experience.
- Symbolic Syntax: AbySS emphasizes a symbolically intuitive syntax, making the code easy to read and write, while retaining powerful functionality.
- Spellcasting-inspired Programming: The language's design mimics the experience of casting spells, with reserved keywords that evoke a magical theme.
- Interactive Spellcasting: AbySS supports interactive scripting through an interpreter, allowing real-time execution and feedback.
- Structured Sorcery: AbySS encourages structured programming, combining the flexibility of scripting with the rigor of structured code.
You can install AbySS by cloning the repository and building it locally. cargo-llvm-cov
is supported for test coverage analysis.
git clone https://github.com/your-repository/abyss.git
cd abyss
cargo build
For test coverage with cargo-llvm-cov
, install the tool as follows:
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov
To start using AbySS, you can either enter the interactive interpreter mode or run .aby
script files.
You can start the AbySS interpreter with the following command:
abyss cast
To run a .aby
script file, use the following command:
abyss invoke <script.aby>
AbySS uses a symbolic and intuitive syntax inspired by magical themes. Below are some of the core elements of the language.
- Comments: Comments in AbySS are marked with
//
for single-line comments and/* */
for multi-line comments.
// This is a single-line comment
/*
This is a multi-line comment
*/
AbySS supports the following primitive types:
- arcana: Represents integers (e.g.,
42
,-3
). - aether: Represents floating-point numbers (e.g.,
3.14
,-1.0
). - rune: Represents strings (e.g.,
"Hello, World"
). - omen: Represents boolean values, with
boon
fortrue
andhex
forfalse
. - abyss: Represents the
void
type, indicating no value.
forge x: arcana = 10;
forge pi: aether = 3.14;
forge message: rune = "Hello, AbySS";
forge is_active: omen = boon;
Variables are declared using the forge
keyword. You must explicitly specify the variable type.
forge x: arcana = 42;
forge greeting: rune = "Welcome to AbySS!";
To declare mutable variables, use the morph
keyword with forge
.
forge morph counter: arcana = 10;
counter += 5;
AbySS uses the oracle
construct, inspired by match statements in other languages, to handle conditionals. (Work-in-progress)
oracle x {
1 => unveil("One"),
2 => unveil("Two"),
_ => unveil("Something else")
}
Functions in AbySS are defined using the engrave
keyword. (Work-in-progress)
engrave add(a: arcana, b: arcana): arcana {
a + b
}
For output, AbySS uses the unveil
function to print values to the console.
unveil("Hello, AbySS");
unveil(x + 42);
Input functionality is TBD.
forge x: arcana = 10;
forge y: arcana = 20;
unveil(x + y);
forge num: arcana = 3;
oracle num {
1 => unveil("One"),
2 => unveil("Two"),
_ => unveil("Other number")
}
engrave greet(name: rune): abyss {
unveil("Hello, " + name);
}
greet("AbySS");
- Interpreter Improvements: Enhance the interpreter for better real-time feedback (Work-in-progress).
- File I/O: Introduce input functionality and file handling (TBD).
- Standard Library: Develop a standard library with common functions and utilities (TBD).
- Error Handling: Implement robust error handling (TBD).
AbySS is open-source software licensed under the MIT License. See the LICENSE file for details.