Guest User

Untitled

a guest
Oct 23rd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.44 KB | None | 0 0
  1. {
  2. "fileTypes": [
  3. "java",
  4. "bsh"
  5. ],
  6. "name": "Java",
  7. "patterns": [
  8. {
  9. "captures": {
  10. "1": {
  11. "name": "keyword.other.package.java"
  12. },
  13. "2": {
  14. "name": "storage.modifier.package.java"
  15. },
  16. "3": {
  17. "name": "punctuation.terminator.java"
  18. }
  19. },
  20. "match": "^\\s*(package)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?",
  21. "name": "meta.package.java"
  22. },
  23. {
  24. "begin": "(import static)\\b\\s*",
  25. "beginCaptures": {
  26. "1": {
  27. "name": "keyword.other.import.static.java"
  28. }
  29. },
  30. "captures": {
  31. "1": {
  32. "name": "keyword.other.import.java"
  33. },
  34. "2": {
  35. "name": "storage.modifier.import.java"
  36. },
  37. "3": {
  38. "name": "punctuation.terminator.java"
  39. }
  40. },
  41. "contentName": "storage.modifier.import.java",
  42. "end": "\\s*(?:$|(;))",
  43. "endCaptures": {
  44. "1": {
  45. "name": "punctuation.terminator.java"
  46. }
  47. },
  48. "name": "meta.import.java",
  49. "patterns": [
  50. {
  51. "match": "\\.",
  52. "name": "punctuation.separator.java"
  53. },
  54. {
  55. "match": "\\s",
  56. "name": "invalid.illegal.character_not_allowed_here.java"
  57. }
  58. ]
  59. },
  60. {
  61. "begin": "(import)\\b\\s*",
  62. "beginCaptures": {
  63. "1": {
  64. "name": "keyword.other.import.java"
  65. }
  66. },
  67. "captures": {
  68. "1": {
  69. "name": "keyword.other.import.java"
  70. },
  71. "2": {
  72. "name": "storage.modifier.import.java"
  73. },
  74. "3": {
  75. "name": "punctuation.terminator.java"
  76. }
  77. },
  78. "contentName": "storage.modifier.import.java",
  79. "end": "\\s*(?:$|(;))",
  80. "endCaptures": {
  81. "1": {
  82. "name": "punctuation.terminator.java"
  83. }
  84. },
  85. "name": "meta.import.java",
  86. "patterns": [
  87. {
  88. "match": "\\.",
  89. "name": "punctuation.separator.java"
  90. },
  91. {
  92. "match": "\\s",
  93. "name": "invalid.illegal.character_not_allowed_here.java"
  94. }
  95. ]
  96. },
  97. {
  98. "include": "#code"
  99. }
  100. ],
  101. "repository": {
  102. "all-types": {
  103. "patterns": [
  104. {
  105. "include": "#primitive-arrays"
  106. },
  107. {
  108. "include": "#primitive-types"
  109. },
  110. {
  111. "include": "#object-types"
  112. }
  113. ]
  114. },
  115. "annotations": {
  116. "patterns": [
  117. {
  118. "begin": "(@[^ (]+)(\\()",
  119. "beginCaptures": {
  120. "1": {
  121. "name": "storage.type.annotation.java"
  122. },
  123. "2": {
  124. "name": "punctuation.definition.annotation-arguments.begin.java"
  125. }
  126. },
  127. "end": "(\\))",
  128. "endCaptures": {
  129. "1": {
  130. "name": "punctuation.definition.annotation-arguments.end.java"
  131. }
  132. },
  133. "name": "meta.declaration.annotation.java",
  134. "patterns": [
  135. {
  136. "captures": {
  137. "1": {
  138. "name": "constant.other.key.java"
  139. },
  140. "2": {
  141. "name": "keyword.operator.assignment.java"
  142. }
  143. },
  144. "match": "(\\w*)\\s*(=)"
  145. },
  146. {
  147. "include": "#code"
  148. },
  149. {
  150. "match": ",",
  151. "name": "punctuation.separator.property.java"
  152. }
  153. ]
  154. },
  155. {
  156. "match": "@\\w*",
  157. "name": "storage.type.annotation.java"
  158. }
  159. ]
  160. },
  161. "anonymous-classes-and-new": {
  162. "begin": "\\bnew\\b",
  163. "beginCaptures": {
  164. "0": {
  165. "name": "keyword.control.new.java"
  166. }
  167. },
  168. "end": "(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)",
  169. "patterns": [
  170. {
  171. "begin": "(\\w+)\\s*(?=\\[)",
  172. "beginCaptures": {
  173. "1": {
  174. "name": "storage.type.java"
  175. }
  176. },
  177. "end": "(})|(?=\\s*(?:,|;|\\)))",
  178. "endCaptures": {
  179. "1": {
  180. "name": "punctuation.section.block.end.java"
  181. }
  182. },
  183. "patterns": [
  184. {
  185. "begin": "\\[",
  186. "end": "\\]",
  187. "patterns": [
  188. {
  189. "include": "#code"
  190. }
  191. ]
  192. },
  193. {
  194. "begin": "{",
  195. "beginCaptures": {
  196. "0": {
  197. "name": "punctuation.section.block.begin.java"
  198. }
  199. },
  200. "end": "(?=})",
  201. "patterns": [
  202. {
  203. "include": "#code"
  204. }
  205. ]
  206. }
  207. ]
  208. },
  209. {
  210. "begin": "(?=\\w.*\\()",
  211. "end": "(?<=\\))",
  212. "patterns": [
  213. {
  214. "include": "#object-types"
  215. },
  216. {
  217. "begin": "\\(",
  218. "beginCaptures": {
  219. "1": {
  220. "name": "storage.type.java"
  221. }
  222. },
  223. "end": "\\)",
  224. "patterns": [
  225. {
  226. "include": "#code"
  227. }
  228. ]
  229. }
  230. ]
  231. },
  232. {
  233. "begin": "{",
  234. "beginCaptures": {
  235. "0": {
  236. "name": "punctuation.section.inner-class.begin.java"
  237. }
  238. },
  239. "end": "}",
  240. "endCaptures": {
  241. "0": {
  242. "name": "punctuation.section.inner-class.end.java"
  243. }
  244. },
  245. "name": "meta.inner-class.java",
  246. "patterns": [
  247. {
  248. "include": "#class-body"
  249. }
  250. ]
  251. }
  252. ]
  253. },
  254. "assertions": {
  255. "patterns": [
  256. {
  257. "begin": "\\b(assert)\\s",
  258. "beginCaptures": {
  259. "1": {
  260. "name": "keyword.control.assert.java"
  261. }
  262. },
  263. "end": "$",
  264. "name": "meta.declaration.assertion.java",
  265. "patterns": [
  266. {
  267. "match": ":",
  268. "name": "keyword.operator.assert.expression-seperator.java"
  269. },
  270. {
  271. "include": "#code"
  272. }
  273. ]
  274. }
  275. ]
  276. },
  277. "class": {
  278. "begin": "(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum)\\s+\\w+)",
  279. "end": "}",
  280. "endCaptures": {
  281. "0": {
  282. "name": "punctuation.section.class.end.java"
  283. }
  284. },
  285. "name": "meta.class.java",
  286. "patterns": [
  287. {
  288. "include": "#storage-modifiers"
  289. },
  290. {
  291. "include": "#comments"
  292. },
  293. {
  294. "captures": {
  295. "1": {
  296. "name": "storage.modifier.java"
  297. },
  298. "2": {
  299. "name": "entity.name.type.class.java"
  300. }
  301. },
  302. "match": "(class|(?:@)?interface|enum)\\s+(\\w+)",
  303. "name": "meta.class.identifier.java"
  304. },
  305. {
  306. "begin": "extends",
  307. "beginCaptures": {
  308. "0": {
  309. "name": "storage.modifier.extends.java"
  310. }
  311. },
  312. "end": "(?={|implements)",
  313. "name": "meta.definition.class.inherited.classes.java",
  314. "patterns": [
  315. {
  316. "include": "#object-types-inherited"
  317. },
  318. {
  319. "include": "#comments"
  320. }
  321. ]
  322. },
  323. {
  324. "begin": "(implements)\\s",
  325. "beginCaptures": {
  326. "1": {
  327. "name": "storage.modifier.implements.java"
  328. }
  329. },
  330. "end": "(?=\\s*extends|\\{)",
  331. "name": "meta.definition.class.implemented.interfaces.java",
  332. "patterns": [
  333. {
  334. "include": "#object-types-inherited"
  335. },
  336. {
  337. "include": "#comments"
  338. }
  339. ]
  340. },
  341. {
  342. "begin": "{",
  343. "beginCaptures": {
  344. "0": {
  345. "name": "punctuation.section.class.begin.java"
  346. }
  347. },
  348. "end": "(?=})",
  349. "name": "meta.class.body.java",
  350. "patterns": [
  351. {
  352. "include": "#class-body"
  353. }
  354. ]
  355. }
  356. ]
  357. },
  358. "class-body": {
  359. "patterns": [
  360. {
  361. "include": "#comments"
  362. },
  363. {
  364. "include": "#class"
  365. },
  366. {
  367. "include": "#enums"
  368. },
  369. {
  370. "include": "#variables"
  371. },
  372. {
  373. "include": "#methods"
  374. },
  375. {
  376. "include": "#annotations"
  377. },
  378. {
  379. "include": "#storage-modifiers"
  380. },
  381. {
  382. "include": "#code"
  383. }
  384. ]
  385. },
  386. "code": {
  387. "patterns": [
  388. {
  389. "include": "#comments"
  390. },
  391. {
  392. "include": "#class"
  393. },
  394. {
  395. "begin": "{",
  396. "beginCaptures": {
  397. "0": {
  398. "name": "punctuation.section.block.begin.java"
  399. }
  400. },
  401. "end": "}",
  402. "endCaptures": {
  403. "0": {
  404. "name": "punctuation.section.block.end.java"
  405. }
  406. },
  407. "patterns": [
  408. {
  409. "include": "#code"
  410. }
  411. ]
  412. },
  413. {
  414. "include": "#assertions"
  415. },
  416. {
  417. "include": "#parens"
  418. },
  419. {
  420. "include": "#constants-and-special-vars"
  421. },
  422. {
  423. "include": "#anonymous-classes-and-new"
  424. },
  425. {
  426. "include": "#annotations"
  427. },
  428. {
  429. "include": "#keywords"
  430. },
  431. {
  432. "include": "#storage-modifiers"
  433. },
  434. {
  435. "include": "#method-call"
  436. },
  437. {
  438. "include": "#strings"
  439. },
  440. {
  441. "include": "#all-types"
  442. }
  443. ]
  444. },
  445. "comments": {
  446. "patterns": [
  447. {
  448. "captures": {
  449. "0": {
  450. "name": "punctuation.definition.comment.java"
  451. }
  452. },
  453. "match": "/\\*\\*/",
  454. "name": "comment.block.empty.java"
  455. },
  456. {
  457. "include": "text.html.javadoc"
  458. },
  459. {
  460. "include": "#comments-inline"
  461. }
  462. ]
  463. },
  464. "comments-inline": {
  465. "patterns": [
  466. {
  467. "begin": "/\\*",
  468. "captures": {
  469. "0": {
  470. "name": "punctuation.definition.comment.java"
  471. }
  472. },
  473. "end": "\\*/",
  474. "name": "comment.block.java"
  475. },
  476. {
  477. "begin": "(^[ \\t]+)?(?=//)",
  478. "beginCaptures": {
  479. "1": {
  480. "name": "punctuation.whitespace.comment.leading.java"
  481. }
  482. },
  483. "end": "(?!\\G)",
  484. "patterns": [
  485. {
  486. "begin": "//",
  487. "beginCaptures": {
  488. "0": {
  489. "name": "punctuation.definition.comment.java"
  490. }
  491. },
  492. "end": "\\n",
  493. "name": "comment.line.double-slash.java"
  494. }
  495. ]
  496. }
  497. ]
  498. },
  499. "constants-and-special-vars": {
  500. "patterns": [
  501. {
  502. "match": "\\b(true|false|null)\\b",
  503. "name": "constant.language.java"
  504. },
  505. {
  506. "match": "\\b(this|super)\\b",
  507. "name": "variable.language.java"
  508. },
  509. {
  510. "match": "\\b0[xX][0-9A-Fa-f]([0-9A-Fa-f_]*[0-9A-Fa-f])?[lL]?(?!\\w|\\.)",
  511. "name": "constant.numeric.hex.java"
  512. },
  513. {
  514. "match": "\\b0[0-7_]*[0-7][lL]?\\b",
  515. "name": "constant.numeric.octal.java"
  516. },
  517. {
  518. "match": "\\b0[bB][01]([01_]*[01])?[lL]?\\b",
  519. "name": "constant.numeric.binary.java"
  520. },
  521. {
  522. "match": "\\b(0|[1-9]([0-9_]*[0-9])?)[lL]?(?!\\w|\\.)",
  523. "name": "constant.numeric.integer.java"
  524. },
  525. {
  526. "match": "(?x)\n\t\t\t\t\t\t(?<!\\w)\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t\t(?>\n\t\t\t\t\t\t\t0[xX]\t\t\t\t\t\t\t\t\t# Start literal\n\t\t\t\t\t\t\t([0-9A-Fa-f]([0-9A-Fa-f_]*[0-9A-Fa-f])?)?\t\t\t\t\t\t# Optional Number\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<=[0-9A-Fa-f])\\.\t\t\t\t\t\t\t# A number must exist on\n\t\t\t\t\t\t | \\.(?=[0-9A-Fa-f])\t\t\t\t\t\t\t# one side of the decimal\n\t\t\t\t\t\t | (?<=[0-9A-Fa-f])\t\t\t\t\t\t\t\t# Decimal not required\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t([0-9A-Fa-f]([0-9A-Fa-f_]*[0-9A-Fa-f])?)?\t\t\t\t\t\t# Optional Number\n\t\t\t\t\t\t\t[pP]\t\t\t\t\t\t\t\t\t# Exponent Indicator\n\t\t\t\t\t\t\t[+-]?(0|[1-9]([0-9_]*[0-9])?)\t\t\t# Signed Integer\n\t\t\t\t\t\t\t[fFdD]?\t\t\t\t\t\t\t\t\t# Float Type Suffix\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?!\\w)\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t",
  527. "name": "constant.numeric.hex-float.java"
  528. },
  529. {
  530. "match": "(?x)\n\t\t\t\t\t\t(?<!\\w)\t\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t\t(?>\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(0|[1-9]([0-9_]*[0-9])?)\t\t\t\t# Leading digits\n\t\t\t\t\t\t\t\t(?=[eEfFdD.])\t\t\t\t\t\t\t# Allow for numbers without .\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<=[0-9])(?=[eEfFdD])\t\t\t\t\t# Allow for numbers without .\n\t\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t[0-9]([0-9_]*[0-9])?\t\t\t\t\t# Numbers after .\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t[eE][+-]?(0|[1-9]([0-9_]*[0-9])?)\t\t# Exponent\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t[fFdD]?\t\t\t\t\t\t\t\t\t\t# Float Type Suffix\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?!\\w)\t\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t",
  531. "name": "constant.numeric.float.java"
  532. },
  533. {
  534. "captures": {
  535. "1": {
  536. "name": "keyword.operator.dereference.java"
  537. }
  538. },
  539. "match": "(\\.)?\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b",
  540. "name": "constant.other.java"
  541. }
  542. ]
  543. },
  544. "enums": {
  545. "begin": "^(?=\\s*[A-Z0-9_]+\\s*({|\\(|,))",
  546. "end": "(?=;|})",
  547. "patterns": [
  548. {
  549. "begin": "\\w+",
  550. "beginCaptures": {
  551. "0": {
  552. "name": "constant.other.enum.java"
  553. }
  554. },
  555. "end": "(?=,|;|})",
  556. "name": "meta.enum.java",
  557. "patterns": [
  558. {
  559. "include": "#parens"
  560. },
  561. {
  562. "begin": "{",
  563. "beginCaptures": {
  564. "0": {
  565. "name": "punctuation.section.enum.begin.java"
  566. }
  567. },
  568. "end": "}",
  569. "endCaptures": {
  570. "0": {
  571. "name": "punctuation.section.enum.end.java"
  572. }
  573. },
  574. "patterns": [
  575. {
  576. "include": "#class-body"
  577. }
  578. ]
  579. }
  580. ]
  581. },
  582. {
  583. "include": "#comments"
  584. },
  585. {
  586. "include": "#annotations"
  587. }
  588. ]
  589. },
  590. "keywords": {
  591. "patterns": [
  592. {
  593. "match": "\\b(try|catch|finally|throw)\\b",
  594. "name": "keyword.control.catch-exception.java"
  595. },
  596. {
  597. "match": "\\?|:",
  598. "name": "keyword.control.ternary.java"
  599. },
  600. {
  601. "match": "\\b(return|break|case|continue|default|do|while|for|switch|if|else)\\b",
  602. "name": "keyword.control.java"
  603. },
  604. {
  605. "match": "\\b(instanceof)\\b",
  606. "name": "keyword.operator.java"
  607. },
  608. {
  609. "match": "(<<|>>>?|~|\\^)",
  610. "name": "keyword.operator.bitwise.java"
  611. },
  612. {
  613. "match": "((&|\\^|\\||<<|>>>?)=)",
  614. "name": "keyword.operator.assignment.bitwise.java"
  615. },
  616. {
  617. "match": "(===?|!=|<=|>=|<>|<|>)",
  618. "name": "keyword.operator.comparison.java"
  619. },
  620. {
  621. "match": "([+*/%-]=)",
  622. "name": "keyword.operator.assignment.arithmetic.java"
  623. },
  624. {
  625. "match": "(=)",
  626. "name": "keyword.operator.assignment.java"
  627. },
  628. {
  629. "match": "(\\-\\-|\\+\\+)",
  630. "name": "keyword.operator.increment-decrement.java"
  631. },
  632. {
  633. "match": "(\\-|\\+|\\*|\\/|%)",
  634. "name": "keyword.operator.arithmetic.java"
  635. },
  636. {
  637. "match": "(!|&&|\\|\\|)",
  638. "name": "keyword.operator.logical.java"
  639. },
  640. {
  641. "match": "(\\||&)",
  642. "name": "keyword.operator.bitwise.java"
  643. },
  644. {
  645. "match": "(?<=\\S)\\.(?=\\S)",
  646. "name": "keyword.operator.dereference.java"
  647. },
  648. {
  649. "match": ";",
  650. "name": "punctuation.terminator.java"
  651. }
  652. ]
  653. },
  654. "method-call": {
  655. "begin": "([\\w$]+)(\\()",
  656. "beginCaptures": {
  657. "1": {
  658. "name": "meta.method.java"
  659. },
  660. "2": {
  661. "name": "punctuation.definition.method-parameters.begin.java"
  662. }
  663. },
  664. "end": "\\)",
  665. "endCaptures": {
  666. "0": {
  667. "name": "punctuation.definition.method-parameters.end.java"
  668. }
  669. },
  670. "name": "meta.method-call.java",
  671. "patterns": [
  672. {
  673. "match": ",",
  674. "name": "punctuation.definition.seperator.parameter.java"
  675. },
  676. {
  677. "include": "#code"
  678. }
  679. ]
  680. },
  681. "methods": {
  682. "begin": "(?!new)(?=[\\w<].*\\s+)(?=([^=/]|/(?!/))+\\()",
  683. "end": "(})|(?=;)",
  684. "endCaptures": {
  685. "1": {
  686. "name": "punctuation.section.method.end.java"
  687. }
  688. },
  689. "name": "meta.method.java",
  690. "patterns": [
  691. {
  692. "include": "#storage-modifiers"
  693. },
  694. {
  695. "begin": "(\\w+)\\s*\\(",
  696. "beginCaptures": {
  697. "1": {
  698. "name": "entity.name.function.java"
  699. }
  700. },
  701. "end": "\\)",
  702. "name": "meta.method.identifier.java",
  703. "patterns": [
  704. {
  705. "include": "#parameters"
  706. },
  707. {
  708. "include": "#comments"
  709. }
  710. ]
  711. },
  712. {
  713. "begin": "<",
  714. "end": ">",
  715. "name": "storage.type.token.java",
  716. "patterns": [
  717. {
  718. "include": "#object-types"
  719. },
  720. {
  721. "begin": "<",
  722. "comment": "This is just to support <>'s with no actual type prefix",
  723. "end": ">|[^\\w\\s,\\[\\]<]",
  724. "name": "storage.type.generic.java"
  725. }
  726. ]
  727. },
  728. {
  729. "begin": "(?=\\w.*\\s+\\w+\\s*\\()",
  730. "end": "(?=\\w+\\s*\\()",
  731. "name": "meta.method.return-type.java",
  732. "patterns": [
  733. {
  734. "include": "#all-types"
  735. },
  736. {
  737. "include": "#comments"
  738. }
  739. ]
  740. },
  741. {
  742. "include": "#throws"
  743. },
  744. {
  745. "begin": "{",
  746. "beginCaptures": {
  747. "0": {
  748. "name": "punctuation.section.method.begin.java"
  749. }
  750. },
  751. "end": "(?=})",
  752. "name": "meta.method.body.java",
  753. "patterns": [
  754. {
  755. "include": "#code"
  756. }
  757. ]
  758. },
  759. {
  760. "include": "#comments"
  761. }
  762. ]
  763. },
  764. "object-types": {
  765. "patterns": [
  766. {
  767. "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)<",
  768. "end": ">|[^\\w\\s,\\?<\\[\\]]",
  769. "name": "storage.type.generic.java",
  770. "patterns": [
  771. {
  772. "include": "#object-types"
  773. },
  774. {
  775. "begin": "<",
  776. "comment": "This is just to support <>'s with no actual type prefix",
  777. "end": ">|[^\\w\\s,\\[\\]<]",
  778. "name": "storage.type.generic.java"
  779. }
  780. ]
  781. },
  782. {
  783. "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)",
  784. "end": "(?=[^\\]\\s])",
  785. "name": "storage.type.object.array.java",
  786. "patterns": [
  787. {
  788. "begin": "\\[",
  789. "end": "\\]",
  790. "patterns": [
  791. {
  792. "include": "#code"
  793. }
  794. ]
  795. }
  796. ]
  797. },
  798. {
  799. "captures": {
  800. "1": {
  801. "name": "keyword.operator.dereference.java"
  802. }
  803. },
  804. "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*\\b",
  805. "name": "storage.type.java"
  806. }
  807. ]
  808. },
  809. "object-types-inherited": {
  810. "patterns": [
  811. {
  812. "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)<",
  813. "end": ">|[^\\w\\s,<]",
  814. "name": "entity.other.inherited-class.java",
  815. "patterns": [
  816. {
  817. "include": "#object-types"
  818. },
  819. {
  820. "begin": "<",
  821. "comment": "This is just to support <>'s with no actual type prefix",
  822. "end": ">|[^\\w\\s,<]",
  823. "name": "storage.type.generic.java"
  824. }
  825. ]
  826. },
  827. {
  828. "captures": {
  829. "1": {
  830. "name": "keyword.operator.dereference.java"
  831. }
  832. },
  833. "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*",
  834. "name": "entity.other.inherited-class.java"
  835. }
  836. ]
  837. },
  838. "parameters": {
  839. "patterns": [
  840. {
  841. "match": "final",
  842. "name": "storage.modifier.java"
  843. },
  844. {
  845. "include": "#annotations"
  846. },
  847. {
  848. "include": "#primitive-arrays"
  849. },
  850. {
  851. "include": "#primitive-types"
  852. },
  853. {
  854. "include": "#object-types"
  855. },
  856. {
  857. "match": "\\w+",
  858. "name": "variable.parameter.java"
  859. }
  860. ]
  861. },
  862. "parens": {
  863. "begin": "\\(",
  864. "end": "\\)",
  865. "patterns": [
  866. {
  867. "include": "#code"
  868. }
  869. ]
  870. },
  871. "primitive-arrays": {
  872. "patterns": [
  873. {
  874. "match": "\\b(?:void|boolean|byte|char|short|int|float|long|double)(\\[\\])*\\b",
  875. "name": "storage.type.primitive.array.java"
  876. }
  877. ]
  878. },
  879. "primitive-types": {
  880. "patterns": [
  881. {
  882. "match": "\\b(?:void|boolean|byte|char|short|int|float|long|double)\\b",
  883. "name": "storage.type.primitive.java"
  884. }
  885. ]
  886. },
  887. "storage-modifiers": {
  888. "captures": {
  889. "1": {
  890. "name": "storage.modifier.java"
  891. }
  892. },
  893. "match": "\\b(public|private|protected|static|final|native|synchronized|volatile|abstract|threadsafe|transient)\\b"
  894. },
  895. "strings": {
  896. "patterns": [
  897. {
  898. "begin": "\"",
  899. "beginCaptures": {
  900. "0": {
  901. "name": "punctuation.definition.string.begin.java"
  902. }
  903. },
  904. "end": "\"",
  905. "endCaptures": {
  906. "0": {
  907. "name": "punctuation.definition.string.end.java"
  908. }
  909. },
  910. "name": "string.quoted.double.java",
  911. "patterns": [
  912. {
  913. "match": "\\\\.",
  914. "name": "constant.character.escape.java"
  915. }
  916. ]
  917. },
  918. {
  919. "begin": "'",
  920. "beginCaptures": {
  921. "0": {
  922. "name": "punctuation.definition.string.begin.java"
  923. }
  924. },
  925. "end": "'",
  926. "endCaptures": {
  927. "0": {
  928. "name": "punctuation.definition.string.end.java"
  929. }
  930. },
  931. "name": "string.quoted.single.java",
  932. "patterns": [
  933. {
  934. "match": "\\\\.",
  935. "name": "constant.character.escape.java"
  936. }
  937. ]
  938. }
  939. ]
  940. },
  941. "throws": {
  942. "begin": "throws",
  943. "beginCaptures": {
  944. "0": {
  945. "name": "storage.modifier.java"
  946. }
  947. },
  948. "end": "(?={|;)",
  949. "name": "meta.throwables.java",
  950. "patterns": [
  951. {
  952. "include": "#object-types"
  953. }
  954. ]
  955. },
  956. "values": {
  957. "patterns": [
  958. {
  959. "include": "#strings"
  960. },
  961. {
  962. "include": "#object-types"
  963. },
  964. {
  965. "include": "#constants-and-special-vars"
  966. }
  967. ]
  968. },
  969. "variables": {
  970. "applyEndPatternLast": 1,
  971. "patterns": [
  972. {
  973. "begin": "(?x:(?=\n (?:\n (?:private|protected|public|native|synchronized|volatile|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:(?:[a-z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n \\s+\n (?!private|protected|public|native|synchronized|volatile|abstract|threadsafe|transient|static|final|def|void|boolean|byte|char|short|int|float|long|double)\n [\\w\\d_<>\\[\\],\\?][\\w\\d_<>\\[\\],\\? \\t]*\n (?:=|$)\n \n\t\t\t\t\t))",
  974. "end": "(?=;)",
  975. "name": "meta.definition.variable.java",
  976. "patterns": [
  977. {
  978. "match": "\\s"
  979. },
  980. {
  981. "captures": {
  982. "1": {
  983. "name": "constant.other.variable.java"
  984. }
  985. },
  986. "match": "([A-Z_0-9]+)\\s+(?=\\=)"
  987. },
  988. {
  989. "captures": {
  990. "1": {
  991. "name": "meta.definition.variable.name.java"
  992. }
  993. },
  994. "match": "(\\w[^\\s,]*)\\s+(?=\\=)"
  995. },
  996. {
  997. "begin": "=",
  998. "beginCaptures": {
  999. "0": {
  1000. "name": "keyword.operator.assignment.java"
  1001. }
  1002. },
  1003. "end": "(?=;)",
  1004. "patterns": [
  1005. {
  1006. "include": "#code"
  1007. }
  1008. ]
  1009. },
  1010. {
  1011. "captures": {
  1012. "1": {
  1013. "name": "meta.definition.variable.name.java"
  1014. }
  1015. },
  1016. "match": "(\\w[^\\s=]*)(?=\\s*;)"
  1017. },
  1018. {
  1019. "include": "#code"
  1020. }
  1021. ]
  1022. }
  1023. ]
  1024. }
  1025. },
  1026. "scopeName": "source.java"
  1027. }
Add Comment
Please, Sign In to add comment