Skip to main content

Module layout

Module layout 

Source
Expand description

Indentation-sensitive layout resolver.

Inserts virtual braces and semicolons for the parser. Layout resolution: insert virtual braces/semicolons per the Haskell offside rule (adapted for DAML, where with also opens a layout block).

Input is the raw token stream from the lexer; output is the same stream with VLBrace/VRBrace/VSemi inserted, so the parser never has to look at columns.

Functionsยง

resolve_layout
Resolve indentation-sensitive layout: insert virtual VLBrace/VRBrace/ VSemi tokens per the offside rule so the parser never inspects columns.