Tabnine Logo
ASTCompilerVisitor
Code IndexAdd Tabnine to your IDE (free)

How to use
ASTCompilerVisitor
in
org.kie.dmn.feel.codegen.feel11

Best Java code snippets using org.kie.dmn.feel.codegen.feel11.ASTCompilerVisitor (Showing top 4 results out of 315)

origin: org.kie/kie-dmn-feel

private DirectCompilerResult getCompilerResult() {
  if (compiledExpression == null) {
    if (errorListener.isError()) {
      compiledExpression = CompiledFEELSupport.compiledErrorUnaryTest(
          errorListener.event().getMessage());
    } else {
      try {
        compiledExpression = ast.accept(new ASTCompilerVisitor());
      } catch (FEELCompilationError e) {
        compiledExpression = CompiledFEELSupport.compiledErrorUnaryTest(e.getMessage());
      }
    }
  }
  return compiledExpression;
}
origin: org.kie/kie-dmn-feel

private CompiledFEELExpression parse(String input, Map<String, Type> inputTypes) {
  FEEL_1_1Parser parser = FEELParser.parse(null, input, inputTypes, Collections.emptyMap(), Collections.emptyList(), Collections.emptyList());
  ParseTree tree = parser.compilation_unit();
  ASTBuilderVisitor v = new ASTBuilderVisitor(inputTypes);
  BaseNode node = v.visit(tree);
  DirectCompilerResult directResult = node.accept(new ASTCompilerVisitor());
  
  Expression expr = directResult.getExpression();
  CompiledFEELExpression cu = new CompilerBytecodeLoader().makeFromJPExpression(input, expr, directResult.getFieldDeclarations());
  return cu;
}

origin: org.kie/kie-dmn-feel

private DirectCompilerResult getCompilerResult() {
  if (compiledExpression == null) {
    if (errorListener.isError()) {
      compiledExpression =
          DirectCompilerResult.of(
              CompiledFEELSupport.compiledErrorExpression(
                  errorListener.event().getMessage()),
              BuiltInType.UNKNOWN);
    } else {
      try {
        compiledExpression = ast.accept(new ASTCompilerVisitor());
      } catch (FEELCompilationError e) {
        compiledExpression = DirectCompilerResult.of(
            CompiledFEELSupport.compiledErrorExpression(e.getMessage()),
            BuiltInType.UNKNOWN);
      }
    }
  }
  return compiledExpression;
}
origin: org.kie/kie-dmn-feel

private CompiledFEELUnaryTests parse(String input, Map<String, Type> inputTypes, FEELEventListenersManager mgr, CompiledFEELSupport.SyntaxErrorListener listener) {
  FEEL_1_1Parser parser = FEELParser.parse(mgr, input, inputTypes, Collections.emptyMap(), Collections.emptyList(), Collections.emptyList());
  ParseTree tree = parser.unaryTestsRoot();
  DirectCompilerResult directResult;
  if (listener.isError()) {
    directResult = CompiledFEELSupport.compiledErrorUnaryTest(listener.event().getMessage());
  } else {
    ASTBuilderVisitor v = new ASTBuilderVisitor(inputTypes);
    BaseNode node = v.visit(tree);
    BaseNode transformed = node.accept(new ASTUnaryTestTransform()).node();
    directResult = transformed.accept(new ASTCompilerVisitor());
  }
  Expression expr = directResult.getExpression();
  CompiledFEELUnaryTests cu = new CompilerBytecodeLoader().makeFromJPUnaryTestsExpression(input, expr, directResult.getFieldDeclarations());
  return cu;
}

org.kie.dmn.feel.codegen.feel11ASTCompilerVisitor

Most used methods

  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Notification (javax.management)
  • JTextField (javax.swing)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now