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