BadScript 2
Loading...
Searching...
No Matches
BadBinaryUnpackOperator.cs
Go to the documentation of this file.
4
6
11{
15 public BadBinaryUnpackOperator() : base(3, "...", false) { }
16
18 public override BadExpression Parse(BadExpression left, BadSourceParser parser)
19 {
20 parser.Reader.SkipNonToken();
21 BadExpression right = parser.ParseExpression(null, Precedence);
22
23 return new BadBinaryUnpackExpression(left, right, left.Position.Combine(right.Position));
24 }
25}
The Parser of the Language. It turns Source Code into an Expression Tree.
BadSourceReader Reader
The Source Reader.
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 binary ... operator. This operator is used to unpack the right side into the left side...
Base class for all binary operators.
int Precedence
The Precedence of the 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.
Contains the Source Reader for the BadScript2 Language.