-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manual, code example preprocessor : full conversion to compiler-libs (#…
…1863) * manual tools: use toploop directly in caml_tex2 * manual tool: improved error messages * manual: always print errors and warnings * fix nefarious interaction with GPR#1120 * move manual/tools/caml_tex2 to tools/caml_tex * Basic text for caml-tex
- Loading branch information
Showing
14 changed files
with
373 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ htmlgen | |
htmlquote | ||
latexscan.ml | ||
dvi2txt | ||
caml-tex2 | ||
*.dSYM | ||
*.cm[io] | ||
*.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
redirections.ml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(* TEST | ||
reference="${test_source_directory}/redirections.reference" | ||
output="redirections.output" | ||
script = "${ocamlrun} ${ocamlsrcdir}/tools/caml-tex \ | ||
-repo-root ${ocamlsrcdir} ${test_source_directory}/${test_file} -o ${output}" | ||
* script with unix,str | ||
** check-program-output | ||
*) | ||
|
||
\begin{caml_example}{toplevel} | ||
[@@@warning "+A"];; | ||
1 + 2. [@@expect error];; | ||
let f x = () [@@expect warning 27];; | ||
\end{caml_example} | ||
|
||
\begin{caml_example}{toplevel} | ||
Format.printf "Hello@."; | ||
print_endline "world";; | ||
\end{caml_example} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
(* TEST | ||
reference="${test_source_directory}/redirections.reference" | ||
output="redirections.output" | ||
script = "${ocamlrun} ${ocamlsrcdir}/tools/caml-tex \ | ||
-repo-root ${ocamlsrcdir} ${test_source_directory}/${test_file} -o ${output}" | ||
* script with unix,str | ||
** check-program-output | ||
*) | ||
|
||
\camlexample{toplevel} | ||
\caml\camlinput\?[@@@warning "+A"];; | ||
\endcamlinput\endcaml | ||
\caml\camlinput\?1 + \<2.\> ;; | ||
\endcamlinput\camlerror\:Error: This expression has type float but an expression was expected of type | ||
\: int | ||
\endcamlerror\endcaml | ||
\caml\camlinput\?let f \<x\> = () ;; | ||
\endcamlinput\camlwarn\:Warning 27: unused variable x. | ||
\:val f : \textquotesingle\-a -> unit = <fun> | ||
\endcamlwarn\endcaml | ||
\endcamlexample | ||
|
||
\camlexample{toplevel} | ||
\caml\camlinput\?Format.printf "Hello@."; | ||
\?print_endline "world";; | ||
\endcamlinput\camloutput\:Hello | ||
\:world | ||
\:- : unit = () | ||
\endcamloutput\endcaml | ||
\endcamlexample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.