FUEL: syntax fixes for MAIN-WINDOW:, LOG: and TUPLE: with initial values
parent
ca2aef8e67
commit
2e9704a406
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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*")))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue