raz / commit ca9f1df1

commit
ca9f1df16979ed5bf449a0f76c816bf821eacf4f
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
4b30a3c5
Report: no F32 to ..., doc comments; plan: a doc tool and checked examples

patch · log

2 files changed, +16 -4

PLAN.md (history) modified +11 -1

@@ -127,7 +127,17 @@
127127 - [ ] 14. Line numbers for gdb: `.debug_line`, with the least of
128128 `.debug_info` and `.debug_abbrev` that gdb needs.
129129
130+Tools
131+
132+- [ ] 15. `tools/Doc.jed`, a jed program: prints a module's exported
133+ declarations, each with the comment just before it, and pulls
134+ out the examples of `doc/jed.md` that are whole modules.
135+ `make check` also compiles those examples, running the ones with
136+ a `main`, and runs each library module's `main` as its test.
137+ The test runner stays in the Makefile: it must work when the
138+ compiler doesn't.
139+
130140 Wrap up
131141
132-- [ ] 15. `README.md` and `doc/compiler.md`, a guide to reading the
142+- [ ] 16. `README.md` and `doc/compiler.md`, a guide to reading the
133143 compiler file by file.

doc/jed.md modified +5 -3

@@ -77,7 +77,8 @@
7777
7878 Error messages give the line and the column, counted in characters.
7979
80-**Comments** are `(*` ... `*)` and nest.
80+**Comments** are `(*` ... `*)` and nest. By convention, the comment
81+just before an exported declaration is its documentation.
8182
8283 **Operators and delimiters:**
8384
@@ -735,8 +736,9 @@
735736 An `extern` procedure's parameters and result are integers, `BOOL`,
736737 `F32`, `F64`, pointers or procedures; a record goes to C by pointer,
737738 never by value. `...` accepts any number of further arguments of those
738-types, and is allowed only in an `extern`. As C does, an `F32` given
739-to `...` is passed as an `F64`, and a real constant there is an `F64`.
739+types, and is allowed only in an `extern`. C takes no `float` there,
740+so an `F32` given to `...` is an error: the program writes `F64(x)`.
741+A real constant there is an `F64`.
740742
741743 An `extern` variable is C's variable itself: reading it reads C's,
742744 assigning it writes C's. It can be of any type, declared as C declares