Class ParsedExpression
java.lang.Object
org.openzen.zenscript.parser.expression.ParsedExpression
- Direct Known Subclasses:
ParsedDollarExpression,ParsedExpressionAndAnd,ParsedExpressionArray,ParsedExpressionAssign,ParsedExpressionBinary,ParsedExpressionBool,ParsedExpressionBracket,ParsedExpressionCall,ParsedExpressionCast,ParsedExpressionCoalesce,ParsedExpressionCompare,ParsedExpressionConditional,ParsedExpressionFloat,ParsedExpressionFunction,ParsedExpressionIndex,ParsedExpressionInt,ParsedExpressionIs,ParsedExpressionMap,ParsedExpressionMember,ParsedExpressionNull,ParsedExpressionOpAssign,ParsedExpressionOrOr,ParsedExpressionOuter,ParsedExpressionPostCall,ParsedExpressionRange,ParsedExpressionSame,ParsedExpressionString,ParsedExpressionSuper,ParsedExpressionThis,ParsedExpressionUnary,ParsedExpressionVariable,ParsedLocalVariableExpression,ParsedMatchExpression,ParsedNewExpression,ParsedPanicExpression,ParsedThrowExpression,ParsedTryConvertExpression,ParsedTryRethrowExpression,ParsedTypeExpression
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract IPartialExpressioncompile(ExpressionScope scope) Compiles the given parsed expression to a high-level expression or partial expression.compileKey(ExpressionScope scope) compileToSwitchValue(TypeID type, ExpressionScope scope) abstract booleanbooleanisCompatibleWith(BaseScope scope, TypeID type) static ParsedExpressionparse(ZSTokenParser parser) static ParsedExpressionparse(ZSTokenParser parser, ParsedExpression.ParsingOptions options)
-
Field Details
-
position
-
-
Constructor Details
-
Method Details
-
parse
- Throws:
ParseException
-
parse
public static ParsedExpression parse(ZSTokenParser parser, ParsedExpression.ParsingOptions options) throws ParseException - Throws:
ParseException
-
compile
Compiles the given parsed expression to a high-level expression or partial expression.If the asType parameter is provided, the given type determines the output type of the expression. The output type of the expression MUST in that case be equal to the given type.
- Parameters:
scope-- Returns:
- Throws:
CompileException
-
compileKey
- Throws:
CompileException
-
compileToSwitchValue
- Throws:
CompileException
-
toLambdaHeader
- Throws:
ParseException
-
toLambdaParameter
- Throws:
ParseException
-
isCompatibleWith
-
hasStrongType
public abstract boolean hasStrongType()
-