From f8f20fdb02525ac5bbaf129cfe29b987c563ef9f Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Tue, 22 Jan 2019 11:26:45 +0800 Subject: 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. --- core/vm/sqlvm/cmd/ast-printer/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/vm/sqlvm/cmd') 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, "") } } -- cgit v1.2.3