import{parser as e}from"../../../@lezer/java/dist/index.esm.js";import{LanguageSupport as t,LRLanguage as n,indentNodeProp as o,flatIndent as a,continuedIndent as l,delimitedIndent as r,foldNodeProp as s,foldInside as c}from"../../language/dist/index.esm.js";const i=n.define({name:"java",parser:e.configure({props:[o.add({IfStatement:l({except:/^\s*({|else\b)/}),TryStatement:l({except:/^\s*({|catch|finally)\b/}),LabeledStatement:a,SwitchBlock:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),o=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:o?1:2)*e.unit},Block:r({closing:"}"}),BlockComment:()=>null,Statement:l({except:/^{/})}),s.add({"Block SwitchBlock ClassBody ElementValueArrayInitializer ModuleBody EnumBody ConstructorBody InterfaceBody ArrayInitializer":c,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/}});function m(){return new t(i)}export{m as java,i as javaLanguage};
//# sourceMappingURL=index.esm.js.map
