"Samples/git@s-devrep.domain.ft:importedprojects/SVG.git" did not exist on "3aedd8e824bd2315693824ed8a8b4736dc70846a"
GenericFunction.cs 837 Bytes
Newer Older
Eric Domke's avatar
Eric Domke committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Collections.Generic;
using System.Text;
using ExCSS.Model;

// ReSharper disable once CheckNamespace
namespace ExCSS
{
    public class GenericFunction : Term
    {
        public string Name { get; set; }
        public TermList Arguments { get; set; }

        public GenericFunction(string name, List<Term> arguments)
        {
            this.Name = name;

            var list = new TermList();
            for (int n = 0; n < arguments.Count; n++)
            {
                list.AddTerm(arguments[n]);
                if (n == arguments.Count - 1)
                    break;
                list.AddSeparator(GrammarSegment.Comma);
            }
            this.Arguments = list;
        }

        public override string ToString()
        {
            return Name + "(" + Arguments + ")";
        }
    }
}