-
Notifications
You must be signed in to change notification settings - Fork 0
/
dylan.syntax
62 lines (62 loc) · 4.02 KB
/
dylan.syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
name: Dylan
fileTypes:
- dylan
scopeName: source.dylan
uuid: 475B8369-3520-4B4C-BBA1-1D1229C6F397
foldingStartMarker: \b(define|begin|block)\b
patterns:
- name: comment.block.dylan
captures:
"0":
name: punctuation.definition.comment.dylan
begin: /\*
end: \*/
comment: TODO -- Dylan allows nested comments.
- name: comment.line.double-slash.dylan
begin: //
beginCaptures:
"0":
name: punctuation.definition.comment.dylan
end: $\n?
patterns:
- name: punctuation.separator.continuation.dylan
match: (?>\\\s*\n)
- name: meta.function.dylan
captures:
"1":
name: keyword.control.def.dylan
"2":
name: storage.modifier.dylan
"3":
name: storage.type.function.dylan
"4":
name: entity.name.function.dylan
begin: \b(define\s+)((?:sealed|inline)\s)?(method|function)\s+([A-Za-z0-9\\-]*[!?]?)\s
end: \)
- name: keyword.control.dylan
match: \b(?<!-)(begin|block|case|class|constant|define|domain|else|end|for|function|handler|if|inline|let|library|local|macro|method|module|otherwise|select|unless|until|variable|when|while)(?![:-])\b
- name: support.constant.language.dylan
match: (#t|#f|#next|#rest|#key|#all-keys|#include)
- name: keyword.control.sealing-directives.dylan
match: \b(sealed|open|abstract|concrete|primary|free)\b
- name: constant.numeric.dylan
match: \b((#x[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b
- name: string.quoted.double.dylan
endCaptures:
"0":
name: punctuation.definition.string.end.dylan
begin: "\""
beginCaptures:
"0":
name: punctuation.definition.string.begin.dylan
end: "\""
patterns:
- name: constant.character.escape.dylan
match: \\.
- name: support.class.dylan
match: <(abort|array|boolean|byte-string|character|class|collection|complex|condition|deque|double-float|empty-list|error|explicit-key-collection|extended-float|float|function|generic-function|integer|list|method|mutable-collection|mutable-explicit-key-collection|mutable-sequence|number|object-table|object|pair|range|rational|real|restart|sealed-object-error|sequence|serious-condition|simple-error|simple-object-vector|simple-restart|simple-vector|simple-warning|single-float|singleton|stretchy-collection|stretchy-vector|string|symbol|table|type-error|type|unicode-string|vector|warning)>
- name: support.function.dylan
match: \b(?<!-)(abort|abs|add|add!|add-method|add-new|add-new!|all-superclasses|always|any?|applicable-method?|apply|aref|aref-setter|as|as-lowercase|as-lowercase!|as-uppercase|as-uppercase!|ash|backward-iteration-protocol|break|ceiling|ceiling/|cerror|check-type|choose|choose-by|complement|compose|concatenate|concatenate-as|condition-format-arguments|condition-format-string|conjoin|copy-sequence|curry|default-handler|dimension|dimensions|direct-subclasses|direct-superclasses|disjoin|do|do-handlers|element|element-setter|empty?|error|even?|every?|fill!|find-key|find-method|first|first-setter|floor|floor/|forward-iteration-protocol|function-arguments|function-return-values|function-specializers|gcd|generic-function-mandatory-|keywords|generic-function-methods|head|head-setter|identity|initialize|instance?|integral?|intersection|key-sequence|key-test|last|last-setter|lcm|limited|list|logand|logbit?|logior|lognot|logxor|make|map|map-as|map-into|max|member?|merge-hash-codes|min|modulo|negative|negative?|object-class|object-hash|odd?|pair|pop|pop-last|positive?|push|push-last|range|rank|rcurry|reduce|reduce1|remainder|remove|remove!|remove-duplicates|remove-duplicates!|remove-key!|remove-method|replace-elements!|replace-subsequence!|restart-query|return-allowed?|return-description|return-query|reverse|reverse!|round|round/|row-major-index|second|second-setter|shallow-copy|signal|singleton|size|size-setter|slot-initialized?|sort|sort!|sorted-applicable-methods|subsequence-position|subtype?|table-protocol|tail|tail-setter|third|third-setter|truncate|truncate/|type-error-expected-type|type-error-value|type-for-copy|type-union|union|values|vector|zero?)(?![:-])\b
foldingStopMarker: \bend\b
keyEquivalent: ^~D