import{parser as e}from"../../../@lezer/cpp/dist/index.esm.js";import{LanguageSupport as t,LRLanguage as n,indentNodeProp as o,flatIndent as a,continuedIndent as s,delimitedIndent as i,foldNodeProp as m,foldInside as r}from"../../language/dist/index.esm.js";const c=n.define({name:"cpp",parser:e.configure({props:[o.add({IfStatement:s({except:/^\s*({|else\b)/}),TryStatement:s({except:/^\s*({|catch)\b/}),LabeledStatement:a,CaseStatement:e=>e.baseIndent+e.unit,BlockComment:()=>null,CompoundStatement:i({closing:"}"}),Statement:s({except:/^{/})}),m.add({"DeclarationList CompoundStatement EnumeratorList FieldDeclarationList InitializerList":r,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/,closeBrackets:{stringPrefixes:["L","u","U","u8","LR","UR","uR","u8R","R"]}}});function l(){return new t(c)}export{l as cpp,c as cppLanguage};
//# sourceMappingURL=index.esm.js.map
