From dd5bbae055fd34ce2e12ef63f8a261c6b15dc83e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 21 Oct 2026 05:43:35 +0000 Subject: feat(parser): parse TEMPLATE declarations, template ids and parameter packs Co-Authored-By: Claude Opus 5.5 --- tests/iii/template-pack-errors/program.cps | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/iii/template-pack-errors/program.cps (limited to 'tests/iii/template-pack-errors/program.cps') diff --git a/tests/iii/template-pack-errors/program.cps b/tests/iii/template-pack-errors/program.cps new file mode 100644 index 0000000..51ffa46 --- /dev/null +++ b/tests/iii/template-pack-errors/program.cps @@ -0,0 +1,32 @@ +TEMPLATE +PROCEDURE NotLast(Values : Rest..., Extra : INTEGER) +ENDPROCEDURE + +TEMPLATE +PROCEDURE ArrayPack(Values : ARRAY OF Rest...) +ENDPROCEDURE + +TEMPLATE +PROCEDURE WrongPack(Values : T...) +ENDPROCEDURE + +TEMPLATE +PROCEDURE BarePack(Values : Rest...) + OUTPUT Values +ENDPROCEDURE + +TEMPLATE +PROCEDURE ScalarExpansion(Value : T) + CALL Missing(Value...) +ENDPROCEDURE + +TEMPLATE +PROCEDURE WrongTypeExpansion(Value : T) + CALL Missing(Value) +ENDPROCEDURE + +TEMPLATE +PROCEDURE MissingDots(Values : Rest) +ENDPROCEDURE + +OUTPUT 0 -- cgit v1.3.1-4-g156e