Commit 68bbd9b5 authored by Ben Lambell's avatar Ben Lambell

Add support for hard-coded (non-internationalised) predicates

parent 1c4569c4
......@@ -6,6 +6,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using Recurse.Spiel.Languages.English;
namespace Recurse.Spiel.Translation.Predicates
{
public static class PredicateExtensions
......@@ -15,5 +17,8 @@ namespace Recurse.Spiel.Translation.Predicates
public static ISpielElement ToPredicate(this IPredicateType type, ISpielElement element)
=> type.ToPredicate(element != null ? new[] { element } : null);
public static ISpielElement WithPredicate(this ISpielElement element, string predicate)
=> new EnglishParticle(predicate).ToPredicate(element);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment