From bb39c49a0dbfd0ee05ec5ac3bba96916b175fa92 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 8 Sep 2026 12:26:46 +0000 Subject: add guard system --- module-test/ast.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'module-test/ast.cc') diff --git a/module-test/ast.cc b/module-test/ast.cc index 53f3b12..60d4b22 100644 --- a/module-test/ast.cc +++ b/module-test/ast.cc @@ -28,7 +28,7 @@ constexpr int MAXLINE = 1024; int main() { - int test_case = 7; + int test_case = 10; string s; switch (test_case) @@ -63,13 +63,20 @@ int main() s = "((alpha&|&&beta)||gamma&&&delta)"; break; - // guard test + // simple guard test case 8: - s = "\'foo\' && \"bar\""; + s = "\'text\' &&"; break; + // guard test case 9: - s = "&(alpha)"; + s = "\'realOperator\' && \"fake&&\" real ||"; + break; + + // guard test + // with space + case 10: + s = "\'This should be 1 token\' symbol && text \'&&\'"; break; default: -- cgit v1.3.1-4-g156e