Skip to content

Pradakicks/go-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Writing an interpreter from scratch in Golang

Resources: Building an Interpreter in Go by Thorsten Bell.

TODO(Pradakicks): modify structs so that it efficiently uses memory and then run benchmarks and document results https://medium.com/@sebassegros/golang-dealing-with-maligned-structs-9b77bacf4b97 Example: Current:

type PrefixExpression struct {
 Token    token.Token // The prefix token, e.g !
 Operator string
 Right    Expression
}

Optimized:

type PrefixExpression struct {
 Operator string
 Right    Expression
 Token    token.Token // The prefix token, e.g !
}

TODO(Pradakicks): Look into other implementations for evaluation. Example: JIT, AST -> Bytecode, ect

TODO(Pradakicks): Add stack trace to error handling

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages