diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index 938e33a996..68f4883c17 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -449,6 +449,7 @@ these lines in your .emacs: ,(factor-syntax factor-declaration-words-regex '("C")) ,(factor-syntax factor-word-definition-regex '("P" "W")) ,(factor-syntax (syntax-and-2-symbols '("ALIAS")) '("P" "W" "W")) + ,(factor-syntax (syntax-and-2-symbols '("LOG")) '("P" "W" "")) ,(factor-syntax (syntax-and-1-symbol '("ALIEN" "CHAR" "NAN")) '("P" "CT")) ,(factor-syntax factor-types-lines-regex '("P" "T")) ,(factor-syntax factor-integer-regex '("N")) @@ -479,14 +480,18 @@ these lines in your .emacs: (2 'factor-font-lock-type-name) (3 'factor-font-lock-parsing-word nil t) (4 'factor-font-lock-type-name nil t) - ;; A slot is either a single symbol or a sequence along the - ;; lines: { foo initial: "bar } + ;; This allows three different slot styles: + ;; 1) foo 2) { foo initial: 123 } 3) { foo initial: { 123 } } (,(format - "\\(?:{[ \n]+%s[^}]+\\)}\\|%s" symbol symbol) + "{%s%s[^}]+}%s}\\|{%s%s[^}]+}\\|%s" + ws+ symbol ws+ + ws+ symbol + symbol) (factor-find-end-of-def) nil (1 'factor-font-lock-symbol nil t) - (2 'factor-font-lock-symbol nil t))) + (2 'factor-font-lock-symbol nil t) + (3 'factor-font-lock-symbol nil t))) ,(factor-syntax factor-predicate-regex '("P" "T" "P" "T")) ;; Highlights alien function definitions. Types in stack effect ;; declarations are given a bold face. diff --git a/misc/fuel/factor-smie.el b/misc/fuel/factor-smie.el index 2061cbdc1a..1db1495acd 100644 --- a/misc/fuel/factor-smie.el +++ b/misc/fuel/factor-smie.el @@ -24,7 +24,7 @@ "FROM" "FUNCTION:" "FUNCTION-ALIAS:" "INTERSECTION:" "M" "M:" "MACRO" "MACRO:" - "MAIN-WINDOW:" "MEMO" "MEMO:" "METHOD" + "MAIN-WINDOW" "MEMO" "MEMO:" "METHOD" "SYNTAX" "PREDICATE" "PRIMITIVE" "PROTOCOL" "SINGLETONS" diff --git a/misc/fuel/fuel-tests.el b/misc/fuel/fuel-tests.el index 50af163d31..4b13a89185 100644 --- a/misc/fuel/fuel-tests.el +++ b/misc/fuel/fuel-tests.el @@ -52,5 +52,6 @@ (fuel-help--find-in)) "foob"))) +;; fuel-xref (ert-deftest fuel-xref-name () (should (equal (buffer-name (fuel-xref--buffer)) "*fuel xref*"))) diff --git a/misc/fuel/strange-syntax.factor b/misc/fuel/strange-syntax.factor index 40e608f92b..21f0cbd3ae 100644 --- a/misc/fuel/strange-syntax.factor +++ b/misc/fuel/strange-syntax.factor @@ -1,8 +1,6 @@ USING: accessors ; IN: strange -TUPLE: oh\no { and/again initial: "meh" } ; - ! FUEL Syntax Demo ! ! The purpose of this file is to test that corner cases are @@ -12,11 +10,12 @@ TUPLE: oh\no { and/again initial: "meh" } ; USING: alien.syntax kernel math ; IN: strange-syntax -TUPLE: a-tuple slot1 slot2 { slot3 integer } ; +TUPLE: a-tuple slot1 slot2 { slot3 integer } { slot4 initial: "hi" } ; TUPLE: second-one ; USING: tools.test ; +TUPLE: initial-array { slot2 initial: { 123 } } slot3 ; ! ! Strings "containing \"escapes" drop @@ -37,6 +36,8 @@ TUPLE: tup : slash\hack ( m -- y ) get\it>> dup >>get\it ; +LOG: what ever + TUPLE: oh\no { and/again initial: "meh" } ; ! As are quotes