diff options
author | Laurent Le Brun <laurentlb@gmail.com> | 2018-02-26 15:01:53 +0100 |
---|---|---|
committer | alandonovan <adonovan@google.com> | 2018-02-26 09:01:53 -0500 |
commit | 28ceca7fdc8d88c4b6a4a64453b2251e00f73f56 (patch) | |
tree | 3706e5e34d8cb7fc9426166d626ed9b185172496 /syntax/walk.go | |
parent | 689fc22ccbdf8623bfa12ec5bcaf3484861f9bd5 (diff) | |
download | starlark-go-28ceca7fdc8d88c4b6a4a64453b2251e00f73f56.tar.gz |
Add new node ParenExpr (#65)
This is a no-op for the interpreter, but it adds more information to the
AST.
Diffstat (limited to 'syntax/walk.go')
-rw-r--r-- | syntax/walk.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/syntax/walk.go b/syntax/walk.go index aeda473..8f20509 100644 --- a/syntax/walk.go +++ b/syntax/walk.go @@ -68,6 +68,9 @@ func Walk(n Node, f func(Node) bool) { Walk(x, f) } + case *ParenExpr: + Walk(n.X, f) + case *CondExpr: Walk(n.Cond, f) Walk(n.True, f) |