@designliquido/delegua
    Preparing search index...

    Class TradutorReversoPython

    Tradutor reverso de Python para Delégua. Utiliza o visitor do ANTLR para percorrer a árvore sintática em Python e traduzir para Delégua.

    Hierarchy

    • AbstractParseTreeVisitor<string>
      • TradutorReversoPython

    Implements

    • Python3Visitor<string>
    Index

    Constructors

    Methods

    • Aggregates the results of visiting multiple children of a node. After either all children are visited or #shouldVisitNextChild returns false, the aggregate value is returned as the result of #visitChildren.

      The default implementation returns nextResult, meaning #visitChildren will return the result of the last child visited (or return the initial value if the node has no children).

      Parameters

      • aggregate: string

        The previous aggregate value. In the default implementation, the aggregate value is initialized to #defaultResult, which is passed as the aggregate argument to this method after the first child node is visited.

      • nextResult: string

        The result of the immediately preceeding call to visit a child node.

      Returns string

      The updated aggregate result.

    • Gets the default value returned by visitor methods. This value is returned by the default implementations of #visitTerminal visitTerminal, #visitErrorNode visitErrorNode. The default implementation of #visitChildren visitChildren initializes its aggregate result to this value.

      Returns string

      The default value returned by visitor methods.

    • This method is called after visiting each child in #visitChildren. This method is first called before the first child is visited; at that point currentResult will be the initial value (in the default implementation, the initial value is returned by a call to #defaultResult. This method is not called after the last child is visited.

      The default implementation always returns true, indicating that visitChildren should only return after all children are visited. One reason to override this method is to provide a "short circuit" evaluation option for situations where the result of visiting a single child has the potential to determine the result of the visit operation as a whole.

      Parameters

      • node: RuleNode

        The RuleNode whose children are currently being visited.

      • currentResult: string

        The current aggregate result of the children visited to the current point.

      Returns boolean

      true to continue visiting children. Otherwise return false to stop visiting children and immediately return the current aggregate result from #visitChildren.

    • {@inheritDoc }

      The default implementation calls ParseTree#accept on the specified tree.

      Parameters

      • tree: ParseTree

      Returns string

    • Visit a parse tree produced by Python3Parser.and_test.

      Parameters

      • ctx: And_testContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.arglist.

      Parameters

      • ctx: ArglistContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.argument.

      Parameters

      • ctx: ArgumentContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.arith_expr.

      Parameters

      • ctx: Arith_exprContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.atom.

      Parameters

      • ctx: AtomContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.atom_expr.

      Parameters

      • ctx: Atom_exprContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.augassign.

      Parameters

      • ctx: AugassignContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.break_stmt.

      Parameters

      • _ctx: Break_stmtContext

      Returns string

      the visitor result

    • {@inheritDoc }

      The default implementation initializes the aggregate result to #defaultResult defaultResult(). Before visiting each child, it calls #shouldVisitNextChild shouldVisitNextChild; if the result is false no more children are visited and the current aggregate result is returned. After visiting a child, the aggregate result is updated by calling #aggregateResult aggregateResult with the previous aggregate result and the result of visiting the child.

      The default implementation is not safe for use in visitors that modify the tree structure. Visitors that modify the tree should override this method to behave properly in respect to the specific algorithm in use.

      Parameters

      • node: RuleNode

      Returns string

    • Visit a parse tree produced by Python3Parser.classdef.

      Parameters

      • ctx: ClassdefContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.comp_op.

      Parameters

      • ctx: Comp_opContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.comparison.

      Parameters

      • ctx: ComparisonContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.continue_stmt.

      Parameters

      • _ctx: Continue_stmtContext

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.decorated.

      Parameters

      • ctx: DecoratedContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.dictorsetmaker.

      Parameters

      • ctx: DictorsetmakerContext

        the parse tree

      Returns string

      the visitor result

    • {@inheritDoc }

      The default implementation returns the result of #defaultResult defaultResult.

      Parameters

      • node: ErrorNode

      Returns string

    • Visit a parse tree produced by Python3Parser.expr_stmt.

      Parameters

      • ctx: Expr_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.factor.

      Parameters

      • ctx: FactorContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.file_input.

      Parameters

      • ctx: File_inputContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.for_stmt.

      Parameters

      • ctx: For_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.funcdef.

      Parameters

      • ctx: FuncdefContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.if_stmt.

      Parameters

      • ctx: If_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.lambdef.

      Parameters

      • ctx: LambdefContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.not_test.

      Parameters

      • ctx: Not_testContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.or_test.

      Parameters

      • ctx: Or_testContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.parameters.

      Parameters

      • ctx: ParametersContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.power.

      Parameters

      • ctx: PowerContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.raise_stmt.

      Parameters

      • ctx: Raise_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.return_stmt.

      Parameters

      • ctx: Return_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.simple_assign.

      Parameters

      • ctx: Simple_assignContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.simple_stmt.

      Parameters

      • ctx: Simple_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.subscript.

      Parameters

      • ctx: SubscriptContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.subscriptlist.

      Parameters

      • ctx: SubscriptlistContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.term.

      Parameters

      • ctx: TermContext

        the parse tree

      Returns string

      the visitor result

    • {@inheritDoc }

      The default implementation returns the result of #defaultResult defaultResult.

      Parameters

      • node: TerminalNode

      Returns string

    • Visit a parse tree produced by Python3Parser.test.

      Parameters

      • ctx: TestContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.testlist.

      Parameters

      • ctx: TestlistContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.testlist_comp.

      Parameters

      • ctx: Testlist_compContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.testlist_star_expr.

      Parameters

      • ctx: Testlist_star_exprContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.tfpdef.

      Parameters

      • ctx: TfpdefContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.trailer.

      Parameters

      • ctx: TrailerContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.try_stmt.

      Parameters

      • ctx: Try_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.typedargslist.

      Parameters

      • ctx: TypedargslistContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.varargslist.

      Parameters

      • ctx: VarargslistContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.while_stmt.

      Parameters

      • ctx: While_stmtContext

        the parse tree

      Returns string

      the visitor result

    • Visit a parse tree produced by Python3Parser.with_stmt.

      Parameters

      • ctx: With_stmtContext

        the parse tree

      Returns string

      the visitor result