From 315d7521a7929a573fd6eb440a7e281b2126fe06 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Thu, 8 Oct 2009 03:01:19 +0000 Subject: [PATCH] Clean up warnings. Add simple blocks. --- .../chaiscript/language/chaiscript_parser.hpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/include/chaiscript/language/chaiscript_parser.hpp b/include/chaiscript/language/chaiscript_parser.hpp index 1b43418..e40b85b 100644 --- a/include/chaiscript/language/chaiscript_parser.hpp +++ b/include/chaiscript/language/chaiscript_parser.hpp @@ -145,8 +145,6 @@ namespace chaiscript bool Float_() { bool retval = false; std::string::iterator start = input_pos; - int prev_col = col; - int prev_line = line; if ((input_pos != input_end) && (((*input_pos >= '0') && (*input_pos <= '9')) || (*input_pos == '.'))) { while ((input_pos != input_end) && (*input_pos >= '0') && (*input_pos <= '9')) { @@ -257,8 +255,8 @@ namespace chaiscript else { TokenPtr t(new Token(match, Token_Type::Int, filename, prev_line, prev_col, line, col)); match_stack.push_back(t); - return true; } + return true; } } else { @@ -1004,16 +1002,6 @@ namespace chaiscript */ bool Try() { bool retval = false; - bool is_annotated = false; - - TokenPtr annotation; - - if (Annotation()) { - while (Eol_()); - annotation = match_stack.back(); - match_stack.pop_back(); - is_annotated = true; - } int prev_stack_top = match_stack.size(); @@ -1781,6 +1769,11 @@ namespace chaiscript retval = true; saw_eol = true; } + else if (Block()) { + has_more = true; + retval = true; + saw_eol = true; + } else { has_more = false; }