BadScript 2
Loading...
Searching...
No Matches
BadInOperator.cs
Go to the documentation of this file.
3
5
10{
14 public BadInOperator() : base(3, "in") { }
15
17 public override BadExpression Parse(BadExpression left, BadSourceParser parser)
18 {
19 BadExpression right = parser.ParseExpression(null, Precedence);
20
21 return new BadInExpression(left, right, left.Position.Combine(right.Position));
22 }
23}
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.
Implements the 'in' operator. The 'in' operator is used to check if a key is present in an instance o...
Base class for all binary operators.
int Precedence
The Precedence of the Operator.
BadInOperator()
Creates a new 'in' operator.
override BadExpression Parse(BadExpression left, BadSourceParser parser)
Contains the Binary Expressions for the BadScript2 Language.
Contains the Expressions for the BadScript2 Language.
Contains the Binary Operators for the BadScript2 Language.