HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

ModuleAgda-2.8.0.2Haskell2010

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.

Synopsis
  • PackageAgda-2.8.0.2
  • Exports5
  • LanguageHaskell2010
  • LicenceMIT
  • SourceComments.hs
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.