|
19 | 19 | return set |
20 | 20 | } |
21 | 21 |
|
22 | | - var keywords = wordSet(["var","let","class","deinit","enum","extension","func","import","init","protocol", |
23 | | - "static","struct","subscript","typealias","as","dynamicType","is","new","super", |
24 | | - "self","Self","Type","__COLUMN__","__FILE__","__FUNCTION__","__LINE__","break","case", |
25 | | - "continue","default","do","else","fallthrough","if","in","for","return","switch", |
26 | | - "where","while","associativity","didSet","get","infix","inout","left","mutating", |
27 | | - "none","nonmutating","operator","override","postfix","precedence","prefix","right", |
28 | | - "set","unowned","weak","willSet"]) |
29 | | - var definingKeywords = wordSet(["var","let","class","enum","extension","func","import","protocol","struct", |
30 | | - "typealias","dynamicType","for"]) |
31 | | - var atoms = wordSet(["Infinity","NaN","undefined","null","true","false","on","off","yes","no","nil","null", |
32 | | - "this","super"]) |
33 | | - var types = wordSet(["String","bool","int","string","double","Double","Int","Float","float","public", |
34 | | - "private","extension"]) |
35 | | - var operators = "+-/*%=|&<>#" |
| 22 | + var keywords = wordSet(["_","var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype", |
| 23 | + "open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super", |
| 24 | + "convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is", |
| 25 | + "break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while", |
| 26 | + "defer","return","inout","mutating","nonmutating","catch","do","rethrows","throw","throws","try","didSet","get","set","willSet", |
| 27 | + "assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right", |
| 28 | + "Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"]) |
| 29 | + var definingKeywords = wordSet(["var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype"]) |
| 30 | + var atoms = wordSet(["true","false","nil","self","super","_"]) |
| 31 | + var types = wordSet(["Array","Bool","Dictionary","Double","Float","Int","Never","Optional","String","Void"]) |
| 32 | + var operators = "+-/*%=|&<>" |
36 | 33 | var punc = ";,.(){}[]" |
37 | 34 | var number = /^-?(?:(?:[\d_]+\.[_\d]*|\.[_\d]+|0o[0-7_\.]+|0b[01_\.]+)(?:e-?[\d_]+)?|0x[\d_a-f\.]+(?:p-?[\d_]+)?)/i |
38 | 35 | var identifier = /^[_A-Za-z$][_A-Za-z$0-9]*/ |
39 | | - var property = /^[@\.][_A-Za-z$][_A-Za-z$0-9]*/ |
| 36 | + var property = /^[@\#\.][_A-Za-z$][_A-Za-z$0-9]*/ |
40 | 37 | var regexp = /^\/(?!\s)(?:\/\/)?(?:\\.|[^\/])+\// |
41 | 38 |
|
42 | 39 | function tokenBase(stream, state, prev) { |
|
0 commit comments