Skip to content

Instantly share code, notes, and snippets.

@yegeniy
Created April 21, 2017 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yegeniy/8596382448e34813a0d9575190889c7b to your computer and use it in GitHub Desktop.
Save yegeniy/8596382448e34813a0d9575190889c7b to your computer and use it in GitHub Desktop.
- match: \b(catch)\b
scope: keyword.control.catch-exception.java
push:
- meta_scope: meta.catch.java
- match: (?=\))
pop: true
- include: catch-clause
# https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.20
# CatchClause:
# catch ( CatchFormalParameter ) Block
# CatchFormalParameter:
# {VariableModifier} CatchType VariableDeclaratorId
# CatchType:
# UnannClassType {| ClassType}
catch-clause:
- match: \(
push:
- include: annotations
- match: (?=\))
pop: true
- match: \bfinal\b
scope: storage.modifier.java
- match: \|
scope: keyword.operator.logical.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment