aboutsummaryrefslogtreecommitdiff
path: root/syntax/walk.go
diff options
context:
space:
mode:
authorLaurent Le Brun <laurentlb@gmail.com>2018-02-26 15:01:53 +0100
committeralandonovan <adonovan@google.com>2018-02-26 09:01:53 -0500
commit28ceca7fdc8d88c4b6a4a64453b2251e00f73f56 (patch)
tree3706e5e34d8cb7fc9426166d626ed9b185172496 /syntax/walk.go
parent689fc22ccbdf8623bfa12ec5bcaf3484861f9bd5 (diff)
downloadstarlark-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.go3
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)