@@ -43,10 +43,62 @@ def getTokenHeader(self):
43
43
return ['scope_name' , 'str' , 'start' , 'end' ]
44
44
45
45
def getTokens (self ):
46
- selectors = ["comment" , "constant" , "entity" , "interpolated" , "keyword" , "meta" , "punctuation" , "source" , "storage" , "string" , "support" , "variable" ]
46
+ selectors = [
47
+ "comment.block" ,
48
+ "comment.documentation.embedded" ,
49
+ "comment.line.number-sign" ,
50
+ "constant.character.escape" ,
51
+ "constant.language" ,
52
+ "constant.numeric.hexadecimal" ,
53
+ "constant.numeric.scientific" ,
54
+ "constant.string.documentation" ,
55
+ "entity.name" ,
56
+ "entity.name.function.invocation" ,
57
+ "entity.other" ,
58
+ "entity.other.attribute-name" ,
59
+ "entity.other.attribute.parameter" ,
60
+ "interpolated.complex.source" ,
61
+ "interpolated.simple.source" ,
62
+ "keyword.control" ,
63
+ "keyword.operator.assignment" ,
64
+ "keyword.operator.bitwise" ,
65
+ "keyword.operator.comparison" ,
66
+ "keyword.operator.documentation" ,
67
+ "keyword.operator.logical" ,
68
+ "keyword.operator.math" ,
69
+ "keyword.operator.other" ,
70
+ "keyword.operator.range" ,
71
+ "keyword.operator.redirection" ,
72
+ "keyword.operator.string-format" ,
73
+ "keyword.operator.unary" ,
74
+ "keyword.other" ,
75
+ "keyword.other.statement-separator" ,
76
+ "meta" ,
77
+ "meta.group.array-expression" ,
78
+ "meta.group.complex.subexpression" ,
79
+ "meta.scriptblock" ,
80
+ "punctuation.end.definition.comment.block" ,
81
+ "punctuation.start.definition.comment.block" ,
82
+ "source" ,
83
+ "storage" ,
84
+ "storage.modifier.scope" ,
85
+ "string.quoted.double" ,
86
+ "string.quoted.double.heredoc" ,
87
+ "string.quoted.single" ,
88
+ "string.quoted.single.heredoc" ,
89
+ "support.constant" ,
90
+ "support.constant.variable" ,
91
+ "support.function" ,
92
+ "support.variable.automatic" ,
93
+ "support.variable.drive" ,
94
+ "variable.language" ,
95
+ "variable.other" ,
96
+ "variable.other.normal" ,
97
+ "variable.other.readwrite" ,
98
+ ]
47
99
tokens = []
48
100
for selector in selectors :
49
101
regions = self .view .find_by_selector (selector )
50
102
for region in regions :
51
- tokens += [{ 'scope_name' : selector , 'str' : 'foo' , 'start' : region .a , 'end' : region .b }]
103
+ tokens += [{ 'scope_name' : selector , 'str' : self . view . substr ( region ) , 'start' : region .a , 'end' : region .b }]
52
104
return tokens
0 commit comments