Skip to content

Commit

Permalink
(#63) TexPredefinedFormulaParser: drop color support
Browse files Browse the repository at this point in the history
There weren't any colors in the predefined formula arguments anyway.
  • Loading branch information
ForNeVeR committed Jan 10, 2023
1 parent 79f45ed commit a39e7d5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/WpfMath.Shared/TexPredefinedFormulaParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Diagnostics;
using System.Globalization;
using System.Xml.Linq;
using WpfMath.Colors;
using WpfMath.Data;
using WpfMath.Parsers.PredefinedFormulae;
using WpfMath.Rendering;
Expand Down Expand Up @@ -63,7 +62,6 @@ public TexPredefinedFormulaParser(IBrushFactory brushFactory)
typeMappings.Add("int", typeof(int));
typeMappings.Add("bool", typeof(bool));
typeMappings.Add("char", typeof(char));
typeMappings.Add("Color", typeof(RgbaColor));
typeMappings.Add("Unit", typeof(TexUnit));
typeMappings.Add("AtomType", typeof(TexAtomType));

Expand All @@ -77,7 +75,6 @@ public TexPredefinedFormulaParser(IBrushFactory brushFactory)
argValueParsers.Add("int", new IntValueParser());
argValueParsers.Add("bool", new BooleanValueParser());
argValueParsers.Add("char", new CharValueParser());
argValueParsers.Add("Color", new ColorConstantValueParser());
argValueParsers.Add("Unit", new EnumParser(typeof(TexUnit)));
argValueParsers.Add("AtomType", new EnumParser(typeof(TexAtomType)));

Expand Down Expand Up @@ -241,15 +238,6 @@ private class TeXFormulaValueParser : IArgumentValueParser
}
}

private class ColorConstantValueParser : IArgumentValueParser
{
public object? Parse(string value, PredefinedFormulaContext context)
{
// TODO: Duplicate the WPF color names here and map to RgbaColors. This method should return a color instance named as <value>.
throw new NotImplementedException("RgbaColor is not supported, yet");
}
}

private class EnumParser : IArgumentValueParser
{
private Type enumType;
Expand Down

0 comments on commit a39e7d5

Please sign in to comment.