WatcherType type = watcherInfoBase.getType();
if (type == WatcherType.FUNCTION)
{
writeNewline("0" + ASEmitterTokens.COMMA.getToken());
FunctionWatcherInfo functionWatcherInfo = (FunctionWatcherInfo)watcherInfoBase;
writeNewline(ASEmitterTokens.DOUBLE_QUOTE.getToken() + functionWatcherInfo.getFunctionName() +
ASEmitterTokens.DOUBLE_QUOTE.getToken());
IExpressionNode params[] = functionWatcherInfo.params;
StringBuilder sb = new StringBuilder();
sb.append("function() { return [");
boolean firstone = true;
for (IExpressionNode param : params)
{
if (firstone)
firstone = false;
sb.append(ASEmitterTokens.COMMA.getToken());
sb.append(asEmitter.stringifyNode(param));
}
sb.append("]; },");
outputEventNames(functionWatcherInfo.getEventNames());
outputBindings(functionWatcherInfo.getBindings());
}
else if ((type == WatcherType.STATIC_PROPERTY) || (type == WatcherType.PROPERTY))
{
writeNewline((type == WatcherType.STATIC_PROPERTY ? "1" : "2") +
ASEmitterTokens.COMMA.getToken());