Page 1 of 1

Syntax highlighting: HexSuffix

Posted: Wed Aug 13, 2025 3:48 pm
by gurok
In syntax definition files, can we get a HexSuffix and match hexadecimal numbers only if they have both the prefix and suffix? You could maintain existing behaviour by having HexSuffix default to "" (empty string).

In various flavours of ASM, it's common to denote hexadecimal as:

Code: Select all

  034h
     ^
Where the trailing h signifies that it's hexadecimal.

Re: Syntax highlighting: HexSuffix

Posted: Thu Aug 14, 2025 11:09 am
by AmigoJack
Then a BinSuffix would also be handy for languages where you can also use binary literals, which are then distinctive by a trailing "b".

Re: Syntax highlighting: HexSuffix

Posted: Thu Aug 14, 2025 3:46 pm
by bbadmin
Good idea. TextPad already recognizes binary numbers starting with "0b" or "0B", as used in C++.