Copyright | (C) CSIRO 2017-2019 |
---|---|
License | BSD3 |
Maintainer | Isaac Elliott <isaace71295@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data Comment a = MkComment {
- _commentAnn :: Ann a
- _commentValue :: String
Documentation
A Python single-line comment, such as on the following line:
y = x + 4 # add four to the value of x
In this case, the structure parsed would be
MkComment () " add four to the value of x"
with the hash being inferred, and the space after the hash being preserved.
Python does not have multi-line comments. There is a common convention of using a multi-line string expression as a multi-line comment, since a string expression is a no-op statement. Such multi-line comments are NOT represented with this data type, but rather as normal string expressions (since that's what they are).
MkComment | |
|