Changes between Version 5 and Version 6 of HaddockComments


Ignore:
Timestamp:
Oct 21, 2006 9:27:30 PM (9 years ago)
Author:
waern
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HaddockComments

    v5 v6  
    2525When a doc token is encountered by the parser, it tries to parse the content of the token. This is done by invoking a special Alex lexer ([[GhcFile(compiler/parser/HaddockLex.x)]]) and Happy parser ([[GhcFile(compiler/parser/HaddockParse.y)]]), taken directly from the old Haddock sources. This process turns the token into a value of type {{{HsDoc RdrName}}}, representing the (internal structure of the) comment. It can then be stored in the Haskell AST by the parser at the appropriate place. A lot of places (constructors) in the AST definition ([[GhcFile(compiler/hsSyn)]]) allow {{{HsDoc}}}s, and more can be added.
    2626
    27 Putting a doc comment at a place where the parser doesn't expect it will result in a parse error. 
     27A doc token at a place where the parser doesn't expect it will result in a parse error.
    2828
    2929= Binding groups =