gdritter repos s-cargot / b7a80fc
Added % comments, not for any real reason Getty Ritter 7 years ago
1 changed file(s) with 12 addition(s) and 0 deletion(s). Collapse all Expand all
1111 -- ** Scripting Language Syntax
1212 -- $script
1313 , withOctothorpeComments
14 -- ** Prolog- or Matlab-Style Syntax
15 , withPercentComments
16 , withPercentBlockComments
1417 -- ** C-Style Syntax
1518 -- $clike
1619 , withCLikeLineComments
113116 withOctothorpeComments :: SExprParser t a -> SExprParser t a
114117 withOctothorpeComments = setComment (lineComment "#")
115118
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
116128
117129 {- $intro
118130