From 2f55da43b145001d4b57d0a6c8080a55c6e12d8c Mon Sep 17 00:00:00 2001 From: Gordon Tisher Date: Thu, 5 Dec 2024 16:56:10 -0800 Subject: [PATCH] Get rid of janky attempt at performance --- kiuatan/named_rule.pony | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/kiuatan/named_rule.pony b/kiuatan/named_rule.pony index 9de0c60..065393c 100644 --- a/kiuatan/named_rule.pony +++ b/kiuatan/named_rule.pony @@ -101,30 +101,7 @@ class NamedRule[S, D: Any #share = None, V: Any #share = None] match _body | let body': RuleNode[S, D, V] val => - let self = this - - if not left_recursive then - body'.parse( - parser, - depth, - loc, - {(body_result: Result[S, D, V]) => - let rule_result = - match body_result - | let success: Success[S, D, V] => - Success[S, D, V](self, success.start, success.next, [success]) - | let failure: Failure[S, D, V] => - Failure[S, D, V]( - self, - loc, - ErrorMsg.rule_expected(self.name, loc.string()), - failure) - end - outer(rule_result) - }) - else - parser._parse_named_rule(depth, self, body', loc, outer) - end + parser._parse_named_rule(depth, this, body', loc, outer) else let result = Failure[S, D, V](this, loc, ErrorMsg.rule_empty(name))