Skip to content

Pick up the parser's no-break-space whitespace and UTF-8-safe errors - #232

Merged
revarbat merged 1 commit into
mainfrom
fix/parser-nbsp-whitespace
Oct 5, 2026
Merged

revarbat merged 1 commit into
mainfrom
fix/parser-nbsp-whitespace

Conversation

@revarbat

@revarbat revarbat commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Refs BelfrySCAD/BelfrySCAD#679

Bumps external/openscad_cpp_parser to BelfrySCAD/openscad_cpp_parser#13:

  • U+00A0 NO-BREAK SPACE, U+FEFF and a bare Latin-1 A0 are whitespace, as in OpenSCAD's lexer. OpenSCAD 2026.02 renders cube(1);<NBSP> silently; we failed to parse it.
  • An unexpected character message quotes the whole UTF-8 character (or \xNN for a byte that starts none). It quoted the first byte alone, so the Python binding raised nanobind::str(): conversion error in place of the parse error.

Testing

  • New test_no_break_space_in_code_is_whitespace_and_errors_stay_decodable: passes on this build, fails on 1.37.0 with the nanobind error.
  • C++ suite 2021/2021; binding tests 62/62 against a wheel built from this branch.
  • BOSL2 docsgen A/B (BOSL2 @ e173fa0a, 1.37.0 vs this branch): 56 md identical, 2650 images with zero pixel changes, zero error/warning lines on both sides.

🤖 Generated with Claude Code

openscad_cpp_parser#13: U+00A0, U+FEFF and a bare Latin-1 A0 are
whitespace, as in OpenSCAD, and an 'unexpected character' message
quotes a whole UTF-8 character. A no-break space in code failed to
parse, and the message quoted its first byte alone, so converting it
to a Python str raised 'nanobind::str(): conversion error' instead of
the parse error (BelfrySCAD#679).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@revarbat
revarbat merged commit 35a6399 into main Oct 5, 2026
3 checks passed
@revarbat
revarbat deleted the fix/parser-nbsp-whitespace branch October 5, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant