Description

The Lookup instruction yields element Index of collection X, a map or string. Index is an integer expression if X is a string or the appropriate key type if X is a map.

If CommaOk, the result is a 2-tuple of the value above and a boolean indicating the result of a map membership test for the key. The components of the tuple are accessed using Extract.

Pos() returns the ast.IndexExpr.Lbrack, if explicit in the source.

Example printed form:

t2 = t0[t1]
t5 = t3[t4],ok