From 2b062a83927cbdc1ad73d7ce0ce8a2504bb3f647 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sun, 20 Feb 2022 16:19:00 -0600 Subject: [PATCH] Make ## token merging on character constants give an error. This ultimately should be supported, but that will be more work. For now, we just set the string representation to '?', which will usually give an error when merged. (Previously, whatever was at memory location 0 would be treated as the string representation of the token. Frequently this would just be an empty string, leading to no error but incorrect results.) --- Scanner.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Scanner.pas b/Scanner.pas index c88b71d..076d6b7 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -4710,6 +4710,9 @@ var token.lval := result; end; {else if} + if saveNumber then {TODO: support token merging} + token.numString := @'?'; + charStrPrefix := prefix_none; {no prefix for next char/str (so far)} end; {CharConstant}