FUEL: Font lock for (( ... )).
parent
f64b8a2279
commit
0ea51ee176
|
@ -74,9 +74,7 @@
|
||||||
|
|
||||||
(defconst fuel-font-lock--font-lock-keywords
|
(defconst fuel-font-lock--font-lock-keywords
|
||||||
`((,fuel-syntax--stack-effect-regex . 'factor-font-lock-stack-effect)
|
`((,fuel-syntax--stack-effect-regex . 'factor-font-lock-stack-effect)
|
||||||
(,fuel-syntax--parsing-words-regex . 'factor-font-lock-parsing-word)
|
|
||||||
(,fuel-syntax--brace-words-regex 1 'factor-font-lock-parsing-word)
|
(,fuel-syntax--brace-words-regex 1 'factor-font-lock-parsing-word)
|
||||||
("\\(P\\|SBUF\\)\"" 1 'factor-font-lock-parsing-word)
|
|
||||||
(,fuel-syntax--vocab-ref-regexp 2 'factor-font-lock-vocabulary-name)
|
(,fuel-syntax--vocab-ref-regexp 2 'factor-font-lock-vocabulary-name)
|
||||||
(,fuel-syntax--declaration-words-regex . 'factor-font-lock-declaration)
|
(,fuel-syntax--declaration-words-regex . 'factor-font-lock-declaration)
|
||||||
(,fuel-syntax--word-definition-regex 2 'factor-font-lock-word)
|
(,fuel-syntax--word-definition-regex 2 'factor-font-lock-word)
|
||||||
|
@ -89,12 +87,14 @@
|
||||||
(,fuel-syntax--type-definition-regex 2 'factor-font-lock-type-name)
|
(,fuel-syntax--type-definition-regex 2 'factor-font-lock-type-name)
|
||||||
(,fuel-syntax--method-definition-regex (1 'factor-font-lock-type-name)
|
(,fuel-syntax--method-definition-regex (1 'factor-font-lock-type-name)
|
||||||
(2 'factor-font-lock-word))
|
(2 'factor-font-lock-word))
|
||||||
(,fuel-syntax--parent-type-regex 2 'factor-font-lock-type-name)
|
(,fuel-syntax--tuple-decl-regex 2 'factor-font-lock-type-name)
|
||||||
(,fuel-syntax--constructor-regex . 'factor-font-lock-constructor)
|
(,fuel-syntax--constructor-regex . 'factor-font-lock-constructor)
|
||||||
(,fuel-syntax--setter-regex . 'factor-font-lock-setter-word)
|
(,fuel-syntax--setter-regex . 'factor-font-lock-setter-word)
|
||||||
(,fuel-syntax--getter-regex . 'factor-font-lock-getter-word)
|
(,fuel-syntax--getter-regex . 'factor-font-lock-getter-word)
|
||||||
(,fuel-syntax--symbol-definition-regex 2 'factor-font-lock-symbol)
|
(,fuel-syntax--symbol-definition-regex 2 'factor-font-lock-symbol)
|
||||||
(,fuel-syntax--bad-string-regex . 'factor-font-lock-invalid-syntax)))
|
(,fuel-syntax--bad-string-regex . 'factor-font-lock-invalid-syntax)
|
||||||
|
("\\(P\\|SBUF\\)\"" 1 'factor-font-lock-parsing-word)
|
||||||
|
(,fuel-syntax--parsing-words-regex . 'factor-font-lock-parsing-word)))
|
||||||
|
|
||||||
(defun fuel-font-lock--font-lock-setup (&optional keywords no-syntax)
|
(defun fuel-font-lock--font-lock-setup (&optional keywords no-syntax)
|
||||||
(set (make-local-variable 'comment-start) "! ")
|
(set (make-local-variable 'comment-start) "! ")
|
||||||
|
|
|
@ -122,8 +122,8 @@
|
||||||
(defconst fuel-syntax--type-definition-regex
|
(defconst fuel-syntax--type-definition-regex
|
||||||
(fuel-syntax--second-word-regex '("MIXIN:" "TUPLE:" "SINGLETON:" "UNION:")))
|
(fuel-syntax--second-word-regex '("MIXIN:" "TUPLE:" "SINGLETON:" "UNION:")))
|
||||||
|
|
||||||
(defconst fuel-syntax--parent-type-regex
|
(defconst fuel-syntax--tuple-decl-regex
|
||||||
"^\\(TUPLE\\|PREDICTE\\): +[^ ]+ +< +\\([^ ]+\\)")
|
"^TUPLE: +\\([^ ]+\\) +< +\\([^ ]+\\) ")
|
||||||
|
|
||||||
(defconst fuel-syntax--constructor-regex "<[^ >]+>")
|
(defconst fuel-syntax--constructor-regex "<[^ >]+>")
|
||||||
|
|
||||||
|
@ -133,7 +133,8 @@
|
||||||
(defconst fuel-syntax--symbol-definition-regex
|
(defconst fuel-syntax--symbol-definition-regex
|
||||||
(fuel-syntax--second-word-regex '("SYMBOL:" "VAR:")))
|
(fuel-syntax--second-word-regex '("SYMBOL:" "VAR:")))
|
||||||
|
|
||||||
(defconst fuel-syntax--stack-effect-regex " ( .* )")
|
(defconst fuel-syntax--stack-effect-regex
|
||||||
|
"\\( ( .* )\\)\\|\\( (( .* ))\\)")
|
||||||
|
|
||||||
(defconst fuel-syntax--using-lines-regex "^USING: +\\([^;]+\\);")
|
(defconst fuel-syntax--using-lines-regex "^USING: +\\([^;]+\\);")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue