Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1 KB

README.md

File metadata and controls

53 lines (40 loc) · 1 KB

amVy interpreter

amVy is a simple language, derived from the Monkey programming language, which was my first source of knowledge while designing amVy. The final objective is to build a language with no heap, that still implement a sort of dynamic memory allocation.

Example

fn fibonacci(n) {
	if (n < 2) {
		return (1);
	}
	return fibonacci(n - 2) + fibonacci(n - 1);
}

let res = fibonacci(10);
print(res);

Usage

First build the interpreter

make

Execute code

./amVy mycode.vY

Print the generated AST

./amVy mycode.vY --ast

Compile amVy with an internal stack trace for debugging purposes

make debug

Main resources

TODO

  • support for arrays
  • add callstack limit
  • make the tracer stack depth aware, like --ast opt
  • own hashmap implementation