Parse "x = i + j + k".

Also run gofmt.
This commit is contained in:
Nigel Tao committed 2017-05-05 15:20:51 +10:00
1 parent 60a4fdb9fd
commit 1770f9064e
2 files changed
+28 -7

No files matched your search

+4 -1
View File
@@ -21,7 +21,7 @@ const (
// - LHS: <nil|KExpr>
// - MHS: <nil|KExpr>
// - RHS: <nil|KExpr|KType>
// - List0: <KExpr> function call arguments
// - List0: <KExpr> function call arguments or associative op arguments
// - FlagsSuspendible is "f(x)" vs "f?(x)"
//
// A zero ID0 means an identifier or literal in ID1, like "foo" or "42".
@@ -32,6 +32,9 @@ const (
// operands. The LHS may be null for the "-" and "+" operators, which are
// also unary operators.
//
// For associative binary operators, both LHS and RHS may be null, and
// multiple operands are in List0.
//
// For function calls, like "LHS(List0)", ID0 is IDOpenParen.
//
// For indexes, like "LHS[RHS]", ID0 is IDOpenBracket.