Changeset 39581 in project
- Timestamp:
- 02/06/21 17:42:00 (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wiki/eggref/5/premodules
r39563 r39581 10 10 premodules, which differ from modules insofar, that there is 11 11 12 -no license13 -no export-clause14 -no documentation routine12 * no license 13 * no export-clause 14 * no documentation routine 15 15 16 16 Instead, those texts are inserted automatically into the final module … … 26 26 A standardized routine comment looks like this 27 27 28 <enscript highlight=scheme> 28 29 #|[ 29 30 (name . args) … … 33 34 ... 34 35 ]|# 35 36 where type is one of procedure, macro or parameter and is enclosed in at 37 least three hyphens on each side 36 </enscript> 37 38 where type is one of 39 40 * procedure 41 * macro 42 * parameter 43 44 and is enclosed in at least three hyphens on each side. 45 46 If type is macro, it can be followed by symbols representing restricted 47 exports of helpers only needed in that macro, e.g. 48 49 --- macro *foo* bar --- 50 51 This will create an export clause (name *foo* bar) instead of name. 38 52 39 53 Note, that this comment is placed immediately before the routine's … … 62 76 63 77 Off course, the generated tests depend on the test suite used. It's 64 obvious, that I use my own one, either simple-tests or simple-checks. 65 So, exported tests are implemented either with define-checks from the 66 simple-tests module or with define-checker from the simple-checks 67 module, the latter being prefered. Internal tests are coded with one of 68 pe, check or the ppp macros. 78 obvious, that I use my own one, simple-tests. So, exported tests are 79 implemented with define-tester from simple-tests and will be collected 80 and executed by test-all in the generated code. 81 82 Internal tests are coded with one of pe, check or ppp and will be 83 ignored in the generated code.. 69 84 70 85 Exported tests go into the automatically generated run.scm and the … … 163 178 (loop (+ i 1)))))))) 164 179 180 (define foo 'foo) ; example of restricted export 181 165 182 #|[ 166 183 (do-list i lst xpr ....) 167 --- macro ---184 --- macro foo --- 168 185 execute xpr .... for i in lst 169 186 ]|# … … 263 280 264 281 ;; to be exported 265 (define- checks (dos verbose?)282 (define-tester (dos?) 266 283 267 284 (let ((lst '())) … … 316 333 <enscript highligth=scheme> 317 334 335 (import premodules) 318 336 (premodule->module "preloops.scm" "loops.scm") 319 337 (premodule->tests "preloops.scm" "run.scm") … … 336 354 == Requirements 337 355 338 simple-tests or simple-checks356 simple-tests 339 357 340 358 == Last update 341 359 342 Jan 27, 2021360 Feb 06, 2021 343 361 344 362 == Author … … 378 396 379 397 == Version history 398 ; 0.7 : support for restricted exports of macro helpers added 380 399 ; 0.6.1 : support for define-tester and test-all added 381 400 ; 0.5 : history, license and local docu updated, Makefile added
Note: See TracChangeset
for help on using the changeset viewer.