Fixed: keyword can't be colored
modified: demo/kitchen-sink/docs/scheme.scheme * fix typo modified: lib/ace/mode/scheme_highlight_rules.js * remove '() since it's hard to parse and trivious for coloring. * keyword and constant coloring fine now.
This commit is contained in:
parent
7fbd7395b3
commit
67b1b25469
2 changed files with 7 additions and 7 deletions
|
|
@ -8,7 +8,7 @@
|
|||
)
|
||||
;; second line comment
|
||||
'(+ 1 2)
|
||||
(define-sytax get-line
|
||||
(define-syntax get-line
|
||||
(syntax-rules ()
|
||||
((_ x) x))) ; nonsense, just a highlight test
|
||||
(position-if-not char-set:whitespace line #:start beg))
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|||
|
||||
var SchemeHighlightRules = function() {
|
||||
var keywordControl = "case|do|let|loop|if|else|when";
|
||||
var keywordOperator = "eq?|eqv?|equal?|and|or|not";
|
||||
var constantLanguage = "#t|#f|'()";
|
||||
var keywordOperator = "eq?|eqv?|equal?|and|or|not|null?";
|
||||
var constantLanguage = "#t|#f";
|
||||
var supportFunctions = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load";
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
|
|
@ -68,7 +68,7 @@ var SchemeHighlightRules = function() {
|
|||
},
|
||||
{
|
||||
"token": ["punctuation.definition.constant.character.scheme", "constant.character.scheme"],
|
||||
"regex": "(#)((?:\\w|[\\\\+-=<>'\"&#])+)"
|
||||
"regex": "#:[^ ]+"
|
||||
},
|
||||
{
|
||||
"token": ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"],
|
||||
|
|
@ -76,15 +76,15 @@ var SchemeHighlightRules = function() {
|
|||
},
|
||||
{
|
||||
"token" : "constant.numeric", // hex
|
||||
"regex" : "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||
"regex" : "#[xXoObB][0-9a-fA-F]+"
|
||||
},
|
||||
{
|
||||
"token" : "constant.numeric", // float
|
||||
"regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||
"regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"
|
||||
},
|
||||
{
|
||||
"token" : keywordMapper,
|
||||
"regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
"regex" : "[a-zA-Z_#][a-zA-Z0-9_\\?\\!\\*]*"
|
||||
},
|
||||
{
|
||||
"token" : "string",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue