Welcome to CrapScript, a distinctive, minimalistic, interpreted esoteric programming language, written in TypeScript and Deno, and designed to provide a unique coding experience. This language embraces unconventional syntax and features while incorporating familiar elements such as let
and const
declarations, functions, and versatile binary expressions. As of now the language isn't turing complete yet but I am working on it.
The let
keyword allows you to declare mutable variables, enabling dynamic storage for various data types.
[identifier] = [expression] ;
Use const
to declare constants, ensuring that a variable's value remains unchanged once assigned.
const [identifier] = [expression] ;
Please note that variable declarations absolutely need to end with semicolons, however no semicolons are required for assignment or operations.
Define modular code blocks with the func
keyword, supporting parameterized functions for enhanced code organization and reusability.
fn [functionName]([parameter1], [parameter2], ...) { [functionBody] }
Harness the power of binary expressions for arithmetic operations, including addition +
, subtraction -
, multiplication *
, division /
, and modulus %
.
[result] = [operand1] [operator] [operand2]
let x = 10;
const pi = 3.14;
x = x + 1
y = y / x
z = y
fn add(a, b) {
let sum = 0;
sum = a + b
print(sum)
}
let result = add(5, 7) * 2;
let x = 5;
print(x)
To run a program written in CrapScript, simply modify the test.txt
file and save it and then use the following command to run the main.ts
file:
deno run -A main.ts
- Make sure that you have Deno installed.
- Fork and clone the repo.
- Navigate to the
src
folder - Write your CrapScript program by modifying the
test.txt
file. - Run the
main.ts
file.
The following is a list of planned features that will be implemented in the near future :
- Objects
- Loops
- Function to read user input
- Time
- Conditional Logic