]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: fontification of COLOR: and HEXCOLOR:
authorBjörn Lindqvist <bjourne@gmail.com>
Sun, 21 Aug 2016 00:23:31 +0000 (02:23 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Sun, 21 Aug 2016 00:23:31 +0000 (02:23 +0200)
misc/fuel/factor-mode.el
misc/fuel/strange-syntax.factor

index 75c3112e2d5b6292983e8631dd8eef243bd8ea2f..773c4f888ec0e0c198ec54442c155ac5ba565a10 100644 (file)
@@ -215,7 +215,6 @@ these lines in your .emacs:
   '(":" "::" ";" ":>" "&:" "<<" "<PRIVATE" ">>"
     "ABOUT:" "ARTICLE:"
     "B"
-    "COLOR:"
     "CONSULT:" "call-next-method"
     "EBNF:" ";EBNF"
     "FOREIGN-ATOMIC-TYPE:" "FOREIGN-ENUM-TYPE:" "FOREIGN-RECORD-TYPE:" "FUNCTION-ALIAS:"
@@ -456,7 +455,7 @@ these lines in your .emacs:
     ,(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 (syntax-and-1-symbol '("ALIEN" "CHAR" "COLOR" "NAN" "HEXCOLOR")) '("P" "CT"))
     ,(factor-syntax factor-types-lines-regex '("P" "T"))
 
     (,factor-float-regex . 'factor-font-lock-number)
index 82014c99c513069e5c366459cdd5ee597df8afca..da763dc0d2152bd843c91b8189a20b48a8d44782 100644 (file)
@@ -1,5 +1,6 @@
-USING: accessors alien.c-types alien.syntax byte-arrays.hex kernel
-literals logging math ;
+USING: accessors alien.c-types alien.syntax byte-arrays.hex
+classes.struct colors.constants colors.hex kernel literals logging
+math ;
 IN: strange
 
 ! FUEL Syntax Demo
@@ -87,6 +88,13 @@ flags{ 10 20 } drop
 HEX{ ab cd ef } drop
 
 ! ! Alien functions
+STRUCT: timeval
+    { sec long }
+    { usec long } ;
+
 FUNCTION: int futimes ( int id, timeval[2] times )
 FUNCTION: int booyah ( int x )
 FUNCTION-ALIAS: test int bah ( int* ah, int[] eh )
+
+HEXCOLOR: ffffff COLOR: green NAN: 1234 CHAR: m ALIEN: 93
+2drop 2drop drop