package Ġcom . def lated pickle . intellij . conc urn as . matcher Ċ Ċ import Ġcom . conc urn as . compiler . Con c urn as Lexer Ċ import Ġcom . conc urn as . compiler . Con c urn as Parser Ċ import Ġcom . def lated pickle . intellij . conc urn as . Con c urn as Token Types Ċ import Ġcom . intellij . lang . Brace Pair Ċ import Ġcom . intellij . lang . Pa ired Brace Matcher Ċ import Ġcom . intellij . psi . Psi File Ċ import Ġcom . intellij . psi . tree . I ElementType Ċ Ċ class ĠCon c urn as Brace Matcher Ġ: ĠPa ired Brace Matcher Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget Pairs (): ĠArray < Brace Pair > Ġ= ĠarrayOf ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠParent hesis ĊĠĠĠĠĠĠĠĠĠĠĠ ĠBr ace Pair ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCon c urn as Token Types . getToken ElementType ( Con c urn as Lexer . L PARA ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCon c urn as Token Types . getToken ElementType ( Con c urn as Lexer . R PARA ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠSquare Ġbrackets ĊĠĠĠĠĠĠĠĠĠĠĠ ĠBr ace Pair ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCon c urn as Token Types . getToken ElementType ( Con c urn as Lexer . L BRACK ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCon c urn as Token Types . getToken ElementType ( Con c urn as Lexer . R BRACK ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠCur ly Ġbr aces ĊĠĠĠĠĠĠĠĠĠĠĠ ĠBr ace Pair ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCon c urn as Token Types . getToken ElementType ( Con c urn as Lexer . L BRACE ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠCon c urn as Token Types . getToken ElementType ( Con c urn as Lexer . R BRACE ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtrue ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġoverride Ġfun Ġis Pa ired Br aces Allowed Before Type ( l brace Type : ĠI ElementType , Ġcontext Type : ĠI ElementType ?): ĠBoolean Ġ= Ġtrue ĊĠĠĠ Ġoverride Ġfun Ġget Code Construct Start ( file : ĠPsi File ?, Ġopening Brace Offset : ĠInt ): ĠInt Ġ= Ġopening Brace Offset Ċ }