aboutsummaryrefslogtreecommitdiff
path: root/syntax/syntax.go
diff options
context:
space:
mode:
authoralandonovan <adonovan@google.com>2019-02-25 11:01:09 -0500
committerGitHub <noreply@github.com>2019-02-25 11:01:09 -0500
commit1174b2613e8224c5fe76d0fc8eb8de4a1384a89f (patch)
treeda90c6a149020c09e2f828300675daf29a1e2b30 /syntax/syntax.go
parentd50186b990c7dd820395d85d310236cf480de807 (diff)
downloadstarlark-go-1174b2613e8224c5fe76d0fc8eb8de4a1384a89f.tar.gz
three comment tweaks (#161)
Diffstat (limited to 'syntax/syntax.go')
-rw-r--r--syntax/syntax.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/syntax/syntax.go b/syntax/syntax.go
index 436d6d6..4ed4066 100644
--- a/syntax/syntax.go
+++ b/syntax/syntax.go
@@ -481,8 +481,8 @@ func (x *TupleExpr) Span() (start, end Position) {
// A UnaryExpr represents a unary expression: Op X.
//
-// As a special case it may also represent the star
-// parameter in def f(*args) or def f(*, x).
+// As a special case, UnaryOp{Op:Star} may also represent
+// the star parameter in def f(*args) or def f(*, x).
type UnaryExpr struct {
commentsRef
OpPos Position
@@ -500,6 +500,11 @@ func (x *UnaryExpr) Span() (start, end Position) {
}
// A BinaryExpr represents a binary expression: X Op Y.
+//
+// As a special case, BinaryExpr{Op:EQ} may also
+// represent a named argument in a call f(k=v)
+// or a named parameter in a function declaration
+// def f(param=default).
type BinaryExpr struct {
commentsRef
X Expr