OSDN Git Service

add assgin statement and modify defined statement to support declaration (#9)
authoroysheng <33340252+oysheng@users.noreply.github.com>
Tue, 18 Sep 2018 07:31:55 +0000 (15:31 +0800)
committerPaladz <yzhu101@uottawa.ca>
Tue, 18 Sep 2018 07:31:55 +0000 (15:31 +0800)
commita475b64323974673a90c39adcf9e3149b9924725
tree3504f201a6edf6b78fe590225616551c4c923b92
parenta7da0da2403f6595a091f0068b01ef467213758b
 add assgin statement and modify defined statement to support declaration (#9)

* modify define statement

* add assgin statement

* optimise assign statement

* modify print

* add assign statement unit test

* not support that the variable was been used in assign statement when it's not defined

* check whether the defined variable is used or not
compiler/ast.go
compiler/checks.go
compiler/compile.go
compiler/compile_test.go
compiler/equitytest/equitytest.go
compiler/parse.go