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

Issue 5492072: code review 5492072: go/ast, parser: remember short variable decls. w/ corre... (Closed)

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

Description

go/ast, parser: remember short variable decls. w/ correspoding ident objects The ast.Object's Decl field pointed back to the corresponding declaration for all but short variable declarations. Now remember corresponding assignment statement in the Decl field. Also: simplified some code for parsing select statements.

Patch Set 1 #

Patch Set 2 : diff -r 561eb3ec7eb5 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 561eb3ec7eb5 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 561eb3ec7eb5 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 30cb39ed6081 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 67b329eb1ecb https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -33 lines) Patch
M src/pkg/go/ast/scope.go View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M src/pkg/go/parser/parser.go View 1 2 3 4 4 chunks +30 lines, -32 lines 0 comments Download

Messages

Total messages: 5
gri
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 7 months ago (2011-12-19 22:02:02 UTC) #1
r
LGTM
13 years, 7 months ago (2011-12-20 16:40:12 UTC) #2
bradfitz
I don't claim to understand this code, but sure looks tricky for no new tests. ...
13 years, 7 months ago (2011-12-20 16:49:11 UTC) #3
gri
Yes, agreed. The effect of it can be seen when running gotype -ast <some program>, ...
13 years, 7 months ago (2011-12-20 16:54:40 UTC) #4
gri
13 years, 7 months ago (2011-12-20 17:59:14 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=94fea4e3fa40 ***

go/ast, parser: remember short variable decls. w/ correspoding ident objects

The ast.Object's Decl field pointed back to the corresponding declaration for
all but short variable declarations. Now remember corresponding assignment
statement in the Decl field.

Also: simplified some code for parsing select statements.

R=golang-dev, r, bradfitz
CC=golang-dev
http://codereview.appspot.com/5492072
Sign in to reply to this message.

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