Crafter.Build/interfaces
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 5fa9c8a816 Merge branch 'lint-ast': libclang token layer for the linter
Replaces the linter's hand-rolled character scanning with clang's lexer.

StripComments could not see raw string literals, which was documented as a
v1 limitation but was worse than that: an odd number of quotes inside a raw
string desynchronised it for the rest of the file, hiding real code and
leaving the contents of later literals standing as if they were code. There
are 33 raw strings across 6 files here, including the two largest.

The reflow guards had the same class of bug from the other direction. They
were substring probes, so Line(n).contains("//") fired on // inside a string
literal and contains("R\"") fired on the characters R" inside a literal while
missing raw strings opened on an earlier line. Both misfire on this repo:
"MARKER" ends in R". They are now LineHasComment() and
LineHasMultiLineToken(), and two wrapped call sites in tests/Lint that had
been silently unjoinable join as a result.

libclang is dlopen'd rather than linked, so the mingw and MSVC cross-builds
keep linking and the release tarballs stay self-contained. Tokens need no
PCMs, no build flags and no prior build, and they cover preprocessor branches
that are inactive for the host — which is why the layout rules belong on
tokens rather than on an AST that would only ever see one platform's slice.

No rule behaviour was intended to change beyond the two guard fixes; lint
over this repo produced byte-identical output across the CommentStripped
swap.
2026-07-30 22:57:10 +02:00
..
Crafter.Build-Api.h linting 2026-07-23 01:24:42 +02:00
Crafter.Build-Asset.cppm linting 2026-07-23 01:24:42 +02:00
Crafter.Build-Clang.cppm Merge branch 'lint-ast': libclang token layer for the linter 2026-07-30 22:57:10 +02:00
Crafter.Build-External.cppm linting 2026-07-23 01:24:42 +02:00
Crafter.Build-Implementation.cppm fix: re-resolve module imports before checking staleness 2026-07-30 17:12:24 +00:00
Crafter.Build-Interface.cppm fix: track what a primary module interface imports 2026-07-30 18:19:04 +00:00
Crafter.Build-Lint.cppm feat(lint): libclang-backed token layer 2026-07-27 02:54:38 +02:00
Crafter.Build-Platform.cppm linting 2026-07-23 01:24:42 +02:00
Crafter.Build-Progress.cppm linting 2026-07-23 01:24:42 +02:00
Crafter.Build-Shader.cppm linting 2026-07-23 01:24:42 +02:00
Crafter.Build-Test.cppm linting 2026-07-23 01:24:42 +02:00
Crafter.Build.cppm linting 2026-07-23 01:24:42 +02:00