emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/forth-mode 522256d98d 145/153: Adding support for ?of


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 522256d98d 145/153: Adding support for ?of
Date: Sat, 29 Jan 2022 08:02:27 -0500 (EST)

branch: elpa/forth-mode
commit 522256d98d1a909983bcfd3ae20c65226d5929b6
Author: Simon Stapleton <simon.stapleton@gmail.com>
Commit: Lars Brinkhoff <lars@nocrew.org>

    Adding support for ?of
---
 forth-smie.el   | 1 +
 forth-syntax.el | 2 +-
 test/tests.el   | 4 ++++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/forth-smie.el b/forth-smie.el
index 54610d7ba4..9c10f7df7d 100644
--- a/forth-smie.el
+++ b/forth-smie.el
@@ -17,6 +17,7 @@
        ("begin" words "while" words "repeat")
        ("begin" words "until")
        ("begin" words "again")
+       ("?of" words "endof")
        ("of" words "endof")
        ("case" words "endcase")
        ("?do" words "loop")
diff --git a/forth-syntax.el b/forth-syntax.el
index 9309d5084c..d3d1dbec98 100644
--- a/forth-syntax.el
+++ b/forth-syntax.el
@@ -202,7 +202,7 @@ SYNTAX must be a valid argument for `string-to-syntax'."
   '("if" "else" "then"
     "?do" "do" "unloop" "exit" "leave" "loop" "+loop"
     "begin" "while" "repeat" "again" "until"
-    "case" "of" "endof" "endcase"
+    "case" "?of" "of" "endof" "endcase"
     ":noname" ";" "does>" "immediate"
     "is" "to"
     "literal" "2literal" "fliteral" "sliteral"
diff --git a/test/tests.el b/test/tests.el
index e36100d223..1948203d15 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -171,6 +171,7 @@ The whitespace before and including \"|\" on each line is 
removed."
   (forth-assert-face "postpone ( →x " nil)
   (forth-assert-face "' s\" →x "nil)
   (forth-assert-face "case [char] ' →of exit endof " font-lock-keyword-face)
+  (forth-assert-face "case [char] ' →?of exit endof " font-lock-keyword-face)
   (forth-assert-face "→postpone postpone" font-lock-keyword-face)
   (forth-assert-face "postpone →postpone" nil)
   (forth-assert-face "→literal" font-lock-keyword-face)
@@ -259,6 +260,9 @@ The whitespace before and including \"|\" on each line is 
removed."
    |  [char] b of bar
    |              baz
    |           endof
+   |  test ?of bar
+   |           baz
+   |       endof
    |  drop exit
    |endcase"))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]