FUEL: fix smie indentation of some syntax words

char-rename
Björn Lindqvist 2016-11-24 05:00:12 +01:00
parent 79dcce8f39
commit 209feb4cbb
2 changed files with 19 additions and 5 deletions

View File

@ -16,18 +16,20 @@
:safe 'integerp :safe 'integerp
:group 'factor) :group 'factor)
;; These prefixes starts a definition and causes the indent-level to
;; increase.
(defconst factor-indent-def-starts (defconst factor-indent-def-starts
'("" ":" '("" ":"
"AFTER" "BEFORE" "AFTER" "BEFORE"
"COM-INTERFACE" "CONSULT" "COM-INTERFACE" "CONSULT"
"ENUM" "ERROR" "ENUM" "ERROR"
"FROM" "FUNCTION:" "FUNCTION-ALIAS:" "FROM"
"IDENTITY-MEMO" "IDENTITY-MEMO"
"INTERSECTION:" "INTERSECTION"
"M" "M:" "MACRO" "MACRO:" "M" "M:" "MACRO" "MACRO:"
"MAIN-WINDOW" "MEMO" "MEMO:" "METHOD" "MAIN-WINDOW" "MEMO" "MEMO:" "METHOD"
"SYNTAX" "SYNTAX"
"PREDICATE" "PRIMITIVE" "PROTOCOL" "PREDICATE" "PROTOCOL"
"SINGLETONS" "SINGLETONS"
"STRUCT" "SYMBOLS" "TAG" "TUPLE" "STRUCT" "SYMBOLS" "TAG" "TUPLE"
"TYPED" "TYPED:" "TYPED" "TYPED:"
@ -35,8 +37,14 @@
"UNION-STRUCT" "UNION" "UNION-STRUCT" "UNION"
"VARIANT" "VERTEX-FORMAT")) "VARIANT" "VERTEX-FORMAT"))
;; These prefixes starts a definition but does not cause the indent
;; level to increase.
(defconst factor-no-indent-def-starts (defconst factor-no-indent-def-starts
'("ARTICLE" "HELP" "SPECIALIZED-ARRAYS")) '("ARTICLE"
"FUNCTION" "FUNCTION-ALIAS"
"HELP"
"PRIMITIVE"
"SPECIALIZED-ARRAYS"))
(defconst factor-indent-def-regex (defconst factor-indent-def-regex
(format "^\\(%s:\\)$" (regexp-opt factor-indent-def-starts))) (format "^\\(%s:\\)$" (regexp-opt factor-indent-def-starts)))

View File

@ -89,9 +89,15 @@ STRUCT: timeval
{ sec long } { sec long }
{ usec long } ; { usec long } ;
FUNCTION: int futimes ( int id, timeval[2] times ) FUNCTION: int futimes ( int id,
timeval[2] times,
int x,
int y )
FUNCTION: int booyah ( int x ) FUNCTION: int booyah ( int x )
FUNCTION-ALIAS: test int bah ( int* ah, int[] eh ) FUNCTION-ALIAS: test int bah ( int* ah, int[] eh )
HEXCOLOR: ffffff COLOR: green NAN: 1234 CHAR: m ALIEN: 93 HEXCOLOR: ffffff COLOR: green NAN: 1234 CHAR: m ALIEN: 93
2drop 2drop drop 2drop 2drop drop
PRIMITIVE: one ( a -- b )
PRIMITIVE: two ( c -- d )