[refactor] distinguish global variables and local ones
add make test command
add include guard to emitter.h
change the way of printing emission result
emit global variable declarations