diff options
author | Robert Griesemer <gri@golang.org> | 2009-11-09 10:37:36 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-11-09 10:37:36 -0800 |
commit | 00b339392b1bc99c91cf7aa550bc07eade52c8ff (patch) | |
tree | 8b660a749a944abf439de9b7fea7b9e398da24be | |
parent | c91a6af23d9aab965ce8f90c5a5fa8e654aba2ca (diff) | |
download | golang-00b339392b1bc99c91cf7aa550bc07eade52c8ff.tar.gz |
- rename Context to exprContext to remove it from public interface
(and to match the style of declContext)
R=rsc
http://go/go-review/1024033
-rw-r--r-- | src/pkg/go/printer/nodes.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/go/printer/nodes.go b/src/pkg/go/printer/nodes.go index f91a34851..b89bb2b0c 100644 --- a/src/pkg/go/printer/nodes.go +++ b/src/pkg/go/printer/nodes.go @@ -311,7 +311,7 @@ func (p *printer) isOneLineFieldList(list []*ast.Field) bool { } -func (p *printer) fieldList(lbrace token.Position, list []*ast.Field, rbrace token.Position, isIncomplete bool, ctxt Context) { +func (p *printer) fieldList(lbrace token.Position, list []*ast.Field, rbrace token.Position, isIncomplete bool, ctxt exprContext) { if !isIncomplete && !p.commentBefore(rbrace) { // possibly a one-line struct/interface if len(list) == 0 { @@ -426,8 +426,8 @@ func (p *printer) fieldList(lbrace token.Position, list []*ast.Field, rbrace tok // ---------------------------------------------------------------------------- // Expressions -// Context describes the syntactic environment in which an expression node is printed. -type Context uint +// exprContext describes the syntactic environment in which an expression node is printed. +type exprContext uint const ( compositeLit = 1<<iota; @@ -534,7 +534,7 @@ func (p *printer) binaryExpr(x *ast.BinaryExpr, prec1 int, multiLine *bool) { // Returns true if a separating semicolon is optional. // Sets multiLine to true if the expression spans multiple lines. -func (p *printer) expr1(expr ast.Expr, prec1 int, ctxt Context, multiLine *bool) (optSemi bool) { +func (p *printer) expr1(expr ast.Expr, prec1 int, ctxt exprContext, multiLine *bool) (optSemi bool) { p.print(expr.Pos()); switch x := expr.(type) { |