diff options
| author | _ov4 <ov4@ov4.org> | 2026-09-08 12:31:17 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-09-08 12:31:17 +0000 |
| commit | 02e7e15bdc8f36f08e90f69096a4cb93006885e8 (patch) | |
| tree | dcc8211fe64c7c530208ceade2220fa77d439193 /module-test | |
| parent | bb39c49a0dbfd0ee05ec5ac3bba96916b175fa92 (diff) | |
add argument helper
Diffstat (limited to 'module-test')
| -rw-r--r-- | module-test/argument_printer.cc | 13 | ||||
| -rw-r--r-- | module-test/lexer_test.cc (renamed from module-test/ast.cc) | 6 |
2 files changed, 15 insertions, 4 deletions
diff --git a/module-test/argument_printer.cc b/module-test/argument_printer.cc new file mode 100644 index 0000000..8b8c6c3 --- /dev/null +++ b/module-test/argument_printer.cc @@ -0,0 +1,13 @@ +// print all arguments +// $ g++ module-test/argument_printer.cc -std=c++23 + +#include <iostream> + +using namespace std; + +int main(int argc, char **argv) +{ + for (int i = 0; argv[i] != nullptr; i++) + cout << argv[i] << endl; + return 0; +} diff --git a/module-test/ast.cc b/module-test/lexer_test.cc index 60d4b22..036386e 100644 --- a/module-test/ast.cc +++ b/module-test/lexer_test.cc @@ -1,7 +1,5 @@ -// TEST FILE -// ONLY FOR DEMONSTRATION -// will be removed as soon as lexer is completed - +// test lexer +// $ g++ module-test/ast.cc -std=c++23 -Iinclude -Ithird_party/magic_enum/include #include <iostream> #include <string> |
