Interface PdePreprocessor.ParseTreeListenerFactory

Enclosing class:
PdePreprocessor

public static interface PdePreprocessor.ParseTreeListenerFactory
Factory which creates parse tree traversal listeners. The ANTLR parse tree listener is where the preprocessing edits are generated and some client code (like modes) may need to override some preprocessing edit behavior. Specifying this factory allows client code to replace the default PdeParseTreeListener used during preprocessing.
  • Method Summary

    Modifier and Type
    Method
    Description
    build(org.antlr.v4.runtime.CommonTokenStream tokens, String sketchName, int tabSize, Optional<String> packageName)
    Create a new processing listener.
  • Method Details

    • build

      PdeParseTreeListener build(org.antlr.v4.runtime.CommonTokenStream tokens, String sketchName, int tabSize, Optional<String> packageName)
      Create a new processing listener.
      Parameters:
      tokens - The token stream with sketch code contents.
      sketchName - The name of the sketch that will be preprocessed.
      tabSize - The size (number of spaces) of the tabs.
      packageName - The optional package name for generated code.
      Returns:
      The newly created listener.