mirror of
https://github.com/nineties/planckforth
synced 2025-01-13 08:01:10 +01:00
Add sourcefilename
This commit is contained in:
parent
a92ed1ac7f
commit
05f99af07d
2 changed files with 8 additions and 1 deletions
|
@ -1907,6 +1907,10 @@ variable inputstreams
|
|||
|
||||
stdin_ push-inputstream
|
||||
|
||||
: sourcefilename ( -- c-addr )
|
||||
inputstreams @ input>file @ file>name
|
||||
;
|
||||
|
||||
\ Replacing parser functions using input stream.
|
||||
|
||||
variable source-buffer BUFSIZE allot
|
||||
|
@ -2594,7 +2598,7 @@ need-defined (read)
|
|||
insn:docol insn:exit insn:lit insn:litstring insn:branch insn:0branch
|
||||
|
||||
words id. name>string name>link
|
||||
include included source >in
|
||||
include included source >in sourcefilename
|
||||
next-arg shift-args arg argv argc version runtime copyright
|
||||
|
||||
[if] [unless] [else] [then] defined? private{ }private export
|
||||
|
|
|
@ -809,6 +809,9 @@ skip T{ bl gs3 drop -> 0 }T \ blank line return zero-length string
|
|||
\ T{ gs4 123 456
|
||||
\ -> }T
|
||||
|
||||
testing sourcefilename
|
||||
T{ sourcefilename s" test/core.fs" streq -> <true> }T
|
||||
|
||||
\ ------------------------------------------------------------------------
|
||||
testing <# # #s #> hold sign base >number hex decimal
|
||||
|
||||
|
|
Loading…
Reference in a new issue