| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2817588 commit a757708
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -298,9 +298,9 @@ scopes: | |||
| 298 | 298 | method_reference > identifier, | |
| 299 | 299 | method_invocation > identifier | |
| 300 | 300 | ''': [ | |
| 301 | - {match: '^[A-Z][A-Z_]+$', scopes: 'constant.other'}, | ||
| 301 | + {match: '^[A-Z][A-Z0-9_\\$]+$', scopes: 'constant.other'}, | ||
| 302 | 302 | {match: '^[A-Z]', scopes: 'storage.type'} | |
| 303 | 303 | ] | |
| 304 | 304 | 'identifier': [ | |
| 305 | - {match: '^[A-Z][A-Z_]+$', scopes: 'constant.other'} | ||
| 305 | + {match: '^[A-Z][A-Z0-9_\\$]+$', scopes: 'constant.other'} | ||
| 306 | 306 | ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -246,12 +246,18 @@ describe 'Tree-sitter based Java grammar', -> | |||
| 246 | 246 | a = CONSTANT + obj.func(); | |
| 247 | 247 | b = conf.get(CONSTANT_ANOTHER); | |
| 248 | 248 | c = Integer.MAX_VALUE; | |
| 249 | + d = A1_B2_C3; | ||
| 250 | + e = A1_B2_C$; | ||
| 251 | + f = Test.A1_B2_C3; | ||
| 249 | 252 | ''' | |
| 250 | 253 | ||
| 251 | 254 | expect(tokens[0][2]).toEqual value: 'CONSTANT_STR', scopes: ['source.java', 'constant.other'] | |
| 252 | 255 | expect(tokens[1][3]).toEqual value: 'CONSTANT', scopes: ['source.java', 'constant.other'] | |
| 253 | 256 | expect(tokens[2][6]).toEqual value: 'CONSTANT_ANOTHER', scopes: ['source.java', 'constant.other'] | |
| 254 | 257 | expect(tokens[3][5]).toEqual value: 'MAX_VALUE', scopes: ['source.java', 'constant.other'] | |
| 258 | + expect(tokens[4][3]).toEqual value: 'A1_B2_C3', scopes: ['source.java', 'constant.other'] | ||
| 259 | + expect(tokens[5][3]).toEqual value: 'A1_B2_C$', scopes: ['source.java', 'constant.other'] | ||
| 260 | + expect(tokens[6][5]).toEqual value: 'A1_B2_C3', scopes: ['source.java', 'constant.other'] | ||
| 255 | 261 | ||
| 256 | 262 | it 'tokenizes reserved keywords', -> | |
| 257 | 263 | tokens = tokenizeLine 'const value;' | |
| Back | FazBrowse Home | New Git URL |
0 commit comments