(Arne Babenhauserheide)
2013-04-22: additional wisp syntax experiments. additional wisp syntax experiments.
diff --git a/wisp.w b/wisp.w --- a/wisp.w +++ b/wisp.w @@ -1,23 +1,30 @@ #!/usr/bin/env guile ; !# +;; Currently this file contains tests, how the syntax could be nicer. +;; Longterm it should implement wisp in wisp. + ; Test display "Hello World!" newline -define : nth idx form - list-ref form idx +let : : filename : list-ref ( command-line ) 1 + let : : origfile ( open-file : filename ) "r" ; mode + let : : nextchar : read-char origfile -let - : - origfile - open-file : nth 1 : command-line - . "r" ; mode - - let : : nextchar : read-char origfile - while : not : eof-object? nextchar - display nextchar - set! nextchar : read-char origfile + while : not : eof-object? nextchar + display nextchar + set! nextchar : read-char origfile + +let* + : filename : list-ref ( command-line ) 1 + origfile ( open-file : filename ) "r" ; mode + nextchar : read-char origfile + + while : not : eof-object? nextchar + display nextchar + set! nextchar : read-char origfile + newline