/* esm.sh - @codemirror/lang-cpp@6.0.3 */
import{parser as n}from"../../../@lezer/cpp@^1.0.0?target=es2022";import{LRLanguage as o,indentNodeProp as a,continuedIndent as t,flatIndent as r,delimitedIndent as i,foldNodeProp as d,foldInside as m,LanguageSupport as p}from"../../language@^6.0.0?target=es2022";var s=o.define({name:"cpp",parser:n.configure({props:[a.add({IfStatement:t({except:/^\s*({|else\b)/}),TryStatement:t({except:/^\s*({|catch)\b/}),LabeledStatement:r,CaseStatement:e=>e.baseIndent+e.unit,BlockComment:()=>null,CompoundStatement:i({closing:"}"}),Statement:t({except:/^{/})}),d.add({"DeclarationList CompoundStatement EnumeratorList FieldDeclarationList InitializerList":m,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 u(){return new p(s)}export{u as cpp,s as cppLanguage};
//# sourceMappingURL=lang-cpp.mjs.map