BadScript 2
Loading...
Searching...
No Matches
BadInstanceOfExpressionOperator.cs
Go to the documentation of this file.
3
5
10{
14 public BadInstanceOfExpressionOperator() : base(3, BadStaticKeys.INSTANCE_OF, false) { }
15
17 public override BadExpression Parse(BadExpression left, BadSourceParser parser)
18 {
19 BadExpression right = parser.ParseExpression(null, Precedence);
20
21 return new BadInstanceOfExpression(left, right, left.Position.Combine(right.Position));
22 }
23}
BadSourcePosition Combine(BadSourcePosition other)
Combines two Source Positions.
Contains Static Data for the BadScript Language.
The Parser of the Language. It turns Source Code into an Expression Tree.
BadExpression ParseExpression(BadExpression? left=null, int precedence=int.MaxValue)
Parses an Expression with a precedence greater than the given precedence. Moves the reader to the nex...
Base Implementation for all Expressions used inside the Script.
BadSourcePosition Position
The source Position of the Expression.
Base class for all binary operators.
override BadExpression Parse(BadExpression left, BadSourceParser parser)
int Precedence
The Precedence of the Operator.
Contains Shared Data Structures and Functionality.
Contains the Expressions for the BadScript2 Language.
Contains the Operators for the BadScript2 Language.