Skip to content

C structs in hand-written extern blocks - #10

Merged
theharshon merged 1 commit into
mainfrom
extern-struct
Nov 29, 2026
Merged

theharshon merged 1 commit into
mainfrom
extern-struct

Conversation

@theharshon

Copy link
Copy Markdown
Member

Mimic 0.4.4 lets a hand-written extern "C" block declare a C struct: struct pollfd { fd: i32, events: i16, revents: i16 }.

  • Tree-sitter:
    • a c_struct item inside extern_block;
    • a lower-case struct name accepted as a type in an extern function's result and inside ptr[…].
  • TextMate: struct is a keyword.
  • Sample: extern-struct.mim.

@theharshon
theharshon merged commit f72e757 into main Nov 29, 2026
8 checks passed
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