Merge branch 'emacs' of http://git.hacks-galore.org/jao/factor into new_ui
commit
3930efe0a0
|
@ -69,13 +69,15 @@ M: integer fuel-pprint pprint ; inline
|
|||
|
||||
M: string fuel-pprint pprint ; inline
|
||||
|
||||
M: sequence fuel-pprint
|
||||
"(" write [ " " write ] [ fuel-pprint ] interleave ")" write ; inline
|
||||
: fuel-pprint-sequence ( seq open close -- )
|
||||
[ write ] dip swap [ " " write ] [ fuel-pprint ] interleave write ; inline
|
||||
|
||||
M: sequence fuel-pprint "(" ")" fuel-pprint-sequence ; inline
|
||||
|
||||
M: quotation fuel-pprint "[" "]" fuel-pprint-sequence ; inline
|
||||
|
||||
M: tuple fuel-pprint tuple>array fuel-pprint ; inline
|
||||
|
||||
M: quotation fuel-pprint pprint ; inline
|
||||
|
||||
M: continuation fuel-pprint drop ":continuation" write ; inline
|
||||
|
||||
M: restart fuel-pprint name>> fuel-pprint ; inline
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
((comment comment "comments")
|
||||
(constructor type "constructors (<foo>)")
|
||||
(constant constant "constants and literal values")
|
||||
(number constant "integers and floats")
|
||||
(ratio constant "ratios")
|
||||
(declaration keyword "declaration words")
|
||||
(parsing-word keyword "parsing words")
|
||||
(setter-word function-name "setter words (>>foo)")
|
||||
|
@ -80,7 +82,9 @@
|
|||
(,fuel-syntax--alias-definition-regex (1 'factor-font-lock-word)
|
||||
(2 'factor-font-lock-word))
|
||||
(,fuel-syntax--int-constant-def-regex 2 'factor-font-lock-constant)
|
||||
(,fuel-syntax--number-regex . 'factor-font-lock-constant)
|
||||
(,fuel-syntax--integer-regex . 'factor-font-lock-number)
|
||||
(,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--method-definition-regex (1 'factor-font-lock-type-name)
|
||||
(2 'factor-font-lock-word))
|
||||
|
|
|
@ -373,10 +373,10 @@
|
|||
(let ((heading `($heading ,(match-string-no-properties 0)))
|
||||
(rows))
|
||||
(forward-line)
|
||||
(when (looking-at "Word *Stack effect$")
|
||||
(push '("Word" "Stack effect") rows)
|
||||
(when (looking-at "Word *\\(Stack effect\\|Syntax\\)$")
|
||||
(push (list "Word" (match-string-no-properties 1)) rows)
|
||||
(forward-line))
|
||||
(while (looking-at "\\(.+?\\)\\( +\\(( .*\\)\\)?$")
|
||||
(while (looking-at "\\(.+?\\)\\( +\\(.+\\)\\)?$")
|
||||
(let ((word `($link ,(match-string-no-properties 1)
|
||||
,(match-string-no-properties 1)
|
||||
word))
|
||||
|
|
|
@ -84,8 +84,14 @@
|
|||
(defconst fuel-syntax--method-definition-regex
|
||||
"^M: +\\([^ ]+\\) +\\([^ ]+\\)")
|
||||
|
||||
(defconst fuel-syntax--number-regex
|
||||
"\\(\\+\\|-\\)?\\([0-9]+\\.?[0-9]*\\|\\.[0-9]+\\)\\([eE]\\(\\+\\|-\\)?[0-9]+\\)?")
|
||||
(defconst fuel-syntax--integer-regex
|
||||
"\\_<-?[0-9]+\\_>")
|
||||
|
||||
(defconst fuel-syntax--ratio-regex
|
||||
"\\_<-?\\([0-9]+\\+\\)?[0-9]+/-?[0-9]+\\_>")
|
||||
|
||||
(defconst fuel-syntax--float-regex
|
||||
"\\_<-?[0-9]+\\.[0-9]*\\([eE]-?[0-9]+\\)?\\_>")
|
||||
|
||||
(defconst fuel-syntax--word-definition-regex
|
||||
(fuel-syntax--second-word-regex
|
||||
|
|
Loading…
Reference in New Issue