Commit Graph

5 Commits

Author SHA1 Message Date
Trevor Gross
87e981996f mbe: Refactor the diagnostic for unrecognized metavariable expressions
Change to a structural diagnostic, update the valid list, and move the
valid list to a note.
2025-07-09 21:11:09 -04:00
Trevor Gross
e7ef31d651 mbe: Refactor diagnostics for invalid metavar expression syntax
Give a more user-friendly diagnostic about the following:

* Trailing tokens within braces, e.g. `${foo() extra}`
* Missing parentheses, e.g. `${foo}`
* Incorrect number of arguments, with a hint about correct usage.
2025-07-09 21:11:09 -04:00
Trevor Gross
b3d74da9b8 mbe: Extend metavariable expression tests
Add tests showing the current state to make it more clear when output
gets updated later in refactoring.
2025-06-30 19:02:36 +00:00
Trevor Gross
876835de11 mbe: Split metavariable usage tests off from syntax tests
`syntax-errors` currently contains both syntax error tests (which don't
need expansion) and tests for incorrect instantiations of the `count`
metavariable expression (which do need expansion). Split the
expansion-dependent tests to a separate file and remove unneeded
invocations from `syntax-errors`, to ensure we are catching these before
expansion.
2025-06-30 19:00:42 +00:00
Trevor Gross
cf5eb27910 mbe: Restructure macro_metavar_expr tests
These tests have expanded beyond the RFC, so rename the directory
`rfc-3086-metavar-expr` to `metavar-expressions`. `concat` (which wasn't
part of the RFC) now fits in this group, so merge its tests into the
`metavar-expressions` directory.

Additionally rename some related `issue-*` tests.
2025-06-23 06:25:55 -05:00