import{p as r}from"./vendor-lezer-java-D_zzj-NV.js";import{L as s,b as i,c as l,f as d,d as t,e as m,g as p,h as c}from"./vendor-codemirror-language-BgPj_McA.js";import"./vendor-lezer-lr-bhwg1HMg.js";import"./vendor-lezer-common-B3-cUCR_.js";import"./vendor-lezer-highlight-CDMHUZ74.js";import"./vendor-codemirror-state-C9awkmn-.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./vendor-codemirror-view-CiLROUVV.js";import"./vendor-style-mod-NZ5MEPvj.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const u=i.define({name:"java",parser:r.configure({props:[l.add({IfStatement:t({except:/^\s*({|else\b)/}),TryStatement:t({except:/^\s*({|catch|finally)\b/}),LabeledStatement:d,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:/^{/})}),p.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 s(u)}export{j as java,u as javaLanguage};
