diff --git a/CMakeLists.txt b/CMakeLists.txt index d1f0219..5475b3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) include(cmake/color.cmake) -set(BLT_VERSION 0.16.25) +set(BLT_VERSION 0.16.26) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/include/blt/parse/templating.h b/include/blt/parse/templating.h index 9857811..64d28dd 100644 --- a/include/blt/parse/templating.h +++ b/include/blt/parse/templating.h @@ -27,6 +27,7 @@ #include #include #include +#include #include namespace blt @@ -320,13 +321,17 @@ namespace blt auto next = consumer.consume(); if (next.type == template_token_t::STRING) { + BLT_TRACE(next.token); + while (consumer.hasNext()) + BLT_TRACE(consumer.consume().token); if (!substitutions.contains(next.token)) return blt::unexpected(template_parser_failure_t::SUBSTITUTION_NOT_FOUND); - if (consumer.next().type == template_token_t::SEMI) + if (consumer.next().type == template_token_t::SEMI || consumer.next().type == template_token_t::ELSE) { consumer.advance(); return substitutions[next.token]; } + if (consumer.next().type != template_token_t::ADD) return blt::unexpected(template_parser_failure_t::STRING_EXPECTED_CONCAT); consumer.advance(); diff --git a/libraries/parallel-hashmap b/libraries/parallel-hashmap index 1036816..7ef2e73 160000 --- a/libraries/parallel-hashmap +++ b/libraries/parallel-hashmap @@ -1 +1 @@ -Subproject commit 10368163ab1f4367d2f0685b5928b1c973ebd1ec +Subproject commit 7ef2e733416953b222851f9a360d7fc72d068ee5 diff --git a/src/blt/parse/templating.cpp b/src/blt/parse/templating.cpp index 68af339..67c94b0 100644 --- a/src/blt/parse/templating.cpp +++ b/src/blt/parse/templating.cpp @@ -232,6 +232,8 @@ namespace blt } } + BLT_TRACE(return_str); + return return_str; } } \ No newline at end of file