From 5bdef288372d3a6a8134479a6497c44f3b17c4dc Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 27 Apr 2016 20:54:50 +0100 Subject: Replace parboiled parser with hand-written parser --- dotnet/Mammoth/Couscous/HorribleHacks.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dotnet/Mammoth/Couscous/HorribleHacks.cs') diff --git a/dotnet/Mammoth/Couscous/HorribleHacks.cs b/dotnet/Mammoth/Couscous/HorribleHacks.cs index 88c746b..9f1ac30 100644 --- a/dotnet/Mammoth/Couscous/HorribleHacks.cs +++ b/dotnet/Mammoth/Couscous/HorribleHacks.cs @@ -1,9 +1,14 @@ using Mammoth.Couscous.java.util; using Mammoth.Couscous.org.zwobble.mammoth.@internal.documents; +using Mammoth.Couscous.org.zwobble.mammoth.@internal.styles.parsing; using System.Linq; namespace Mammoth.Couscous { internal static class HorribleHacks { + internal static bool equals(this char first, int second) { + return first == second; + } + internal static bool equals(this Optional first, Optional second) { return (!first.isPresent() && !second.isPresent()) || (first.isPresent() && second.isPresent() && first.get() == second.get()); } @@ -17,5 +22,9 @@ namespace Mammoth.Couscous { internal static bool equals(this NoteType first, NoteType second) { return first == second; } + + internal static bool equals(this TokenType first, TokenType second) { + return first == second; + } } } -- cgit v1.2.3