﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExpressionParser.Tokens
{
    using Nodes;

    public class AddToken : OperatorToken
    {
        internal AddToken(int index, int length)
            : base(index, length)
        { }
        public override double GetValue(double a, double b)
        {
            return b + a;
        }

        public override Node CreateNode(Node node1, Node node2)
        {
            return new AddNode(node1, node2, this);
        }
    }
}
