repl: Always use parser, allow trailing ; in assignments

We now properly shell out to the parser instead of hacking stuff
together with a regex. Stuff we get for free by doing this:

- Optional trailing semicolon
- Declaring nested attribute sets
- String identifiers, and future proofing for eventual grammar
improvements to identifiers
- Dynamic attributes

Change-Id: Ibf1ad815e5e27caf162df05ea5ba5b1b4955d9c9
This commit is contained in:
piegames
2025-04-21 20:19:25 +02:00
parent 930ac12346
commit abb8ad29c0
10 changed files with 240 additions and 40 deletions
@@ -90,8 +90,12 @@ public:
}
session.close();
// Remove references to the checkout path
auto replacedOutLog =
boost::algorithm::replace_all_copy(session.outLog, unitTestData, "$TEST_DATA");
// Remove references to the current version
replacedOutLog =
boost::algorithm::replace_all_copy(replacedOutLog, PACKAGE_VERSION, "$VERSION");
auto cleanedOutLog = trimOutLog(replacedOutLog);
auto parsedOutLog = cli_literate_parser::parse(
@@ -178,6 +182,7 @@ REPL_TEST(regression_9917);
REPL_TEST(regression_9918);
REPL_TEST(regression_l145);
REPL_TEST(regression_l592);
REPL_TEST(repl_input);
REPL_TEST(repl_overlays);
REPL_TEST(repl_overlays_compose);
REPL_TEST(repl_overlays_destructure_without_dotdotdot_errors);