This is maybe going to be a statically-typed subset of the Ruby language. Or it could become something else entirely! It's mostly a playground for learning about type systems and inference.
This is also my first foray into using LLVM as a backend, so there's a lot of learning going on here!
The name "mya" is just a working name... the name will likely change.
bundle install
bundle exec rake specIf you don't have LLVM version 20 libraries available on your system, you can build it like this:
bundle exec rake llvm:install
LVM_CONFIG=$(pwd)/vendor/llvm-install/bin/llvm-config bundle install
export LD_LIBRARY_PATH=$(pwd)/vendor/llvm-install/lib
bundle exec rake spec- Logical operators:
&&,||,!(and, or, not operators) - Control flow:
break,next,returnstatements - Conditional statements:
unless,elsif(only basicif/elsesupported) - Pattern matching:
case/whenstatements - Loop constructs:
until,forloops (onlywhilesupported) - Exception handling:
begin/rescue/ensure/raise - Assignment operators:
+=,-=,*=,/=,||=,&&= - Range operators:
..,...(inclusive/exclusive ranges) - String interpolation:
"Hello #{name}"syntax - Symbols:
:symbolsyntax - Hash literals:
{ key: value }syntax - Block syntax:
{ |x| ... }anddo |x| ... end - Iterators:
.each,.map,.select, etc. - Multiple assignment:
a, b = 1, 2 - Splat operators:
*args,**kwargs - Constants: Proper constant definition and scoping
- Module system:
moduleandinclude/extend
- No generic type syntax documentation: The supported generic type syntax (e.g.,
Option[String],Array[Integer],Array[Array[String]]) needs better documentation and examples - Type annotation error messages: Error messages for type annotation mismatches could be more descriptive and include context about where the annotation was defined