| : checksynclines ( -- ) |
: checksynclines ( -- ) |
| \ when input points to a newline, check if the next line is a |
\ when input points to a newline, check if the next line is a |
| \ sync line. If it is, perform the appropriate actions. |
\ sync line. If it is, perform the appropriate actions. |
| begin |
rawinput @ begin >r |
| rawinput @ >r |
|
| s" #line " r@ over compare if |
s" #line " r@ over compare if |
| rdrop 1 line +! EXIT |
rdrop 1 line +! EXIT |
| endif |
endif |
| endif |
endif |
| dup c@ nl-char <> 0= s" sync line syntax" ?print-error |
dup c@ nl-char <> 0= s" sync line syntax" ?print-error |
| skipsynclines @ if |
skipsynclines @ if |
| dup char+ rawinput ! |
char+ dup rawinput ! |
| rawinput @ c@ cookedinput @ c! |
rawinput @ c@ cookedinput @ c! |
| endif |
endif |
| drop |
|
| again ; |
again ; |
| |
|
| : ?nextchar ( f -- ) |
: ?nextchar ( f -- ) |