From a6ca809a4e4873f3fd16e4a763001a109afc2185 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 26 Dec 2013 14:52:15 -0800 Subject: Fix for issue where last job_list in tree would have a -1 production_idx because we never actually sent the terminal token type --- fish_tests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fish_tests.cpp') diff --git a/fish_tests.cpp b/fish_tests.cpp index af65b70a..83f8976d 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -2212,6 +2212,12 @@ static bool increment(std::vector &tokens) if (! incremented_in_keyword) { token.token_type++; + // Skip the very special parse_token_type_terminate, since that's always the last thing delivered + if (token.token_type == parse_token_type_terminate) + { + token.token_type++; + } + if (token.token_type > LAST_TERMINAL_TYPE) { token.token_type = FIRST_TERMINAL_TYPE; -- cgit v1.2.3