You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The syntax presently has the ability to apply a metaprogram to a single block, like:
{metaprog args}
This is a paragraph
The block is optional. The only thing this has been used for is for standalone commands, like {include SECTION}, but it makes the error messages worse due to lookahead.
A better solution would be to remove block roles, and just have standalone commands with the current syntax for include. Then, the parser can parse a "role-header-like". If the rest of the line is blank, then it's a standalone command, otherwise, it's a paragraph that starts with a role inline. This solution requires no lookahead and will give good error messages.
At the same time, this opens the door for better error messages for e.g. missing metaprograms, because we can hook these commands up to identifiers in the elaboration monad, rather than the current solution where they map to block syntax kinds and have to do a bunch of parsing.
This would fix #70, but also many other little issues.
The text was updated successfully, but these errors were encountered:
The syntax presently has the ability to apply a metaprogram to a single block, like:
The block is optional. The only thing this has been used for is for standalone commands, like
{include SECTION}
, but it makes the error messages worse due to lookahead.A better solution would be to remove block roles, and just have standalone commands with the current syntax for include. Then, the parser can parse a "role-header-like". If the rest of the line is blank, then it's a standalone command, otherwise, it's a paragraph that starts with a role inline. This solution requires no lookahead and will give good error messages.
At the same time, this opens the door for better error messages for e.g. missing metaprograms, because we can hook these commands up to identifiers in the elaboration monad, rather than the current solution where they map to block syntax kinds and have to do a bunch of parsing.
This would fix #70, but also many other little issues.
The text was updated successfully, but these errors were encountered: