iodine

Crates.ioiodine
lib.rsiodine
version0.3.0
sourcesrc
created_at2024-06-29 10:34:56.436516
updated_at2024-06-29 21:46:27.775163
descriptionStack-based programming language
homepage
repositoryhttps://github.com/prodbysky/iodine
max_upload_size
id1287296
size40,773
(prodbysky)

documentation

README

Iodine

  • Stack based programming language

Inspiration

Installation

  cargo install iodine

Usage

  cargo build --release
  ./target/release/iodine -i <input.iod>

Example

fdef square : number
    dup *
fend

1 1 +
420 0.5 *
420 dup -
420 69 > if "420 IS more than 69" print end
3 square 9 == if "3^2 is 9!" print end

Features

  • Basic math operations (See quirks)
  • If statements
  • Function return types
  • Functions
  • Comparisons between numbers
  • Signed / unsigned integers, floating point numbers
  • Strings (They don't serve any purpose for now)
  • Comments
  • Simple stack operations (drop, dup)

Quirks

  • Any math operation on any integer type result is a f64:
# Output: 4.0 #
2 2 +

TODO

  • Including files
  • Don't coerce all numbers to f64 after any math operation
  • More stack operations
  • Reading from files
  • Arrays
  • Escaped strings
Commit count: 50

cargo fmt