From 34a4998658674411ef3b5a392483990467a5d6e2 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sun, 18 Oct 2026 08:02:20 +0000 Subject: feat(lexer): accept identifiers starting with an underscore Co-Authored-By: Claude Opus 5.5 --- tests/i/underscore-identifiers/case.json | 1 + tests/i/underscore-identifiers/expected.txt | 1 + tests/i/underscore-identifiers/program.cps | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 tests/i/underscore-identifiers/case.json create mode 100644 tests/i/underscore-identifiers/expected.txt create mode 100644 tests/i/underscore-identifiers/program.cps (limited to 'tests/i/underscore-identifiers') diff --git a/tests/i/underscore-identifiers/case.json b/tests/i/underscore-identifiers/case.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/i/underscore-identifiers/case.json @@ -0,0 +1 @@ +{} diff --git a/tests/i/underscore-identifiers/expected.txt b/tests/i/underscore-identifiers/expected.txt new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/tests/i/underscore-identifiers/expected.txt @@ -0,0 +1 @@ +42 diff --git a/tests/i/underscore-identifiers/program.cps b/tests/i/underscore-identifiers/program.cps new file mode 100644 index 0000000..60d7b32 --- /dev/null +++ b/tests/i/underscore-identifiers/program.cps @@ -0,0 +1,9 @@ +CLASS _EXP_FOO + _Value : INTEGER +ENDCLASS +FUNCTION _Read(_Arg : INTEGER) RETURNS INTEGER + RETURN _Arg + 1 +ENDFUNCTION +DECLARE _X : _EXP_FOO +_X._Value <- _Read(41) +OUTPUT _X._Value -- cgit v1.3.1-4-g156e