Interface TranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>

All Known Subinterfaces:
JavaScriptTranslatorToCAst.WalkContext<C,T>, JDTJava2CAstTranslator.WalkContext
All Known Implementing Classes:
JavaScriptTranslatorToCAst.FunctionContext, JavaScriptTranslatorToCAst.MemberDestructuringContext, JavaScriptTranslatorToCAst.RootContext, JavaScriptTranslatorToCAst.ScriptContext, JDTJava2CAstTranslator.DelegatingContext, JDTJava2CAstTranslator.MethodContext, JDTJava2CAstTranslator.RootContext, TranslatorToCAst.BreakContext, TranslatorToCAst.DelegatingContext, TranslatorToCAst.FunctionContext, TranslatorToCAst.LoopContext, TranslatorToCAst.RootContext, TranslatorToCAst.TryCatchContext
Enclosing interface:
TranslatorToCAst

public static interface TranslatorToCAst.WalkContext<C extends TranslatorToCAst.WalkContext<C,T>,T>
  • Method Details

    • getParent

    • addNameDecl

      default void addNameDecl(CAstNode n)
      Add a name declaration to this context. For variables or constants, n should be a CAstNode.DECL_STMT, and the initialization of the variable (if any) may occur in a separate assignment. For functions, n should be a CAstNode.FUNCTION_STMT, including the function body.
    • getNameDecls

      default List<CAstNode> getNameDecls()
    • getScopedEntities

      default Map<CAstNode,Collection<CAstEntity>> getScopedEntities()
      get a mapping from CAstNodes to the scoped entities (e.g. functions or local classes) introduced by those nodes. Also maps null to those entities not corresponding to any node (e.g nested classes)
    • getCatchTarget

      default CAstNode getCatchTarget()
    • getCatchTarget

      default CAstNode getCatchTarget(String s)
    • top

      default T top()
    • addScopedEntity

      default void addScopedEntity(CAstNode newNode, CAstEntity visit)
      associate a child entity with a given CAstNode, e.g. for a function declaration
    • cfg

      default CAstControlFlowRecorder cfg()
      for recording control-flow relationships among the CAst nodes
    • pos

      for recording source positions
    • getNodeTypeMap

      default CAstNodeTypeMapRecorder getNodeTypeMap()
      for recording types of nodes
    • getContinueFor

      default T getContinueFor(String label)
      for a 'continue' style goto, return the control flow target
    • getBreakFor

      default T getBreakFor(String label)
      for a 'break' style goto, return the control flow target