import{p as r}from"./vendor-lezer-java-B1EJhELL.js";import{L as s,c as i,d as l,f as d,e as t,h as m,j as p,k as c}from"./cm-language-CDsY7zq0.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-common-tVQBIsvN.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const u=s.define({name:"java",parser:r.configure({props:[l.add({IfStatement:t({except:/^\s*({|else\b)/}),TryStatement:t({except:/^\s*({|catch|finally)\b/}),LabeledStatement:p,SwitchBlock:e=>{let a=e.textAfter,o=/^\s*\}/.test(a),n=/^\s*(case|default)\b/.test(a);return e.baseIndent+(o?0:n?1:2)*e.unit},Block:m({closing:"}"}),BlockComment:()=>null,Statement:t({except:/^{/})}),d.add({"Block SwitchBlock ClassBody ElementValueArrayInitializer ModuleBody EnumBody ConstructorBody InterfaceBody ArrayInitializer":c,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/}});function j(){return new i(u)}export{j as java,u as javaLanguage};
