BadScript 2
Loading...
Searching...
No Matches
BadNegateOperator.cs
Go to the documentation of this file.
3
5
7{
8 public BadNegateOperator() : base(3, "-", false) { }
9
11 public override BadExpression Parse(BadSourceParser parser)
12 {
13 BadExpression right = parser.ParseExpression(null, Precedence);
14
15 return new BadNegationExpression(right.Position, right);
16 }
17}
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.
int Precedence
The Precedence of the Operator.
Base class for all Unary Prefix Operators.
override BadExpression Parse(BadSourceParser parser)
Contains the Math Expressions for the BadScript2 Language.
Contains the Expressions for the BadScript2 Language.
Contains the Math Operators for the BadScript2 Language.