feat: add Import from Source parser for C/C++ struct definitions

Adds a new "Import from Source..." menu item that opens a QScintilla
editor dialog where users can paste C/C++ struct definitions. The parser
tokenizes and parses the source using recursive descent, supporting
stdint.h types, Windows types (BYTE/DWORD/PVOID/etc), multi-word C
types, pointers, arrays, Vec2/3/4/Mat4x4 detection, unions (first
member), padding fields, typedefs, forward declarations, static_assert
size checks, and auto-detection of comment offset mode vs computed
offsets. Also removes the flaky test_editor cursor shape tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
IChooseYou
2026-02-16 14:08:12 -07:00
parent df79da54e3
commit 3a5d03fae0
9 changed files with 2607 additions and 8 deletions

View File

@@ -47,6 +47,8 @@ private slots:
void toggleMcp();
void setEditorFont(const QString& fontName);
void exportCpp();
void importFromSource();
void importReclassXml();
void showTypeAliasesDialog();
void editTheme();
void showOptionsDialog();