Skip to content

johron/zelkel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zelkel

  • Low-level object-oriented programming language

TODO

  • Implement cut in parser for all sub-parsers
  • Better error handling and reporting, "unexpected token", should also include the actual expected token
  • Other TODOs in the code
  • Add comments, single and multiline, and documentation comments

Syntax example

require std::mem;
require std::io;

class Animal {
  val name: s{128};

  static fn! new(name: s{128}) -> *Self {
    val animal: *Self = mem.alloc(mem.sizeof(Self));
    animal.name = name;
    return animal;
  }

  fn! speak(self: *Self) -> s{128} {
    return f"{self.name} makes a sound";
  }
}

static fn! main() {
  val dog: *Animal = Animal.new("Rex");
  val sound: s{128} = dog.speak();
  io::println(sound);
}

About

Low-level object-oriented programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors