From af243a8ce8cec028b13852b6c7fa31d60ad976a4 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 5 Jul 2024 12:55:44 +0200 Subject: [PATCH] Add yet another AST example --- tests/004-incl.bb | 1 + tests/004.bb | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/004-incl.bb create mode 100644 tests/004.bb diff --git a/tests/004-incl.bb b/tests/004-incl.bb new file mode 100644 index 0000000..cd1825b --- /dev/null +++ b/tests/004-incl.bb @@ -0,0 +1 @@ +Local iValue = 2 \ No newline at end of file diff --git a/tests/004.bb b/tests/004.bb new file mode 100644 index 0000000..245d07a --- /dev/null +++ b/tests/004.bb @@ -0,0 +1,10 @@ +Include "004-incl.bb" +; Should be parsed as: +; Include(String("test.bb")) +; which should then jump to parsing "test.bb" relative to the current file. + +iValue = iValue + 4 +; Should be parsed as Assign(Variable(iValue), Add(Variable(iValue), Int32(4))) + +Print iValue +; Should be parsed as Call(Function(Print), Variable(iValue)) \ No newline at end of file