-
Notifications
You must be signed in to change notification settings - Fork 0
/
Aya.yml
67 lines (65 loc) · 1.79 KB
/
Aya.yml
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
63
64
65
66
67
#
# Syntax highlighting for Aya, used by GitHub
#
scopeName: source.aya
name: Aya
fileTypes:
- aya
patterns:
- # Line comments
begin: '//'
end: '$'
name: comment.line.double-dash.aya
- # Block comments
begin: '/*'
end: '*/'
name: comment.block.aya
- # Names of inductive types/class/constructors
match: '(inductive|open[[:space:]]+inductive|class|extends|new)[[:space:]]+([^:,;\\\(\){}@"[:space:]]+)'
captures:
'1':
name: keyword.other.aya
'2':
name: entity.name.type.aya
- # Names of module/import
match: '(open[[:space:]]+import|open(?![[:space:]]inductive)|module|import)[[:space:]]+([^:,;\\\(\){}@"[:space:]]+)'
captures:
'1':
name: keyword.other.aya
'2':
name: support.other
- # Name of functions
match: '(def|prim)[[:space:]]+(inline|opaque|overlap)?[[:space:]]+([^:;\\\(\){}@"[:space:]]+)'
captures:
'1':
name: keyword.other.aya
'1':
name: keyword.other.aya
'3':
name: entity.name.function.aya
- # Generalize
match: '(variable)[[:space:]]+(([^:,;\\\(\){}@"[:space:]]+([[:space:]]*,[[:space:]]*)?)+)[[:space:]]*\:[[:space:]]*([^:,;\\\(\){}@"[:space:]]+)'
captures:
'1':
name: keyword.other.aya
'2':
name: entity.name.aya
'5':
name: entity.name.type.aya
- # Other keywords
match: '\b(example|looser|tighter|open|Sig|Fn|fn|do|elim|match|infix|infixl|infixr|fixl|fixr|Type|Set|Prop|ISet|as|public|private|using|hiding|coerce|inline)\b'
name: keyword.other.aya
- # Space-sensitive symbols
match: '=>|->|:=|\*\*|\|'
name: keyword.other.aya
- # Space-insensitive symbols
match: ',|\\|↑|Σ|∀|→|←|⇒|⦇|⦈'
name: keyword.other.aya
- # String literals
begin: '"'
end: '"'
name: string.quoted.double.aya
- # Numeric literals
match: '\b-?\d+\b'
name: constant.numeric.aya
# End