mirror of
				https://gitee.com/BDWare/common
				synced 2025-10-31 21:02:17 +00:00 
			
		
		
		
	optimize dependent function parse
support merge importNodes
This commit is contained in:
		
							parent
							
								
									374451dd5b
								
							
						
					
					
						commit
						6d5f005f6e
					
				| @ -51,7 +51,7 @@ dependencies { | ||||
|     //api 'org.apache.velocity:velocity-engine-core:2.3' | ||||
|     api 'org.rocksdb:rocksdbjni:7.3.1' | ||||
|     testImplementation 'junit:junit:4.13.2' | ||||
|     implementation 'org.bdware.doip:doip-sdk:1.4.6' | ||||
|     implementation 'org.bdware.doip:doip-sdk:1.4.9' | ||||
| } | ||||
| group = "org.bdware.sc" | ||||
| 
 | ||||
|  | ||||
| @ -23,17 +23,17 @@ public class FunctionDependencyVisitor extends YJSParserBaseVisitor<FunctionNode | ||||
|     @Override | ||||
|     public FunctionNode visitArgumentsExpression(YJSParser.ArgumentsExpressionContext ctx) { | ||||
|         super.visitArgumentsExpression(ctx); | ||||
|         String funText  = ctx.singleExpression().getText(); | ||||
|         if (funText.endsWith(APPLY)) funText = funText.replaceAll(APPLY+"$",""); | ||||
|         if (funText.endsWith(CALL)) funText = funText.replaceAll(CALL+"$",""); | ||||
|         if (cn.getFunction(funText)!=null) | ||||
|         String funText = ctx.singleExpression().getText(); | ||||
|         if (funText.endsWith(APPLY)) funText = funText.replaceAll(APPLY + "$", ""); | ||||
|         if (funText.endsWith(CALL)) funText = funText.replaceAll(CALL + "$", ""); | ||||
|         if (cn.getFunction(funText) != null) | ||||
|             fn.addDependentFunctions(funText); | ||||
|         if (ctx.arguments() != null) { | ||||
|             List<YJSParser.SingleExpressionContext> singleExpress = ctx.arguments().singleExpression(); | ||||
|             if (singleExpress != null && singleExpress.size() > 0) { | ||||
|                 for (YJSParser.SingleExpressionContext sin : singleExpress) { | ||||
|                     funText = sin.getText(); | ||||
|                     if (cn.getFunction(funText)!=null) | ||||
|                     if (cn.getFunction(funText) != null) | ||||
|                         fn.addDependentFunctions(funText); | ||||
|                 } | ||||
|             } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user