enso/docs/parser/macro-resolution.md
2020-07-21 13:59:40 +01:00

1.5 KiB

layout title category tags order
developer-doc Macro Resolution parser
parser
macro
resolution
5

Macro Resolution

Macro resolution is the process of taking the structured token stream from the lexer, and resolving it into the ast through the process of resolving macros. This process produces a chunked AST stream, including spacing-unaware elements.

Functionality

The current functionality of the macro resolver is as follows:

  • TBC

The current overview of the macro resolution process can be found in the scala implementation.

The actionables for this section are:

  • Discuss how the space-unaware AST should be handled as it is produced by macros.
  • Handle precedence for operators properly within macro resolution (e.g. x : a -> b : a -> c should parse with the correct precedence).
  • Create a detailed design for how macro resolution should work.

Errors During Macro Resolution

It is very important that, during macro resolution, the resolver produces descriptive errors for error conditions in the macro resolver.

The actionables for this section are:

  • Determine how best to provide detailed and specific errors from within the macro resolution engine.