Return the file's Module definition (extraction pushes it first), or NULL. */
| 5187 | |
| 5188 | /* Return the file's Module definition (extraction pushes it first), or NULL. */ |
| 5189 | static const CBMDefinition *find_module_def(CBMFileResult *r) { |
| 5190 | for (int i = 0; i < r->defs.count; i++) { |
| 5191 | if (r->defs.items[i].label && strcmp(r->defs.items[i].label, "Module") == 0) { |
| 5192 | return &r->defs.items[i]; |
| 5193 | } |
| 5194 | } |
| 5195 | return NULL; |
| 5196 | } |
| 5197 | |
| 5198 | /* Blazor: a routable component declares its route with a `@page` directive in |
| 5199 | * MARKUP, above the `@code` block. The C# grammar recovers `@code` (that is why |