some opts
This commit is contained in:
@@ -24,7 +24,7 @@ See the [manual](lttb-manual.md) for more details on every supported command and
|
||||
|
||||
Here are all currently known implementations of LTTB:
|
||||
|
||||
* [Jim Tcl port](./lttb.tcl) (300 SLOC)
|
||||
* [Jim Tcl port](./lttb.tcl) (298 SLOC)
|
||||
|
||||
## FAQ
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# Based upon the original Tiny BASIC Design Notes by Dennis Allison
|
||||
# Created in 2026 by Luxferre, released into the public domain
|
||||
|
||||
set lttb_keywords {EN GO IF IN LE PR RE}
|
||||
lassign {{} {} {} 0} progmem callstack vars ip
|
||||
loop i 65 91 {set vars([format {%c} $i]) 0}
|
||||
|
||||
@@ -30,15 +29,14 @@ proc lttb_proginput {rawline} {
|
||||
|
||||
# Main line interpreter
|
||||
proc lttb_exec {pline} {
|
||||
global lttb_keywords
|
||||
set kw [string range [lttb_stripspace $pline] 0 1]
|
||||
if {[string index $kw 1] eq {=}} {
|
||||
set kw LE
|
||||
set pline [string cat {LE } $pline]
|
||||
}
|
||||
set bi [string first { } $pline]
|
||||
set body [string trim [string range $pline $bi end]]
|
||||
if {$kw in $lttb_keywords} {
|
||||
if {$kw in {EN GO IF IN LE PR RE}} {
|
||||
set bi [string first { } $pline]
|
||||
set body [string trim [string range $pline $bi end]]
|
||||
if {$kw eq {GO} && [string index $pline 2] eq {S}} {
|
||||
lttb_GOS $body
|
||||
} else {lttb_$kw $body}
|
||||
|
||||
Reference in New Issue
Block a user