Parser stuff
This commit is contained in:
parent
7acaa9df76
commit
abbd4a74ef
25 changed files with 1044 additions and 32 deletions
20
ASTNodeDivide.cs
Normal file
20
ASTNodeDivide.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ShintenScript
|
||||
{
|
||||
public class ASTNodeDivide : ASTNodeBinaryNumericOperator
|
||||
{
|
||||
public ASTNodeDivide(IASTNode lhs, IASTNode rhs) : base(lhs, rhs) { }
|
||||
|
||||
public override object CreateFunction11(Func<ExecutionContext, float> left, Func<ExecutionContext, float> right)
|
||||
{
|
||||
return (Func<ExecutionContext, float>)(ctx => left(ctx) / right(ctx));
|
||||
}
|
||||
|
||||
public override string Op() => "/";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue