From 4c2a1d00126a9672f6ddd855850a913f3fae32c9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 12 Mar 2025 21:33:34 +0000 Subject: [PATCH] Test negative integer literal --- test/corpus/literals.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/corpus/literals.txt b/test/corpus/literals.txt index b1c3fba..82fafae 100644 --- a/test/corpus/literals.txt +++ b/test/corpus/literals.txt @@ -20,6 +20,35 @@ foo = 42 -------------------------------------------------------------------------------- +(source_file + (assignment + (identifier) + (operator) + (integer_literal))) + +================================================================================ +Integer literal (negative) +================================================================================ + +foo = -42 + +-------------------------------------------------------------------------------- + +(source_file + (assignment + (identifier) + (operator) + (integer_literal))) + + +================================================================================ +Integer literal (negative space) +================================================================================ + +foo = - 42 + +-------------------------------------------------------------------------------- + (source_file (assignment (identifier)