jmparseparamsparse.java
来自「类javaScript脚本解释器」· Java 代码 · 共 59 行
JAVA
59 行
package MultiScriptParse.Parse;
import java.util.ArrayList;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class JMParseParamsParse extends JMObject {
private JMExprParse ExprParse = null;
private JMPropParse PropParse = null;
private JMFunctionParse FunctionParse = null;
public JMParseParamsParse() {
}
public JMParseParamsParse(JMExprParse ep, JMPropParse pp, JMFunctionParse fp){
ExprParse = ep;
PropParse = pp;
FunctionParse = fp;
}
public ArrayList ParseParams(char[] toParse) throws JMParseException
{
ArrayList result = new ArrayList(0);
char ckey = toParse[++JMParse.CurrPos];
while (ckey != 0) {
if (ckey == ')') {
result.trimToSize();
ckey = toParse[JMParse.CurrPos++];
return result;
}
if (ckey == ',') {
ckey = toParse[JMParse.CurrPos++];
continue;
}
result.add(ExprParse.ParseExpr(toParse));
ckey = toParse[JMParse.CurrPos];
} //while (ckey != 0)
return null;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?