Skip to content
wichtounet edited this page Nov 22, 2012 · 1 revision

The EDDI Front-End starts by parsing the source file, resolving the dependencies and parsing them into an AST. Once the AST has been generated, several passes are applied to the AST:

  • Clean (S)
  • Context Annotation (N)
  • Structure Collection (N)
  • Template Collection (N)
  • Structure Member Collection (N)
  • Structure Check (N)
  • Default Values (N)
  • Member Function Collection (N)
  • Variable Annotation (N)
  • Function Collection (N)
  • Function Check (N)
  • String collection (S)
  • Type Checking (S)
  • Transform Pass (S)
  • Warnings Pass (S)

If a class template or a function template gets instantiated during a pass, the already applied passes are applied to the new AST nodes. The new AST nodes are added to the actual AST tree once the current pass is over. The template instantiation depth limit is set to 100 by default but can be changed with the --template-depth-limit=x option.

There are two types of passes:

  • Simple passes (S): This type of pass is applied only once. It means that if a template instantiation occurs, it is not applied again on the instantiated code.
  • Normal passes (N): This type of pass is applied at their run point and then again on instantiated code.

Clone this wiki locally