本文整理了Java中org.mozilla.javascript.Parser.matchToken()
方法的一些代码示例,展示了Parser.matchToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.matchToken()
方法的具体详情如下:
包路径:org.mozilla.javascript.Parser
类名称:Parser
方法名:matchToken
暂无
代码示例来源:origin: rhino/js
private void mustMatchToken(int toMatch, String messageId)
throws IOException, ParserException
{
if (!matchToken(toMatch)) {
reportError(messageId);
}
}
代码示例来源:origin: geogebra/geogebra
private boolean mustMatchToken(int toMatch, String msgId, int pos, int len)
throws IOException
{
if (matchToken(toMatch)) {
return true;
}
reportError(msgId, pos, len);
return false;
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
private void mustMatchToken(int toMatch, String messageId)
throws IOException, ParserException
{
if (!matchToken(toMatch)) {
reportError(messageId);
}
}
代码示例来源:origin: ro.isdc.wro4j/rhino
private boolean mustMatchToken(int toMatch, String msgId, int pos, int len)
throws IOException
{
if (matchToken(toMatch)) {
return true;
}
reportError(msgId, pos, len);
return false;
}
代码示例来源:origin: geogebra/geogebra
private AstNode bitXorExpr()
throws IOException
{
AstNode pn = bitAndExpr();
while (matchToken(Token.BITXOR)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.BITXOR, pn, bitAndExpr(), opPos);
}
return pn;
}
代码示例来源:origin: geogebra/geogebra
private AstNode bitAndExpr()
throws IOException
{
AstNode pn = eqExpr();
while (matchToken(Token.BITAND)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.BITAND, pn, eqExpr(), opPos);
}
return pn;
}
代码示例来源:origin: io.apigee/rhino
private AstNode orExpr()
throws IOException
{
AstNode pn = andExpr();
if (matchToken(Token.OR)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.OR, pn, orExpr(), opPos);
}
return pn;
}
代码示例来源:origin: io.apigee/rhino
private AstNode bitOrExpr()
throws IOException
{
AstNode pn = bitXorExpr();
while (matchToken(Token.BITOR)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.BITOR, pn, bitXorExpr(), opPos);
}
return pn;
}
代码示例来源:origin: com.github.tntim96/rhino
private AstNode bitAndExpr()
throws IOException
{
AstNode pn = eqExpr();
while (matchToken(Token.BITAND)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.BITAND, pn, eqExpr(), opPos);
}
return pn;
}
代码示例来源:origin: geogebra/geogebra
private AstNode andExpr()
throws IOException
{
AstNode pn = bitOrExpr();
if (matchToken(Token.AND)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.AND, pn, andExpr(), opPos);
}
return pn;
}
代码示例来源:origin: geogebra/geogebra
private AstNode orExpr()
throws IOException
{
AstNode pn = andExpr();
if (matchToken(Token.OR)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.OR, pn, orExpr(), opPos);
}
return pn;
}
代码示例来源:origin: com.github.tntim96/rhino
private AstNode orExpr()
throws IOException
{
AstNode pn = andExpr();
if (matchToken(Token.OR)) {
int opPos = ts.tokenBeg;
pn = new InfixExpression(Token.OR, pn, orExpr(), opPos);
}
return pn;
}
代码示例来源:origin: rhino/js
private Node bitXorExpr(boolean inForInit)
throws IOException, ParserException
{
Node pn = bitAndExpr(inForInit);
while (matchToken(Token.BITXOR)) {
decompiler.addToken(Token.BITXOR);
pn = nf.createBinary(Token.BITXOR, pn, bitAndExpr(inForInit));
}
return pn;
}
代码示例来源:origin: rhino/js
private Node bitOrExpr(boolean inForInit)
throws IOException, ParserException
{
Node pn = bitXorExpr(inForInit);
while (matchToken(Token.BITOR)) {
decompiler.addToken(Token.BITOR);
pn = nf.createBinary(Token.BITOR, pn, bitXorExpr(inForInit));
}
return pn;
}
代码示例来源:origin: rhino/js
private Node bitAndExpr(boolean inForInit)
throws IOException, ParserException
{
Node pn = eqExpr(inForInit);
while (matchToken(Token.BITAND)) {
decompiler.addToken(Token.BITAND);
pn = nf.createBinary(Token.BITAND, pn, eqExpr(inForInit));
}
return pn;
}
代码示例来源:origin: rhino/js
private Node orExpr(boolean inForInit)
throws IOException, ParserException
{
Node pn = andExpr(inForInit);
if (matchToken(Token.OR)) {
decompiler.addToken(Token.OR);
pn = nf.createBinary(Token.OR, pn, orExpr(inForInit));
}
return pn;
}
代码示例来源:origin: rhino/js
private Node andExpr(boolean inForInit)
throws IOException, ParserException
{
Node pn = bitOrExpr(inForInit);
if (matchToken(Token.AND)) {
decompiler.addToken(Token.AND);
pn = nf.createBinary(Token.AND, pn, andExpr(inForInit));
}
return pn;
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
private Node bitOrExpr(boolean inForInit)
throws IOException, ParserException
{
Node pn = bitXorExpr(inForInit);
while (matchToken(Token.BITOR)) {
decompiler.addToken(Token.BITOR);
pn = nf.createBinary(Token.BITOR, pn, bitXorExpr(inForInit));
}
return pn;
}
代码示例来源:origin: com.yahoo/yuicompressor
private Node andExpr(boolean inForInit)
throws IOException, ParserException
{
Node pn = bitOrExpr(inForInit);
if (matchToken(Token.AND)) {
decompiler.addToken(Token.AND);
pn = nf.createBinary(Token.AND, pn, andExpr(inForInit));
}
return pn;
}
代码示例来源:origin: com.yahoo/yuicompressor
private Node expr(boolean inForInit)
throws IOException, ParserException
{
Node pn = assignExpr(inForInit);
while (matchToken(Token.COMMA)) {
decompiler.addToken(Token.COMMA);
if (compilerEnv.isStrictMode() && !pn.hasSideEffects())
addStrictWarning("msg.no.side.effects", "");
pn = nf.createBinary(Token.COMMA, pn, assignExpr(inForInit));
}
return pn;
}
内容来源于网络,如有侵权,请联系作者删除!