NEW (AND UPCOMING) B++ CHANGES
Tokenizer
-
Added inline comment support (
#) outside of strings. -
Correctly handles escaped quotes inside strings (
\"). -
Preserves line numbers for better error reporting.
Expression Evaluation
-
Supports more literal types via
ast.literal_eval: strings, numbers, booleans, lists, tuples. -
Added fallback safe
evalfor advanced expressions. -
Smarter
+handling: concatenates strings if any operand is a string, otherwise performs numeric addition.
Conditions
-
Added support for
==and!=(was missing before). -
Full set of comparison operators now:
is,is not,<,>,<=,>=,==,!=. -
Falls back to truthiness check if no operator matches.
Block Handling
-
Fixed bugs with
if/elif/elsenesting. -
elifandelseno longer incorrectly increase nesting depth. -
Cleaner and more reliable
collect_blockparsing.
Math and Variables
-
Division automatically converts integers back (
10 / 2 → 5instead of5.0). -
Safer error messages when adding or multiplying incompatible types.
Extra Features
-
New
import modulesupport (with identifier safety check). -
--debugmode: shows environment after each line.
REPL
-
Introduced
startcommand to run buffered code explicitly. -
Improved block depth tracking for multi-line blocks.