import{p as n}from"./vendor-lezer-cpp-BleAU9o-.js";import{L as o,b as a,c as r,f as i,d as t,e as p,g as m,h as s}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 d=a.define({name:"cpp",parser:n.configure({props:[r.add({IfStatement:t({except:/^\s*({|else\b)/}),TryStatement:t({except:/^\s*({|catch)\b/}),LabeledStatement:i,CaseStatement:e=>e.baseIndent+e.unit,BlockComment:()=>null,CompoundStatement:p({closing:"}"}),Statement:t({except:/^{/})}),m.add({"DeclarationList CompoundStatement EnumeratorList FieldDeclarationList InitializerList":s,BlockComment(e){return{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 C(){return new o(d)}export{C as cpp,d as cppLanguage};
