tj / luna

luna programming language - a small, elegant VM implemented in C
2.46k stars 148 forks source link

test parser in test_runner #65

Closed aisk closed 8 years ago

aisk commented 9 years ago

Hi TJ,

I refactored the parser test case, now they are tested in the test_runner process. And for that, a global print_func in prettyprint is added, so we can print the AST to a memory buffer.

Although this may cause thread safety issue, but I saw other global variable (like prettyprint.c:indents), so for now it's OK I think?

And I found that file_read function may have a bug: it's not set a '\0' at the end of the string.

And I added two vim plugin config in repo, is is OK?