Markus Mottl avatar Markus Mottl committed 407a1eb

Added documentation for new S-expression block comments

Comments (0)

Files changed (2)

base/sexplib/README

-      
+    
                                         
                           README: library "Sexplib"
                           *************************
   
   A line comment is introduced using a semicolon, which comments out all text
 up to the end of the next newline character. The sequence '%;' introduces an
-S-expression comment. This means that the next S-expression following this
-two-character sequence will be ignored. Whitespace or other comments between
-this sequence and the subsequent S-expression are ignored.
+S-expression comment. This means that the next S-expression, which must be
+syntactically correct and may be an atom (quoted or unquoted) or list,
+following this two-character sequence will be ignored. Whitespace or other
+comments between this sequence and the subsequent S-expression are ignored.
+Block comments are opened with '#|' and closed with '|#'. They can be nested
+and require that double-quotes within the block balance and contain
+syntactically correct OCaml-strings, similar to quoted atoms. These
+OCaml-strings may contain comment characters without causing parsing problems.
   
 
 4.2  Grammar of S-expressions

base/sexplib/doc/README.tex

 \\
 A line comment is introduced using a semicolon, which comments out all
 text up to the end of the next newline character.  The sequence \verb=%;=
-introduces an S-expression comment.  This means that the next S-expression
-following this two-character sequence will be ignored.  Whitespace or other
-comments between this sequence and the subsequent S-expression are ignored.
+introduces an S-expression comment.  This means that the next S-expression,
+which must be syntactically correct and may be an atom (quoted or unquoted)
+or list, following this two-character sequence will be ignored.  Whitespace
+or other comments between this sequence and the subsequent S-expression are
+ignored.  Block comments are opened with \verb=#|= and closed with \verb=|#=.
+They can be nested and require that double-quotes within the block balance
+and contain syntactically correct OCaml-strings, similar to quoted atoms.
+These OCaml-strings may contain comment characters without causing parsing
+problems.
 
 \subsection{Grammar of S-expressions}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.