类 ParserConditionExp

java.lang.Object
com.sh.wf.module.parser.ParserConditionExp

public class ParserConditionExp extends Object

Description:

Title:首亨软件 - TSS/CRM等

从以下版本开始:
2018年3月13日
  • 构造器详细资料

    • ParserConditionExp

      public ParserConditionExp()
  • 方法详细资料

    • parseExpress

      public static String parseExpress(ModuleContext context, ParserThisExp_I parserThisExp, String source) throws ParserException
      解析条件表达式
      参数:
      context - ModuleContext
      parserThisExp - ParserThisExp_I
      source - String
      返回:
      #if #elsif #else #end
      抛出:
      ParserException - ParserException 注意:这里只会分离出条件表达式,并不会对表达式中的值进行表达式解析
    • parseSignleCondition

      public static String parseSignleCondition(ModuleContext context, ParserThisExp_I parserThisExp, String source) throws ParserException
      解析单个#if() #elsif() #else #end语法
      参数:
      context - ModuleContext
      parserThisExp - ParserThisExp_I
      source - String
      返回:
      String
      抛出:
      ParserException - ParserException
    • parseIFArea

      public static String[] parseIFArea(String source) throws ParserException
      解析出IF区域
      参数:
      source - #if() #elsif() #else #end表达式
      返回:
      {条件表达式|区域值}
      抛出:
      ParserException - ParserException
    • parseElsifArea

      public static List<String[]> parseElsifArea(String source) throws ParserException
      解析#elsif条件表达式
      参数:
      source - String
      返回:
      List
      抛出:
      ParserException - ParserException
    • parseElseArea

      public static String parseElseArea(String source) throws ParserException
      解析#else区域
      参数:
      source - String
      返回:
      String
      抛出:
      ParserException - ParserException
    • parseCondition

      public static boolean parseCondition(ModuleContext context, ParserThisExp_I parserThisExp, String source) throws ParserException
      解析#if的表达式
      参数:
      context - ModuleContext
      parserThisExp - ParserThisExp_I
      source - 表达式 a==b && c==d
      返回:
      true|false
      抛出:
      ParserException - ParserException
    • parser3MeshExpress

      public static String parser3MeshExpress(ModuleContext context, ParserThisExp_I parserThisExp, String source)
      解析三目运算符 a==b?a:1
      参数:
      context - ModuleContext
      parserThisExp - ParserThisExp_I
      source - String
      返回:
      如果不是三目运算符表达式,则返回null