diff options
| author | Austin Clements <aclements@csail.mit.edu> | 2009-07-20 17:41:40 -0700 |
|---|---|---|
| committer | Austin Clements <aclements@csail.mit.edu> | 2009-07-20 17:41:40 -0700 |
| commit | 97372a16273a7236466b2f09dc2a7112fb78e3db (patch) | |
| tree | 139c63f8c334e89d77b4da65cd6aee2ff27ca0ab /usr/austin/eval/decls.go | |
| parent | 5a3adba2edfc2468c660d79c71477a02030d50d5 (diff) | |
| download | golang-97372a16273a7236466b2f09dc2a7112fb78e3db.tar.gz | |
Implement array types and index expressions.
Some cleanup. Elem() on PtrType is now just Elem and matches
with ArrayType. Generators now switch over the result type
instead of the operand type. Delete unused diag function.
R=rsc
APPROVED=rsc
DELTA=281 (219 added, 18 deleted, 44 changed)
OCL=31876
CL=31891
Diffstat (limited to 'usr/austin/eval/decls.go')
| -rw-r--r-- | usr/austin/eval/decls.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/austin/eval/decls.go b/usr/austin/eval/decls.go index 87d700538..f5b667970 100644 --- a/usr/austin/eval/decls.go +++ b/usr/austin/eval/decls.go @@ -90,6 +90,15 @@ type StringValue interface { Set(string); } +type ArrayValue interface { + Value; + // TODO(austin) Get() is here for uniformity, but is + // completely useless. If a lot of other types have similarly + // useless Get methods, just special-case these uses. + Get() ArrayValue; + Elem(i int64) Value; +} + type PtrValue interface { Value; Get() Value; |
