tree-sitter / tree-sitter-c

C grammar for tree-sitter
MIT License
226 stars 100 forks source link

Support enhanced enumerations #132

Closed XVilka closed 1 year ago

XVilka commented 1 year ago

C recently (C23, N2963) introduced a way to specify the underlying type for enum:

enum F : int { A = 0x8000 } f;
enum E : long long { R, G, B } e;
static_assert (_Generic (e, long long: 1, default: 0) == 1, "E type");

This grammar doesn't have support for this