HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleAgda-2.7.0.1Haskell2010

Agda.Syntax.Parser.Comments

This module defines the lex action to lex nested comments. As is well-known this cannot be done by regular expressions (which, incidently, is probably the reason why C-comments don't nest).

When scanning nested comments we simply keep track of the nesting level, counting up for open comments and down for close comments.

  • 5 values
  • PackageAgda-2.7.0.1
  • Exports5
  • LanguageHaskell2010
  • LicenceMIT
  • SourceComments.hs

Manually lexing a block comment. Assumes an open comment has been lexed. In the end the comment is discarded and lexToken is called to lex a real token.

valueskipBlock :: String -> String -> LookAhead ()
#

Skip a block of text enclosed by the given open and close strings. Assumes the first open string has been consumed. Open-close pairs may be nested.