From 42d3982f1e6335cb99c382ddd91c324e5fa458ad Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Mon, 20 Apr 2020 15:49:56 +1000 Subject: Updated and fixed tests, fixed Pass_Forward array sliding bug --- test/packrat-lexer-debug.adb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test/packrat-lexer-debug.adb') diff --git a/test/packrat-lexer-debug.adb b/test/packrat-lexer-debug.adb index d4cc2e2..f6c57ef 100644 --- a/test/packrat-lexer-debug.adb +++ b/test/packrat-lexer-debug.adb @@ -67,11 +67,18 @@ package body Packrat.Lexer.Debug is return This.Status; end Status; + function Has_Pass + (This : in Lexer_Context) + return Boolean is + begin + return not This.Pass_Forward.Is_Empty; + end Has_Pass; + function Pass (This : in Lexer_Context) - return access Element_Array is + return Element_Array is begin - return This.Pass_Forward; + return This.Pass_Forward.Element; end Pass; function Length -- cgit