forked from TrueCloudLab/neoneo-go
8fe079ec8e
* refactor to use ast.Walk for recursive converting * added lots of test cases * added a new way to handle jump labels * function calls with multiple arguments * binary expression (LOR LAND) * struct types + method receives * cleaner opcode dumps, side by side diff for debugging test cases |
||
---|---|---|
.. | ||
tests | ||
codegen.go | ||
compiler.go | ||
emit.go | ||
func_scope.go | ||
README.md | ||
struct_scope.go |
NEO-GO Compiler
The neo-go compiler compiles Go programs to bytecode that the NEO virtual machine can understand.
The neo-go compiler is under very active development and will be updated on a weekly basis.
Currently supported
- type checker
- multiple assigns
- types int, string and bool
- struct types + method receives
- functions
- composite literals
[]int, []string
- basic if statements
- binary expressions.
- return statements
Not yet implemented
- for loops
- ranges
- builtins (append, len, ..)
- blockchain helpers (sha256, storage, ..)
- import packages
Not supported
Due to the limitations of the NEO virtual machine, features listed below will not be supported.
- channels
- goroutines
- multiple returns
How to report bugs
- Make a proper testcase (example testcases can be found in the tests folder)
- Create an issue on Github
- Make a PR with a reference to the created issue, containing the testcase that proves the bug
- Either you fix the bug yourself or wait for patch that solves the problem