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

Issue 5553066: code review 5553066: text/template/parse: use human error prints (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by r
Modified:
13 years, 9 months ago
Reviewers:
CC:
rsc, niemeyer, golang-dev
Visibility:
Public.

Description

text/template/parse: use human error prints The previous version of all the node.String methods printed the parse tree and was useful for developing the parse tree code. Now that that's done, we might as well print the nodes using the standard template syntax. It's much easier to read and makes error reporting look more natural. Helps issue 2644.

Patch Set 1 #

Total comments: 4

Patch Set 2 : diff -r 8e67ea0e19f9 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -61 lines) Patch
M src/pkg/html/template/escape_test.go View 1 2 chunks +13 lines, -13 lines 0 comments Download
M src/pkg/text/template/multi_test.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/text/template/parse/node.go View 1 13 chunks +50 lines, -17 lines 0 comments Download
M src/pkg/text/template/parse/parse_test.go View 1 2 chunks +27 lines, -29 lines 0 comments Download

Messages

Total messages: 5
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
13 years, 9 months ago (2012-01-19 20:33:39 UTC) #1
rsc
LGTM http://codereview.appspot.com/5553066/diff/1/src/pkg/text/template/parse/node.go File src/pkg/text/template/parse/node.go (right): http://codereview.appspot.com/5553066/diff/1/src/pkg/text/template/parse/node.go#newcode450 src/pkg/text/template/parse/node.go:450: return fmt.Sprintf("{{%s %s}} %s {{else}} %s {{end}}", name, ...
13 years, 9 months ago (2012-01-19 20:35:40 UTC) #2
niemeyer
LGTM http://codereview.appspot.com/5553066/diff/1/src/pkg/text/template/parse/node.go File src/pkg/text/template/parse/node.go (right): http://codereview.appspot.com/5553066/diff/1/src/pkg/text/template/parse/node.go#newcode114 src/pkg/text/template/parse/node.go:114: s += " " s/" "/", "/ http://codereview.appspot.com/5553066/diff/1/src/pkg/text/template/parse/node.go#newcode143 ...
13 years, 9 months ago (2012-01-19 20:45:19 UTC) #3
niemeyer
http://codereview.appspot.com/5553066/diff/1/src/pkg/text/template/parse/node.go File src/pkg/text/template/parse/node.go (right): http://codereview.appspot.com/5553066/diff/1/src/pkg/text/template/parse/node.go#newcode143 src/pkg/text/template/parse/node.go:143: return fmt.Sprintf("{{%s}}", a.Pipe) On 2012/01/19 20:45:19, niemeyer wrote: > ...
13 years, 9 months ago (2012-01-19 20:48:16 UTC) #4
r
13 years, 9 months ago (2012-01-19 21:51:41 UTC) #5
*** Submitted as 647acba14a3e ***

text/template/parse: use human error prints
The previous version of all the node.String methods printed the parse
tree and was useful for developing the parse tree code. Now that that's done,
we might as well print the nodes using the standard template syntax.
It's much easier to read and makes error reporting look more natural.

Helps issue 2644.

R=rsc, n13m3y3r
CC=golang-dev
http://codereview.appspot.com/5553066
Sign in to reply to this message.

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