diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-19 14:29:58 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-19 14:29:58 -0400 |
| commit | 934b843b1ce4744f8f21b7c590f0e1f31c94f604 (patch) | |
| tree | 5ca8d6f2a6c1055b8c2aa6e01f45b8e1e435aeff /types.c | |
| parent | ea6f9797be2b6c1f65cf3b5594f8fb062ba92e9e (diff) | |
Add .text_content as a field on DSLs instead of a method
Diffstat (limited to 'types.c')
| -rw-r--r-- | types.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -586,6 +586,11 @@ type_t *get_field_type(type_t *t, const char *field_name) switch (t->tag) { case PointerType: return get_field_type(Match(t, PointerType)->pointed, field_name); + case TextType: { + if (Match(t, TextType)->lang && streq(field_name, "text_content")) + return Type(TextType); + return NULL; + } case StructType: { auto struct_t = Match(t, StructType); for (arg_t *field = struct_t->fields; field; field = field->next) { |
