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

Issue 10748044: code review 10748044: go.tools/go/types: implement Eval and EvalNode (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by gri
Modified:
11 years, 4 months ago
Reviewers:
adonovan
CC:
adonovan, golang-dev
Visibility:
Public.

Description

go.tools/go/types: implement New, Eval and EvalNode Eval and EvalNode permit the evaluation of an expression or type literal string (or AST node in case of EvalNode) within a given context (package and scope). Also: - track nested (children) scopes for all scopes - provide a mechanism to iterate over nested scopes - permit recursive printing of scopes TODO: more tests

Patch Set 1 #

Patch Set 2 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 3 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 4 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 5 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 6 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 7 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 8 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 9 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 10 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 11 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 12 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 13 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Total comments: 13

Patch Set 14 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 15 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Patch Set 16 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Total comments: 4

Patch Set 17 : diff -r 83e9583da735 https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -47 lines) Patch
M go/types/api.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M go/types/check.go View 1 3 chunks +29 lines, -26 lines 0 comments Download
A go/types/eval.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +118 lines, -0 lines 0 comments Download
A go/types/eval_test.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +60 lines, -0 lines 0 comments Download
M go/types/scope.go View 1 2 3 3 chunks +58 lines, -17 lines 0 comments Download
M go/types/types_test.go View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7
gri
Hello adonovan@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
11 years, 4 months ago (2013-07-12 01:13:23 UTC) #1
gri
Hello adonovan@google.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2013-07-12 04:04:08 UTC) #2
adonovan
https://codereview.appspot.com/10748044/diff/30001/go/types/eval.go File go/types/eval.go (right): https://codereview.appspot.com/10748044/diff/30001/go/types/eval.go#newcode23 go/types/eval.go:23: // New is a convenience function to create a ...
11 years, 4 months ago (2013-07-12 14:28:58 UTC) #3
gri
PTAL - moved str to first position in argument list - fixed fset computation (missing ...
11 years, 4 months ago (2013-07-12 16:38:59 UTC) #4
adonovan
LGTM https://codereview.appspot.com/10748044/diff/44001/go/types/eval.go File go/types/eval.go (right): https://codereview.appspot.com/10748044/diff/44001/go/types/eval.go#newcode22 go/types/eval.go:22: // and fields in types in Universe scope. ...
11 years, 4 months ago (2013-07-12 17:58:33 UTC) #5
gri
https://codereview.appspot.com/10748044/diff/44001/go/types/eval.go File go/types/eval.go (right): https://codereview.appspot.com/10748044/diff/44001/go/types/eval.go#newcode22 go/types/eval.go:22: // and fields in types in Universe scope. On ...
11 years, 4 months ago (2013-07-12 18:03:02 UTC) #6
gri
11 years, 4 months ago (2013-07-12 18:03:38 UTC) #7
*** Submitted as
https://code.google.com/p/go/source/detail?r=70059fa0a39e&repo=tools ***

go.tools/go/types: implement New, Eval and EvalNode

Eval and EvalNode permit the evaluation of an expression
or type literal string (or AST node in case of EvalNode)
within a given context (package and scope).

Also:
- track nested (children) scopes for all scopes
- provide a mechanism to iterate over nested scopes
- permit recursive printing of scopes

TODO: more tests

R=adonovan
CC=golang-dev
https://codereview.appspot.com/10748044
Sign in to reply to this message.

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