• Atitit if else 选择决策流程ast对比 sql java 表达式类型 binaryExpression hase left and rit expr 目录 1.1. Sql 1


    Atitit if else 选择决策流程ast对比 sql java

     

    表达式类型  binaryExpression  hase left and rit expr

     

    目录

    1.1. Sql 1

    1.2. groovy 2

    1.3. Java 2

    1.4. Lisp 4

    1.5. Js 4

    1.6. Mybatis xml 4

     

     

      1. Sql

     


    package com.alibaba.druid.sql.ast.statement;

    import com.alibaba.druid.sql.ast.SQLExpr;
    import com.alibaba.druid.sql.ast.SQLObjectImpl;
    import com.alibaba.druid.sql.ast.SQLStatement;
    import com.alibaba.druid.sql.ast.SQLStatementImpl;
    import com.alibaba.druid.sql.visitor.SQLASTVisitor;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;

    public class SQLIfStatement extends SQLStatementImpl {
        private SQLExpr condition;
        private List<SQLStatement> statements = new ArrayList();
        private List<SQLIfStatement.ElseIf> elseIfList = new ArrayList();
        private SQLIfStatement.Else elseItem;

     

     

     

     

      1. groovy

    package org.codehaus.groovy.ast.stmt;

    import org.codehaus.groovy.ast.GroovyCodeVisitor;
    import org.codehaus.groovy.ast.expr.BooleanExpression;

    public class IfStatement extends Statement {
        private BooleanExpression booleanExpression;
        private Statement ifBlock;
        private Statement elseBlock;

      1. Java

    package org.eclipse.jdt.internal.compiler.ast;

    import org.eclipse.jdt.internal.compiler.ASTVisitor;
    import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
    import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
    import org.eclipse.jdt.internal.compiler.flow.FlowContext;
    import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
    import org.eclipse.jdt.internal.compiler.impl.Constant;
    import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
    import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;

    public class IfStatement extends Statement {
        public Expression condition;
        public Statement thenStatement;
        public Statement elseStatement;
        int thenInitStateIndex = -1;
        int elseInitStateIndex = -1;
        int mergedInitStateIndex = -1;

     

     

     

      1. Lisp
      2. Js

     

    //
    // Source code recreated from a .class file by IntelliJ IDEA
    // (powered by Fernflower decompiler)
    //

    package jdk.nashorn.internal.ir;

    import jdk.nashorn.internal.ir.annotations.Immutable;
    import jdk.nashorn.internal.ir.visitor.NodeVisitor;

    @Immutable
    public final class IfNode extends Statement implements JoinPredecessor {
        private static final long serialVersionUID = 1L;
        private final Expression test;
        private final Block pass;
        private final Block fail;
        private final LocalVariableConversion conversion;

     

     

      1. Mybatis xml

     


    package org.apache.ibatis.scripting.xmltags;

    public class IfSqlNode implements SqlNode {
        private final ExpressionEvaluator evaluator;
        private final String test;
        private final SqlNode contents;

     

  • 相关阅读:
    JS 基于面向对象的 轮播图1
    JS 原型继承的几种方法
    angularJs 自定义服务 provide 与 factory 的区别
    C# 调用JS Eval,高效率
    Linq表连接大全(INNER JOIN、LEFT OUTER JOIN、RIGHT OUTER JOIN、FULL OUTER JOIN、CROSS JOIN)
    C# LINQ干掉for循环
    C# 彻底搞懂async/await
    .NET中的异步编程——动机和单元测试
    .NET中的异步编程——常见的错误和最佳实践
    C# 实用代码段
  • 原文地址:https://www.cnblogs.com/attilax/p/15197022.html
Copyright © 2020-2023  润新知