Skip to main content

Module fixup

Module fixup 

Source
Expand description

To make attribute macros work reliably when typing, we need to take care to fix up syntax errors in the code we’re passing to them.

StructsΒ§

SyntaxFixupUndoInfo
This is the information needed to reverse the fixups.
SyntaxFixups πŸ”’
The result of calculating fixes for a syntax node – a bunch of changes (appending to and replacing nodes), the information that is needed to reverse those changes afterwards, and a token map.

ConstantsΒ§

FIXUP_DUMMY_AST_ID πŸ”’
FIXUP_DUMMY_RANGE πŸ”’
FIXUP_DUMMY_RANGE_END πŸ”’

FunctionsΒ§

can_handle_error πŸ”’
fixup_syntax πŸ”’
has_error πŸ”’
has_error_to_handle πŸ”’
reverse_fixups πŸ”’
reverse_fixups_ πŸ”’