Added % comments, not for any real reason
Getty Ritter
9 years ago
| 11 | 11 | -- ** Scripting Language Syntax |
| 12 | 12 | -- $script |
| 13 | 13 | , withOctothorpeComments |
| 14 | -- ** Prolog- or Matlab-Style Syntax | |
| 15 | , withPercentComments | |
| 16 | , withPercentBlockComments | |
| 14 | 17 | -- ** C-Style Syntax |
| 15 | 18 | -- $clike |
| 16 | 19 | , withCLikeLineComments |
| 113 | 116 | withOctothorpeComments :: SExprParser t a -> SExprParser t a |
| 114 | 117 | withOctothorpeComments = setComment (lineComment "#") |
| 115 | 118 | |
| 119 | -- | MATLAB, Prolog, PostScript, and others use comments which begin | |
| 120 | -- with @%@ and last until the end of the line. | |
| 121 | withPercentComments :: SExprParser t a -> SExprParser t a | |
| 122 | withPercentComments = setComment (lineComment "%") | |
| 123 | ||
| 124 | -- | MATLAB block comments are started with @%{@ and end with @%}@. | |
| 125 | withPercentBlockComments :: SExprParser t a -> SExprParser t a | |
| 126 | withPercentBlockComments = setComment (simpleBlockComment "%{" "%}") | |
| 127 | ||
| 116 | 128 | |
| 117 | 129 | {- $intro |
| 118 | 130 | |