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

View File

@ -89,9 +89,15 @@ STRUCT: timeval
{ sec 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-ALIAS: test int bah ( int* ah, int[] eh )
HEXCOLOR: ffffff COLOR: green NAN: 1234 CHAR: m ALIEN: 93
2drop 2drop drop
PRIMITIVE: one ( a -- b )
PRIMITIVE: two ( c -- d )