diff options
author | Jed Barber <jjbarber@y7mail.com> | 2020-04-20 15:49:56 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2020-04-20 15:49:56 +1000 |
commit | 42d3982f1e6335cb99c382ddd91c324e5fa458ad (patch) | |
tree | fe7208dc36dd42d82552d7d1044d9ebb6a4ea570 /test/packrat-lexer-debug.adb | |
parent | d8e6a2bcf74f1059f83c681e646fd8a22876e737 (diff) |
Updated and fixed tests, fixed Pass_Forward array sliding bug
Diffstat (limited to 'test/packrat-lexer-debug.adb')
-rw-r--r-- | test/packrat-lexer-debug.adb | 11 |
1 files changed, 9 insertions, 2 deletions
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 |