当前位置: 首页 > news >正文

安徽建设工程有限公司官网/搜狗seo

安徽建设工程有限公司官网,搜狗seo,做网站的html代码格式,网络网站销售本文整理匯總了Java中org.mozilla.javascript.ast.ScriptNode.getFirstChild方法的典型用法代碼示例。如果您正苦於以下問題:Java ScriptNode.getFirstChild方法的具體用法?Java ScriptNode.getFirstChild怎麽用?Java ScriptNode.getFirstChi…

本文整理匯總了Java中org.mozilla.javascript.ast.ScriptNode.getFirstChild方法的典型用法代碼示例。如果您正苦於以下問題:Java ScriptNode.getFirstChild方法的具體用法?Java ScriptNode.getFirstChild怎麽用?Java ScriptNode.getFirstChild使用的例子?那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.mozilla.javascript.ast.ScriptNode的用法示例。

在下文中一共展示了ScriptNode.getFirstChild方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。

示例1: CompiledExprFromTree

​點讚 2

import org.mozilla.javascript.ast.ScriptNode; //導入方法依賴的package包/類

/**

* compile the expression from a script tree

*

* @param expression

* @param context

* @param tree

* @param columnExprList

* @throws BirtException

*/

private void CompiledExprFromTree( String expression, Context context,

ScriptNode tree, List columnExprList ) throws BirtException

{

if ( tree.getFirstChild( ) == tree.getLastChild( ) )

{

if ( tree.getFirstChild( ).getType( ) == Token.FUNCTION )

{

int index = getFunctionIndex( tree.getFirstChild( ).getString( ),

tree );

compileFunctionNode( tree.getFunctionNode( index ),

tree,

columnExprList );

}

else

{

// A single expression

if ( tree.getFirstChild( ).getType( ) != Token.EXPR_RESULT

&& tree.getFirstChild( ).getType( ) != Token.EXPR_VOID

&& tree.getFirstChild( ).getType( ) != Token.BLOCK

&& tree.getFirstChild( ).getType( ) != Token.SCRIPT)

{

// This should never happen?

throw new CoreException( pluginId,

ResourceConstants.INVALID_EXPRESSION );

}

Node exprNode = tree.getFirstChild( );

processChild( exprNode, tree, columnExprList );

}

}

else

{

compileComplexExpr( tree, tree, columnExprList );

}

}

開發者ID:eclipse,項目名稱:birt,代碼行數:44,

示例2: processScriptTree

​點讚 2

import org.mozilla.javascript.ast.ScriptNode; //導入方法依賴的package包/類

/**

* process the script tree to produce a CompiledExpression

*

* @param expression

* @param tree

* @param context

* @return @throws

* DataException

*/

private CompiledExpression processScriptTree( String expression,

ScriptNode tree, Context context ) throws DataException

{

CompiledExpression expr;

if ( tree.getFirstChild( ) == tree.getLastChild( ) )

{

if( tree.getFirstChild( ) == null )

throw new DataException( "Expression parse error: first child is null. The expression is " + expression,

expression );

// A single expression

if ( tree.getFirstChild( ).getType( ) != Token.EXPR_RESULT

&& tree.getFirstChild( ).getType( ) != Token.EXPR_VOID

&& tree.getFirstChild( ).getType( ) != Token.BLOCK )

{

// This should never happen?

throw new DataException( ResourceConstants.INVALID_JS_EXPR,

expression );

}

Node child, parent = tree;

Node exprNode = parent.getFirstChild( );

child = exprNode.getFirstChild( );

if ( child.getNext( ) != null )

child = exprNode;

else

{

parent = exprNode;

}

assert ( child != null && parent != null );

expr = processChild( context, false, parent, child, tree );

}

else

{

// complex expressions

// Multiple expressions exist; we should produce complex expressions

// However, individual subexpressions still needs to be processed

// to identify the interesting subexpressions

expr = compileComplexExpr( context, tree, false );

}

if ( expr instanceof BytecodeExpression )

compileForBytecodeExpr( context, tree, expr );

return expr;

}

開發者ID:eclipse,項目名稱:birt,代碼行數:53,

示例3: isColumnExpression

​點讚 2

import org.mozilla.javascript.ast.ScriptNode; //導入方法依賴的package包/類

/**

* whether the expression is column reference

* @param expression

* @return

*/

public static boolean isColumnExpression( String expression, boolean mode )

{

boolean isColumn = false;

if ( expression == null || expression.trim( ).length( ) == 0 )

return isColumn;

if ( getCompiledExpCacheMap( mode ).containsKey( expression ) )

{

return ( (Boolean) getCompiledExpCacheMap( mode ).get( expression ) ).booleanValue( );

}

Context context = Context.enter( );

ScriptNode tree;

try

{

CompilerEnvirons m_compilerEnv = new CompilerEnvirons( );

m_compilerEnv.initFromContext( context );

Parser p = new Parser( m_compilerEnv, context.getErrorReporter( ) );

AstRoot root = p.parse( expression, null, 0 );

IRFactory ir = new IRFactory( m_compilerEnv );

tree = ir.transformTree( root );

}

catch ( Exception e )

{

getCompiledExpCacheMap( mode ).put( expression,

Boolean.valueOf( false ) );

return false;

}

finally

{

Context.exit( );

}

if ( tree.getFirstChild( ) == tree.getLastChild( ) )

{

// A single expression

if ( tree.getFirstChild( ).getType( ) != Token.EXPR_RESULT

&& tree.getFirstChild( ).getType( ) != Token.EXPR_VOID

&& tree.getFirstChild( ).getType( ) != Token.BLOCK )

{

isColumn = false;

}

Node exprNode = tree.getFirstChild( );

Node child = exprNode.getFirstChild( );

assert ( child != null );

if ( child.getType( ) == Token.GETELEM

|| child.getType( ) == Token.GETPROP )

isColumn = getDirectColRefExpr( child, mode );

else

isColumn = false;

}

else

{

isColumn = false;

}

getCompiledExpCacheMap( mode ).put( expression,

Boolean.valueOf( isColumn ) );

return isColumn;

}

開發者ID:eclipse,項目名稱:birt,代碼行數:63,

示例4: isColumnExpression

​點讚 2

import org.mozilla.javascript.ast.ScriptNode; //導入方法依賴的package包/類

/**

* whether the expression is column reference

*

* @param expression

* @return

*/

public static boolean isColumnExpression( String expression )

{

boolean isColumn = false;

if ( expression == null || expression.trim( ).length( ) == 0 )

return isColumn;

if ( compiledExprCache.containsKey( expression ) )

return ( (Boolean) compiledExprCache.get( expression ) ).booleanValue( );

Context context = Context.enter( );

ScriptNode tree;

try

{

CompilerEnvirons m_compilerEnv = new CompilerEnvirons( );

m_compilerEnv.initFromContext( context );

Parser p = new Parser( m_compilerEnv, context.getErrorReporter( ) );

AstRoot root = p.parse( expression, null, 0 );

IRFactory ir = new IRFactory( m_compilerEnv );

tree = ir.transformTree( root );

}

catch ( Exception e )

{

compiledExprCache.put( expression, Boolean.valueOf( false ) );

return false;

}

finally

{

Context.exit( );

}

if ( tree.getFirstChild( ) == tree.getLastChild( ) )

{

// A single expression

if ( tree.getFirstChild( ).getType( ) != Token.EXPR_RESULT

&& tree.getFirstChild( ).getType( ) != Token.EXPR_VOID

&& tree.getFirstChild( ).getType( ) != Token.BLOCK )

{

isColumn = false;

}

Node exprNode = tree.getFirstChild( );

Node child = exprNode.getFirstChild( );

assert ( child != null );

if ( child.getType( ) == Token.GETELEM

|| child.getType( ) == Token.GETPROP )

isColumn = getDirectColRefExpr( child );

else

isColumn = false;

}

else

{

isColumn = false;

}

compiledExprCache.put( expression, Boolean.valueOf( isColumn ) );

return isColumn;

}

開發者ID:eclipse,項目名稱:birt,代碼行數:61,

注:本文中的org.mozilla.javascript.ast.ScriptNode.getFirstChild方法示例整理自Github/MSDocs等源碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。

http://www.lbrq.cn/news/1612135.html

相关文章:

  • 网站建设后续的费用/数据分析一般用什么软件
  • 国外b站浏览器免费版/新乡搜索引擎优化
  • wordpress seo神器/soe搜索优化
  • 用asp做网站怎么美观/模板建站代理
  • 开发公司网站建设/免费收录链接网
  • 网站建设公司推荐/专注网站建设服务机构
  • 织梦网站建设交流群/怎么制作个人网站
  • 《动态网站建设》第02章在线测试/旺道seo推广有用吗
  • 佛山网页设计师培训/辽阳网站seo
  • Org.cn 域名的网站/丈哥seo博客工具
  • ui设计和网站开发/怎样写营销策划方案
  • 网站建设作为/深圳有实力的seo公司
  • 网站优化建设河南/关键词竞价排名
  • 360官网首页入口/宁波seo入门教程
  • 有做装修效果图赚钱的网站吗/网络营销课程个人总结
  • 食品网站首页模板欣赏/长沙seo排名外包
  • 北京平台网站建设价格/百度联盟点击广告赚钱
  • 西安高新区网站制作/品牌运营岗位职责
  • 装饰网站的业务员都是怎么做的/广东seo推广
  • 日本域名 wordpress主机 价格/shopify seo
  • 学做网站用到哪些知识/网络推广公司排名
  • 怎么更改网站域名/厦门人才网个人登录
  • 20条优化防疫措施方案/seo外链增加
  • 佛山附近做网站的公司有哪些/seo分析师招聘
  • 美食网站制作代码/公司网站如何seo
  • 网站开发设计报告/免费seo营销软件
  • 网站修改dns/seo搜索引擎优化步骤
  • 中小企业网站制作软件/长沙seo网站管理
  • 梧州网站建设公司/百度云盘官网登录入口
  • 电动车网站建设/建站官网
  • opencv学习(单模块匹配)
  • PyTorch 中 Tensor 统计学函数及相关概念
  • 从零到英雄:掌握神经网络的完整指南
  • ctfshow_web签到题
  • C#常见的转义字符
  • Canny边缘检测算法-个人记录