Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@
tm_scope: source.4dm
ace_mode: text
language_id: 577529595
8th:
type: programming
color: "#96AF3C"
extensions:
- ".8th"
tm_scope: source.forth
ace_mode: forth
codemirror_mode: forth
codemirror_mime_type: text/x-forth
language_id: 579393853
ABAP:
type: programming
color: "#E8274B"
Expand Down Expand Up @@ -864,7 +874,7 @@ C3:
type: programming
color: "#2563eb"
extensions:
- ".c3"
- ".c3"
tm_scope: source.c3
ace_mode: c_cpp
codemirror_mode: clike
Expand Down
21 changes: 21 additions & 0 deletions samples/8th/hanoi.8th
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
\ Towers of Hanoi, adapted from Reva Forth ( from: http://strobotics.com/hanoi.htm )

5 var, disks
var sa
var sb
var sc

: save sc ! sb ! sa ! disks ! ;
: get sa @ sb @ sc @ ;
: get2 get swap ;
: hanoi
save disks @ 0; drop
disks @ get
disks @ n:1- get2 hanoi save
cr
" move a ring from " . sa @ . " to " . sb @ .
disks @ n:1- get2 rot hanoi
;

" Tower of Hanoi, with " . disks @ . " rings: " .
disks @ 1 2 3 hanoi cr bye
Loading