summaryrefslogtreecommitdiff
path: root/src/pkg/exp
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-03-04 17:37:15 -0800
committerRobert Griesemer <gri@golang.org>2010-03-04 17:37:15 -0800
commit7a4de4f0ba2bc1f9acbb5eb0c7a4b2536f447ffd (patch)
treee01e75d7edaa8806e69aea495e5efc95ba3c282c /src/pkg/exp
parent129633b0a8c9a014d0863014057007d410c48e9e (diff)
downloadgolang-7a4de4f0ba2bc1f9acbb5eb0c7a4b2536f447ffd.tar.gz
gofmt: modified algorithm for alignment of multi-line composite/list entries
- only manual changes are in src/pkg/go/printer/nodes.go - use a heuristic to determine "outliers" such that not entire composites are forced to align with them - improves several places that were not unligned before due too simple heuristic - unalignes some cases that contain "outliers" - gofmt -w src misc Fixes issue 644. R=rsc, r CC=golang-dev http://codereview.appspot.com/241041
Diffstat (limited to 'src/pkg/exp')
-rw-r--r--src/pkg/exp/eval/stmt.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/exp/eval/stmt.go b/src/pkg/exp/eval/stmt.go
index 07278edd5..bb080375a 100644
--- a/src/pkg/exp/eval/stmt.go
+++ b/src/pkg/exp/eval/stmt.go
@@ -1251,12 +1251,12 @@ func (a *compiler) compileFunc(b *block, decl *FuncDecl, body *ast.BlockStmt) fu
// Create block context
cb := newCodeBuf()
fc := &funcCompiler{
- compiler: a,
- fnType: decl.Type,
+ compiler: a,
+ fnType: decl.Type,
outVarsNamed: len(decl.OutNames) > 0 && decl.OutNames[0] != nil,
- codeBuf: cb,
- flow: newFlowBuf(cb),
- labels: make(map[string]*label),
+ codeBuf: cb,
+ flow: newFlowBuf(cb),
+ labels: make(map[string]*label),
}
bc := &blockCompiler{
funcCompiler: fc,