public class PyExpr extends TargetExpr
Important: This class may only be used in implementing plugins (e.g. functions, directives).
Since the type information is rather generic it could potentially be shared with the JsExpr, but as JS doesn't currently have any uses, and Python types do differ in some aspects (such as with numbers), it's kept separate.
NOTE: Some expressions could potentially return multiple types (such as a ternary if with a String or number as potential results). If possible to avoid, the results will be improved, but if not, this class can be used with no type assumed.
| Modifier and Type | Method and Description |
|---|---|
PyStringExpr |
toPyString()
Convert the given type to a Python String expression.
|
equals, getPrecedence, getText, hashCode, toStringpublic PyExpr(String text, int precedence)
text - The Python expression text.precedence - The precedence of the top-most operator. Or Integer.MAX_VALUE.public PyStringExpr toPyString()