n = function(FunctionNode.FUNCTION_STATEMENT); break; default:
n = function(FunctionNode.FUNCTION_STATEMENT); break; default:
n = function(FunctionNode.FUNCTION_STATEMENT); break; default:
private boolean getterSetterProperty(ObjArray elems, Object property, boolean isGetter) throws IOException { Node f = function(FunctionNode.FUNCTION_EXPRESSION); if (f.getType() != Token.FUNCTION) { reportError("msg.bad.prop"); return false; } int fnIndex = f.getExistingIntProp(Node.FUNCTION_PROP); FunctionNode fn = currentScriptOrFn.getFunctionNode(fnIndex); if (fn.getFunctionName().length() != 0) { reportError("msg.bad.prop"); return false; } elems.add(property); if (isGetter) { elems.add(nf.createUnary(Token.GET, f)); } else { elems.add(nf.createUnary(Token.SET, f)); } return true; } }
private boolean getterSetterProperty(ObjArray elems, Object property, boolean isGetter) throws IOException { Node f = function(FunctionNode.FUNCTION_EXPRESSION); if (f.getType() != Token.FUNCTION) { reportError("msg.bad.prop"); return false; } int fnIndex = f.getExistingIntProp(Node.FUNCTION_PROP); FunctionNode fn = currentScriptOrFn.getFunctionNode(fnIndex); if (fn.getFunctionName().length() != 0) { reportError("msg.bad.prop"); return false; } elems.add(property); if (isGetter) { elems.add(nf.createUnary(Token.GET, f)); } else { elems.add(nf.createUnary(Token.SET, f)); } return true; } }
private boolean getterSetterProperty(ObjArray elems, Object property, boolean isGetter) throws IOException { Node f = function(FunctionNode.FUNCTION_EXPRESSION); if (f.getType() != Token.FUNCTION) { reportError("msg.bad.prop"); return false; } int fnIndex = f.getExistingIntProp(Node.FUNCTION_PROP); FunctionNode fn = currentScriptOrFn.getFunctionNode(fnIndex); if (fn.getFunctionName().length() != 0) { reportError("msg.bad.prop"); return false; } elems.add(property); if (isGetter) { elems.add(nf.createUnary(Token.GET, f)); } else { elems.add(nf.createUnary(Token.SET, f)); } return true; } }
private ObjectProperty getterSetterProperty(int pos, AstNode propName, boolean isGetter) throws IOException { FunctionNode fn = function(FunctionNode.FUNCTION_EXPRESSION); // We've already parsed the function name, so fn should be anonymous. Name name = fn.getFunctionName(); if (name != null && name.length() != 0) { reportError("msg.bad.prop"); } ObjectProperty pn = new ObjectProperty(pos); if (isGetter) { pn.setIsGetter(); } else { pn.setIsSetter(); } int end = getNodeEnd(fn); pn.setLeft(propName); pn.setRight(fn); pn.setLength(end - pos); return pn; }
consumeToken(); try { n = function(calledByCompileFunction ? FunctionNode.FUNCTION_EXPRESSION : FunctionNode.FUNCTION_STATEMENT);
consumeToken(); try { n = function(calledByCompileFunction ? FunctionNode.FUNCTION_EXPRESSION : FunctionNode.FUNCTION_STATEMENT);
private ObjectProperty getterSetterProperty(int pos, AstNode propName, boolean isGetter) throws IOException { FunctionNode fn = function(FunctionNode.FUNCTION_EXPRESSION); // We've already parsed the function name, so fn should be anonymous. Name name = fn.getFunctionName(); if (name != null && name.length() != 0) { reportError("msg.bad.prop"); } ObjectProperty pn = new ObjectProperty(pos); if (isGetter) { pn.setIsGetter(); } else { pn.setIsSetter(); } int end = getNodeEnd(fn); pn.setLeft(propName); pn.setRight(fn); pn.setLength(end - pos); return pn; }
private ObjectProperty getterSetterProperty(int pos, AstNode propName, boolean isGetter) throws IOException { FunctionNode fn = function(FunctionNode.FUNCTION_EXPRESSION); // We've already parsed the function name, so fn should be anonymous. Name name = fn.getFunctionName(); if (name != null && name.length() != 0) { reportError("msg.bad.prop"); } ObjectProperty pn = new ObjectProperty(pos); if (isGetter) { pn.setIsGetter(); fn.setFunctionIsGetter(); } else { pn.setIsSetter(); fn.setFunctionIsSetter(); } int end = getNodeEnd(fn); pn.setLeft(propName); pn.setRight(fn); pn.setLength(end - pos); return pn; }
private ObjectProperty methodDefinition(int pos, AstNode propName, int entryKind) throws IOException { FunctionNode fn = function(FunctionNode.FUNCTION_EXPRESSION); // We've already parsed the function name, so fn should be anonymous. Name name = fn.getFunctionName(); if (name != null && name.length() != 0) { reportError("msg.bad.prop"); } ObjectProperty pn = new ObjectProperty(pos); switch (entryKind) { case GET_ENTRY: pn.setIsGetterMethod(); fn.setFunctionIsGetterMethod(); break; case SET_ENTRY: pn.setIsSetterMethod(); fn.setFunctionIsSetterMethod(); break; case METHOD_ENTRY: pn.setIsNormalMethod(); fn.setFunctionIsNormalMethod(); break; } int end = getNodeEnd(fn); pn.setLeft(propName); pn.setRight(fn); pn.setLength(end - pos); return pn; }
n = function(FunctionNode.FUNCTION_STATEMENT); break; default:
n = function(FunctionNode.FUNCTION_STATEMENT); break; default:
consumeToken(); try { n = function(calledByCompileFunction ? FunctionNode.FUNCTION_EXPRESSION : FunctionNode.FUNCTION_STATEMENT);
consumeToken(); try { n = function(calledByCompileFunction ? FunctionNode.FUNCTION_EXPRESSION : FunctionNode.FUNCTION_STATEMENT);
consumeToken(); try { n = function(calledByCompileFunction ? FunctionNode.FUNCTION_EXPRESSION : FunctionNode.FUNCTION_STATEMENT);
return function(FunctionNode.FUNCTION_EXPRESSION);
return function(FunctionNode.FUNCTION_EXPRESSION);
return function(FunctionNode.FUNCTION_EXPRESSION);