FUEL: improve highlighting and indentation for ERROR:

db4
Dmitry Shubin 2010-06-12 06:42:58 +04:00
parent d24ffe8346
commit 221fb87fae
2 changed files with 7 additions and 1 deletions

View File

@ -59,6 +59,7 @@
(ratio constant "ratios") (ratio constant "ratios")
(declaration keyword "declaration words") (declaration keyword "declaration words")
(ebnf-form constant "EBNF: ... ;EBNF form") (ebnf-form constant "EBNF: ... ;EBNF form")
(error-form warning "ERROR: ... ; form")
(parsing-word keyword "parsing words") (parsing-word keyword "parsing words")
(postpone-body comment "postponed form") (postpone-body comment "postponed form")
(setter-word function-name "setter words (>>foo)") (setter-word function-name "setter words (>>foo)")
@ -132,6 +133,7 @@
(,fuel-syntax--float-regex . 'factor-font-lock-number) (,fuel-syntax--float-regex . 'factor-font-lock-number)
(,fuel-syntax--ratio-regex . 'factor-font-lock-ratio) (,fuel-syntax--ratio-regex . 'factor-font-lock-ratio)
(,fuel-syntax--type-definition-regex 2 'factor-font-lock-type-name) (,fuel-syntax--type-definition-regex 2 'factor-font-lock-type-name)
(,fuel-syntax--error-regex 2 'factor-font-lock-error-form)
(,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--before-definition-regex (1 'factor-font-lock-type-name) (,fuel-syntax--before-definition-regex (1 'factor-font-lock-type-name)

View File

@ -135,6 +135,9 @@
(fuel-syntax--second-word-regex (fuel-syntax--second-word-regex
'("C-STRUCT:" "C-UNION:" "COM-INTERFACE:" "MIXIN:" "TUPLE:" "SINGLETON:" "SPECIALIZED-ARRAY:" "STRUCT:" "UNION:" "UNION-STRUCT:"))) '("C-STRUCT:" "C-UNION:" "COM-INTERFACE:" "MIXIN:" "TUPLE:" "SINGLETON:" "SPECIALIZED-ARRAY:" "STRUCT:" "UNION:" "UNION-STRUCT:")))
(defconst fuel-syntax--error-regex
(fuel-syntax--second-word-regex '("ERROR:")))
(defconst fuel-syntax--tuple-decl-regex (defconst fuel-syntax--tuple-decl-regex
"^TUPLE: +\\([^ \n]+\\) +< +\\([^ \n]+\\)\\_>") "^TUPLE: +\\([^ \n]+\\) +< +\\([^ \n]+\\)\\_>")
@ -168,7 +171,8 @@
(defconst fuel-syntax--indent-def-starts '("" ":" (defconst fuel-syntax--indent-def-starts '("" ":"
"AFTER" "BEFORE" "AFTER" "BEFORE"
"ENUM" "COM-INTERFACE" "CONSULT" "COM-INTERFACE" "CONSULT"
"ENUM" "ERROR"
"FROM" "FUNCTION:" "FUNCTION-ALIAS:" "FROM" "FUNCTION:" "FUNCTION-ALIAS:"
"INTERSECTION:" "INTERSECTION:"
"M" "M:" "MACRO" "MACRO:" "M" "M:" "MACRO" "MACRO:"