Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(75)

Unified Diff: src/pkg/text/template/exec.go

Issue 6482056: code review 6482056: text/template: allow grouping of pipelines using parentheses (Closed)
Patch Set: diff -r 93b44db58f94 https://code.google.com/p/go/ Created 12 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/text/template/doc.go ('k') | src/pkg/text/template/exec_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/text/template/exec.go
===================================================================
--- a/src/pkg/text/template/exec.go
+++ b/src/pkg/text/template/exec.go
@@ -564,6 +564,8 @@
return s.validateType(s.evalFieldNode(dot, arg, []parse.Node{n}, zero), typ)
case *parse.VariableNode:
return s.validateType(s.evalVariableNode(dot, arg, nil, zero), typ)
+ case *parse.PipeNode:
+ return s.validateType(s.evalPipeline(dot, arg), typ)
}
switch typ.Kind() {
case reflect.Bool:
@@ -666,6 +668,8 @@
return reflect.ValueOf(n.Text)
case *parse.VariableNode:
return s.evalVariableNode(dot, n, nil, zero)
+ case *parse.PipeNode:
+ return s.evalPipeline(dot, n)
}
s.errorf("can't handle assignment of %s to empty interface argument", n)
panic("not reached")
« no previous file with comments | « src/pkg/text/template/doc.go ('k') | src/pkg/text/template/exec_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b