Merge branch 'fuel' of git://github.com/dmsh/factor
commit
d627433a38
|
@ -59,6 +59,7 @@
|
|||
(ratio constant "ratios")
|
||||
(declaration keyword "declaration words")
|
||||
(ebnf-form constant "EBNF: ... ;EBNF form")
|
||||
(error-form warning "ERROR: ... ; form")
|
||||
(parsing-word keyword "parsing words")
|
||||
(postpone-body comment "postponed form")
|
||||
(setter-word function-name "setter words (>>foo)")
|
||||
|
@ -101,6 +102,9 @@
|
|||
(,fuel-syntax--brace-words-regex 1 'factor-font-lock-parsing-word)
|
||||
(,fuel-syntax--alien-function-regex (1 'factor-font-lock-type-name)
|
||||
(2 'factor-font-lock-word))
|
||||
(,fuel-syntax--alien-function-alias-regex (1 'factor-font-lock-word)
|
||||
(2 'factor-font-lock-type-name)
|
||||
(3 'factor-font-lock-word))
|
||||
(,fuel-syntax--alien-callback-regex (1 'factor-font-lock-type-name)
|
||||
(2 'factor-font-lock-word))
|
||||
(,fuel-syntax--vocab-ref-regexp 2 'factor-font-lock-vocabulary-name)
|
||||
|
@ -111,6 +115,11 @@
|
|||
(,fuel-syntax--typedef-regex (1 'factor-font-lock-type-name)
|
||||
(2 'factor-font-lock-type-name)
|
||||
(3 'factor-font-lock-invalid-syntax nil t))
|
||||
(,fuel-syntax--c-global-regex (1 'factor-font-lock-type-name)
|
||||
(2 'factor-font-lock-word)
|
||||
(3 'factor-font-lock-invalid-syntax nil t))
|
||||
(,fuel-syntax--c-type-regex (1 'factor-font-lock-type-name)
|
||||
(2 'factor-font-lock-invalid-syntax nil t))
|
||||
(,fuel-syntax--rename-regex (1 'factor-font-lock-word)
|
||||
(2 'factor-font-lock-vocabulary-name)
|
||||
(3 'factor-font-lock-word)
|
||||
|
@ -124,6 +133,7 @@
|
|||
(,fuel-syntax--float-regex . 'factor-font-lock-number)
|
||||
(,fuel-syntax--ratio-regex . 'factor-font-lock-ratio)
|
||||
(,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)
|
||||
(2 'factor-font-lock-word))
|
||||
(,fuel-syntax--before-definition-regex (1 'factor-font-lock-type-name)
|
||||
|
|
|
@ -47,10 +47,10 @@
|
|||
'(":" "::" ";" "&:" "<<" "<PRIVATE" ">>"
|
||||
"ABOUT:" "AFTER:" "ALIAS:" "ALIEN:" "ARTICLE:"
|
||||
"B" "BEFORE:" "BIN:"
|
||||
"C:" "CALLBACK:" "ENUM:" "C-TYPE:" "CHAR:" "COM-INTERFACE:" "CONSTANT:" "CONSULT:" "call-next-method"
|
||||
"DEFER:"
|
||||
"EBNF:" ";EBNF" "ERROR:" "EXCLUDE:"
|
||||
"f" "FORGET:" "FROM:" "FUNCTION:"
|
||||
"C:" "CALLBACK:" "C-GLOBAL:" "C-TYPE:" "CHAR:" "COM-INTERFACE:" "CONSTANT:" "CONSULT:" "call-next-method"
|
||||
"DEFER:" "DESTRUCTOR:"
|
||||
"EBNF:" ";EBNF" "ENUM:" "ERROR:" "EXCLUDE:"
|
||||
"f" "FORGET:" "FROM:" "FUNCTION:" "FUNCTION-ALIAS:"
|
||||
"GAME:" "GENERIC#" "GENERIC:"
|
||||
"GLSL-SHADER:" "GLSL-PROGRAM:"
|
||||
"HELP:" "HEX:" "HOOK:"
|
||||
|
@ -135,6 +135,9 @@
|
|||
(fuel-syntax--second-word-regex
|
||||
'("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
|
||||
"^TUPLE: +\\([^ \n]+\\) +< +\\([^ \n]+\\)\\_>")
|
||||
|
||||
|
@ -158,15 +161,19 @@
|
|||
(defconst fuel-syntax--sub-vocab-regex "^<\\([^ \n]+\\) *$")
|
||||
|
||||
(defconst fuel-syntax--alien-function-regex
|
||||
"\\_<FUNCTION: \\(\\w+\\) \\(\\w+\\)")
|
||||
"\\_<FUNCTION: +\\(\\w+\\)[\n ]+\\(\\w+\\)")
|
||||
|
||||
(defconst fuel-syntax--alien-function-alias-regex
|
||||
"\\_<FUNCTION-ALIAS: +\\(\\w+\\)[\n ]+\\(\\w+\\)[\n ]+\\(\\w+\\)")
|
||||
|
||||
(defconst fuel-syntax--alien-callback-regex
|
||||
"\\_<CALLBACK: \\(\\w+\\) \\(\\w+\\)")
|
||||
"\\_<CALLBACK: +\\(\\w+\\) +\\(\\w+\\)")
|
||||
|
||||
(defconst fuel-syntax--indent-def-starts '("" ":"
|
||||
"AFTER" "BEFORE"
|
||||
"ENUM" "COM-INTERFACE" "CONSULT"
|
||||
"FROM" "FUNCTION:"
|
||||
"COM-INTERFACE" "CONSULT"
|
||||
"ENUM" "ERROR"
|
||||
"FROM" "FUNCTION:" "FUNCTION-ALIAS:"
|
||||
"INTERSECTION:"
|
||||
"M" "M:" "MACRO" "MACRO:"
|
||||
"MEMO" "MEMO:" "METHOD"
|
||||
|
@ -197,10 +204,10 @@
|
|||
(defconst fuel-syntax--single-liner-regex
|
||||
(regexp-opt '("ABOUT:"
|
||||
"ALIAS:"
|
||||
"CONSTANT:" "C:" "C-TYPE:"
|
||||
"DEFER:"
|
||||
"CONSTANT:" "C:" "C-GLOBAL:" "C-TYPE:"
|
||||
"DEFER:" "DESTRUCTOR:"
|
||||
"FORGET:"
|
||||
"GAME:" "GENERIC:" "GENERIC#" "GLSL-PROGRAM:"
|
||||
"GAME:" "GENERIC:" "GENERIC#" "GLSL-PROGRAM:"
|
||||
"HEX:" "HOOK:"
|
||||
"IN:" "INSTANCE:"
|
||||
"LIBRARY:"
|
||||
|
@ -242,6 +249,12 @@
|
|||
(defconst fuel-syntax--typedef-regex
|
||||
"\\_<TYPEDEF: +\\(\\w+\\) +\\(\\w+\\)\\( .*\\)?$")
|
||||
|
||||
(defconst fuel-syntax--c-global-regex
|
||||
"\\_<C-GLOBAL: +\\(\\w+\\) +\\(\\w+\\)\\( .*\\)?$")
|
||||
|
||||
(defconst fuel-syntax--c-type-regex
|
||||
"\\_<C-TYPE: +\\(\\w+\\)\\( .*\\)?$")
|
||||
|
||||
(defconst fuel-syntax--rename-regex
|
||||
"\\_<RENAME: +\\(\\w+\\) +\\(\\w+\\) +=> +\\(\\w+\\)\\( .*\\)?$")
|
||||
|
||||
|
|
Loading…
Reference in New Issue