@@ -25,23 +25,23 @@ internal object SyntaxTokens {
25
25
strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while
26
26
""" .trimIndent().split(" ," )
27
27
28
- // TODO Finish kotlin keywords
29
28
val KOTLIN_KEYWORDS = """
30
- abstract,annotation,as,break,by,catch,class,companion,const,constructor,continue,coroutine,
31
- do,else,enum,false,final,finally,for,fun,get,if,import,in,!in,interface,internal,is,!is,
32
- lateinit,native,null,object,override,package,private,protected,public,reified,return,set,
33
- super,suspend,this,throw,true,try,typealias,typeof,val,var,when,while,yield
29
+ actual,abstract,annotation,as,as?,break,by,catch,class,companion,const,constructor,continue,
30
+ coroutine,crossinline,data,delegate,dynamic,do,else,enum,expect,external,false,final,
31
+ finally,for,fun,get,if,import,in,!in,infix,inline,interface,internal,is,!is,lazy,lateinit,
32
+ native,null,object,open,operator,out,override,package,private,protected,public,reified,
33
+ return,sealed,set,super,suspend,tailrec,this,throw,true,try,typealias,typeof,val,var,vararg,
34
+ when,while,yield
34
35
""" .trimIndent()
35
36
36
37
37
- (" as,as?,fun,in,!in,is,!is,object,typealias,val,var,when,by,constructor,delegate,dynamic,"
38
- + " file,get,init,set,value,where,actual,annotation,companion,crossinline,data,enum,expect,"
39
- + " external,field,infix,inline,inner,internal,lateinit,noinline,open,operator,out,override,"
40
- + " reified,sealed,suspend,tailrec,vararg" ).split(" ," )
41
-
42
- val RUST_KEYWORDS = FLOW_CONTROL_KEYWORDS + (" as,assert,const,copy,drop,"
43
- + " enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,"
44
- + " pub,pure,ref,self,static,struct,true,trait,type,unsafe,use" ).split(" ," )
38
+ val RUST_KEYWORDS =
39
+ """
40
+ as,async,await,break,const,continue,crate,dyn,else,enum,extern,false,fn,for,if,impl,in,let,
41
+ loop,match,mod,move,mut,pub,ref,return,Self,self,static,struct,super,trait,true,type,union,
42
+ unsafe,use,where,while,abstract,become,box,do,final,macro,override,priv,try,typeof,
43
+ unsized,virtual,yield
44
+ """ .trimIndent().split(" ," )
45
45
46
46
val CSHARP_KEYWORDS = JAVA_KEYWORDS +
47
47
(" as,base,by,checked,decimal,delegate,descending,dynamic,event,"
@@ -95,37 +95,46 @@ internal object SyntaxTokens {
95
95
+ SH_KEYWORDS + SWIFT_KEYWORDS )
96
96
97
97
val ALL_MIXED_KEYWORDS : List <String > =
98
- """ #available #column #define #defined #elif #else #else#elseif #endif #error #file #function
99
- #if #ifdef #ifndef #include #line #pragma #selector #undef abstract add after alias
100
- alignas alignof and and_eq andalso as ascending asm assert associatedtype associativity
101
- async atomic_cancel atomic_commit atomic_noexcept auto await base become begin bitand
102
- bitor bnot bor box break bsl bsr bxor case catch chan
103
- checked class compl concept cond const const_cast constexpr continue convenience
104
- covariant crate debugger decltype def default defer deferred defined? deinit
105
- del delegate delete descending didset div do dynamic dynamic_cast dynamictype
106
- elif else elseif elsif end ensure eval event except explicit export extends extension
107
- extern external factory fallthrough false final finally fixed fn for foreach friend
108
- from fun func function get global go goto group guard if impl implements implicit import
109
- in indirect infix init inline inout instanceof interface internal into is join lambda
110
- lazy left let library local lock long loop macro map match mod module move mut mutable
111
- mutating namespace native new next nil noexcept none nonlocal nonmutating not not_eq
112
- null nullptr object of offsetof operator optional or or_eq orderby orelse out override
113
- package params part partial pass postfix precedence prefix priv private proc protected
114
- protocol pub public pure raise range readonly receive redo ref register reinterpret_cast
115
- rem remove repeat required requires rescue rethrow rethrows retry return right sbyte
116
- sealed select self set short signed sizeof stackalloc static static_assert static_cast
117
- strictfp struct subscript super switch sync synchronized template then this
118
- thread_local throw throws trait transaction_safe transaction_safe_dynamic transient
119
- true try type typealias typedef typeid typename typeof uint ulong unchecked undef
120
- union unless unowned unsafe unsigned unsized until use ushort using value var virtual
121
- void volatile wchar_t weak when where while willset with xor xor_eq xorauto yield
122
- yieldabstract yieldarguments val list override get set as as? in !in !is is by
123
- constructor delegate dynamic field file init param property receiver setparam data
124
- data expect lateinit crossinline companion annotation actual noinline open reified
125
- suspend tailrec vararg it constraint alter column table all any asc backup database
126
- between check create index replace view procedure unique desc distinct drop exec
127
- exists foreign key full outer having inner insert like limit order primary rownum
128
- top truncate update values"""
98
+ """ #available #column #define #defined #elif #else #else#elseif #endif #error #file #function
99
+ #if #ifdef #ifndef #include #line #pragma #selector #undef abstract add after alias
100
+ alignas alignof and and_eq andalso as ascending asm assert associatedtype associativity
101
+ async atomic_cancel atomic_commit atomic_noexcept auto await base become begin bitand
102
+ bitor bnot bor box break bsl bsr bxor case catch chan
103
+ checked
104
+ class compl concept cond const const_cast constexpr continue convenience
105
+ covariant crate debugger decltype def default defer deferred defined? deinit
106
+ del delegate delete descending didset div do dynamic dynamic_cast dynamictype
107
+ elif else elseif elsif end ensure eval event except explicit export extends extension
108
+ extern external factory fallthrough false final finally fixed fn for foreach friend
109
+ from
110
+ fun func function get global go goto group guard if impl implements implicit import
111
+ in indirect infix init inline inout instanceof
112
+ interface internal into is join lambda
113
+ lazy left let library local lock long loop macro map match mod module move mut mutable
114
+ mutating namespace native new next nil noexcept none nonlocal nonmutating not not_eq
115
+ null nullptr
116
+ object of offsetof operator optional or or_eq orderby orelse out override
117
+ package params part partial pass postfix precedence prefix priv private proc protected
118
+ protocol pub public pure raise range readonly receive redo ref register reinterpret_cast
119
+ rem remove repeat required requires rescue rethrow rethrows retry return right sbyte
120
+ sealed select self set short signed sizeof stackalloc static static_assert static_cast
121
+ strictfp struct subscript super switch sync synchronized template then this
122
+ thread_local throw throws trait transaction_safe transaction_safe_dynamic transient
123
+ true try type
124
+ typealias typedef typeid typename typeof uint ulong unchecked undef
125
+ union unless unowned unsafe unsigned unsized until use ushort using
126
+ value var virtual
127
+ void volatile wchar_t weak when where while willset with xor xor_eq xorauto yield
128
+ yieldabstract yieldarguments
129
+ val list
130
+ override get
131
+ setas as? in !in !is is by
132
+ constructor delegate dynamic field file init param property receiver setparam data
133
+ data expect lateinit crossinline companion annotation actual noinline open reified
134
+ suspend tailrec vararg it constraint alter column table all any asc backup database
135
+ between check create index replace view procedure unique desc distinct drop exec
136
+ exists foreign key full outer having inner insert like limit order primary rownum
137
+ top truncate update values"""
129
138
.split(" " )
130
139
131
140
// TODO Migrate to list of chars
@@ -138,4 +147,6 @@ internal object SyntaxTokens {
138
147
val MULTILINE_COMMENT_DELIMITERS = listOf (Pair (" /*" , " */" ))
139
148
val PUNCTUATION_CHARACTERS = listOf (" ," , " ." , " :" , " ;" )
140
149
val MARK_CHARACTERS = listOf (" (" , " )" , " =" , " {" , " }" , " <" , " >" , " -" , " +" , " [" , " ]" , " |" , " &" )
141
- }
150
+ }
151
+
152
+
0 commit comments