blob: c08197caecfecadb42e9497b94faae3be0078838 [file] [log] [blame]
alandonovan2c1f3622018-12-17 13:10:16 -05001package starlark
2
3// This file defines an experimental API for the debugging tools.
4// Some of these declarations expose details of internal packages.
5// (The debugger makes liberal use of exported fields of unexported types.)
6// Breaking changes may occur without notice.
7
8// Local returns the value of the i'th local variable.
9// It may be nil if not yet assigned.
10//
11// Local may be called only for frames whose Callable is a *Function (a
12// function defined by Starlark source code), and only while the frame
13// is active; it will panic otherwise.
14//
15// This function is provided only for debugging tools.
16//
17// THIS API IS EXPERIMENTAL AND MAY CHANGE WITHOUT NOTICE.
18func (fr *Frame) Local(i int) Value { return fr.locals[i] }