function getCompletions(token, context) {
var found = [], start = token.string;
if (str.indexOf(start) == 0) found.push(str);
function gatherCompletions(obj) {
if (typeof obj == "string") forEach(stringProps, maybeAdd);
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
for (var name in obj) maybeAdd(name);
var obj = context.pop(), base;
if (obj.className == "js-variable")
base = window[obj.string];
else if (obj.className == "js-string")
else if (obj.className == "js-atom")
while (base != null && context.length)
base = base[context.pop().string];
if (base != null) gatherCompletions(base);
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
gatherCompletions(window);
forEach(keywords, maybeAdd);