diff options
author | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-01-22 11:26:45 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:03 +0800 |
commit | d25ee5f726545b165dba6a45def0e55027b6941b (patch) | |
tree | 4464f182aba472a2e42be742dd73653a9a4485f2 /core/vm/sqlvm/cmd | |
parent | 4d01db0522f7405981a1f18f4ee79a6d1aac067b (diff) | |
download | dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar.gz dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar.bz2 dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar.lz dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar.xz dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar.zst dexon-d25ee5f726545b165dba6a45def0e55027b6941b.zip |
core: vm: sqlvm: move AST and parser to their own packages
In order to avoid putting too many different things in single package
and allow other projects to reuse the syntax tree and the parser, these
two components are moved to different packages and all nodes used in AST
are now exported. A lot of comments are added in this commit to pass
golint checks.
Diffstat (limited to 'core/vm/sqlvm/cmd')
-rw-r--r-- | core/vm/sqlvm/cmd/ast-printer/main.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/vm/sqlvm/cmd/ast-printer/main.go b/core/vm/sqlvm/cmd/ast-printer/main.go index ad10a54ce..4911273c5 100644 --- a/core/vm/sqlvm/cmd/ast-printer/main.go +++ b/core/vm/sqlvm/cmd/ast-printer/main.go @@ -4,13 +4,14 @@ import ( "fmt" "os" - "github.com/dexon-foundation/dexon/core/vm/sqlvm" + "github.com/dexon-foundation/dexon/core/vm/sqlvm/ast" + "github.com/dexon-foundation/dexon/core/vm/sqlvm/parser" ) func main() { - n, err := sqlvm.ParseString(os.Args[1]) + n, err := parser.ParseString(os.Args[1]) fmt.Printf("err: %+v\n", err) if err == nil { - sqlvm.PrintAST(n, "") + ast.PrintAST(n, "") } } |