7 unstable releases (3 breaking)

0.4.0 Nov 11, 2024
0.3.0 Nov 5, 2024
0.2.3 Oct 21, 2024
0.1.0 Oct 19, 2024

#85 in Programming languages

Download history 513/week @ 2024-10-18 32/week @ 2024-10-25 109/week @ 2024-11-01 134/week @ 2024-11-08 23/week @ 2024-11-15 6/week @ 2024-11-22

177 downloads per month

MIT license

75KB
2K SLoC

aspl - A Simple Programming Language

aspl is a simple, intuitive programming language inspired by the Bash shell and Unix command-like systems.

Language

Basic

set msg "The apple count is: "
set count 10
logl msg count # The apple count is: 10

Data Types

set int 64
set str "Hello, World"
set bool true
set arr [1 2 3 4]

Math

set num1 32
set num2 32
set result @math(num1 + num2)

logl result # 64

Conditional

set a 10
set b 20

check a < b {
  logl "a is less than b"
}

While loop

while true {
  logl "loop"
}

Function

fn get {
  ret "foobar"
}

fn print arg1 {
  logl arg
}

set msg @get
@print msg

Sourcing

# utils.aspl
fn util_foo {
  logl "foo bar"
}
# main.aspl
@source "./utils.aspl"

@util_foo

Using

Installation

cargo install aspl

Running

aspl <input.aspl>

Contribution

Contributions to aspl are welcome! If you have ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request on aspl

LICENSE

LICENSE

Dependencies

~320KB