Package org.openrewrite.python.marker
Class ExecSyntax
java.lang.Object
org.openrewrite.python.marker.ExecSyntax
- All Implemented Interfaces:
org.openrewrite.marker.Marker,org.openrewrite.rpc.RpcCodec<ExecSyntax>
public class ExecSyntax
extends Object
implements org.openrewrite.marker.Marker, org.openrewrite.rpc.RpcCodec<ExecSyntax>
Marker indicating that a
J.MethodInvocation represents a Python 2 exec statement
rather than a Python 3 exec function call.
In Python 2, exec is a statement with optional scope arguments:
exec code # simple form exec code in globals # with globals dict exec code in globals, locals # with globals and locals dicts
The marker allows the printer to output the correct syntax (using in keyword
instead of function arguments) and allows recipes to distinguish between exec statements
and exec function calls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrpcReceive(ExecSyntax before, org.openrewrite.rpc.RpcReceiveQueue q) voidrpcSend(ExecSyntax after, org.openrewrite.rpc.RpcSendQueue q) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.marker.Marker
getId, print, withId
-
Constructor Details
-
ExecSyntax
public ExecSyntax()
-
-
Method Details
-
rpcSend
- Specified by:
rpcSendin interfaceorg.openrewrite.rpc.RpcCodec<ExecSyntax>
-
rpcReceive
- Specified by:
rpcReceivein interfaceorg.openrewrite.rpc.RpcCodec<ExecSyntax>
-