@@ -46,33 +46,32 @@ export const csharpLanguage = LRLanguage.define({
4646 parser : parser . configure ( {
4747 props : [
4848 indentNodeProp . add ( {
49- BracesDelim : continuedIndent ( { except : / ^ \s * [ \} ] / } ) ,
50- BracketsDelim : continuedIndent ( { except : / ^ \s * [ \] ] / } ) ,
51- ParensDelim : continuedIndent ( { except : / ^ \s * [ \) ] / } ) ,
52- ChevronsDelim : continuedIndent ( { except : / ^ \s * [ \> ] / } ) ,
49+ BracesDelim : continuedIndent ( { except : / ^ \s * } / } ) ,
50+ BracketsDelim : continuedIndent ( { except : / ^ \s * ] / } ) ,
51+ ParensDelim : continuedIndent ( { except : / ^ \s * \) / } ) ,
52+ ChevronsDelim : continuedIndent ( { except : / ^ \s * > / } ) ,
5353 IfStmt : continuedIndent ( { except : / ^ \s * ( { | e l s e \b ) / } ) ,
5454 TryStmt : continuedIndent ( { except : / ^ \s * ( { | c a t c h \b | f i n a l l y \b ) / } ) ,
55- LabeledStmt : flatIndent ,
55+ "String LabeledStmt" : flatIndent ,
5656 "Expression Declaration Statement" : continuedIndent ( { except : / ^ \s * { / } )
5757 } ) ,
5858 foldNodeProp . add ( {
5959 Delim : foldInside ,
60- BlockComment ( tree ) { return { from : tree . from + 2 , to : tree . to - 2 } } ,
60+ BlockComment ( node ) { return { from : node . from + 2 , to : node . to - 2 } } ,
6161 } ) ,
6262 styleTags ( {
6363 "Keyword ContextualKeyword SimpleType" : tags . keyword ,
6464 BooleanLiteral : tags . bool ,
6565 NullLiteral : tags . null ,
6666 IntegerLiteral : tags . integer ,
6767 RealLiteral : tags . float ,
68- 'StringLiteral UTF8StringLiteral RawStringLiteral CharacterLiteral InterpolatedRegularString InterpolatedVerbatimString InterpolatedRawString $" @$" $@"' :
69- tags . string ,
68+ String : tags . string ,
7069 LineComment : tags . lineComment ,
7170 BlockComment : tags . blockComment ,
7271 DocComment : tags . docComment ,
7372
74- ". .. : Astrisk Slash % + - ++ -- Not ~ << & | ^ && || < > <= >= == NotEq = += -= *= SlashEq %= &= |= ^= ? ?? ??= =>" :
75- tags . operator ,
73+ Operator : tags . operator ,
74+ Separator : tags . separator ,
7675
7776 PP_Directive : tags . keyword ,
7877
@@ -96,7 +95,7 @@ export const csharpLanguage = LRLanguage.define({
9695 return null ;
9796 }
9897 const content = input . read ( node . from , node . to ) ;
99- if ( content . indexOf ( "<" ) === - 1 ) {
98+ if ( content . indexOf ( '<' ) === - 1 ) {
10099 return null ;
101100 }
102101 const overlay = docCommentXmlOverlay ( node . from , content ) ;
@@ -113,8 +112,8 @@ export const csharpLanguage = LRLanguage.define({
113112 } ) ,
114113 languageData : {
115114 commentTokens : { line : "//" , block : { open : "/*" , close : "*/" } } ,
116- closeBrackets : { brackets : [ "(" , "[" , "{" , '"' , "'" , '"""' ] } ,
117- indentOnInput : / ^ \s * ( [ \ )\] \ }] $ | ( e l s e | e l s e \s + i f | c a t c h | f i n a l l y ) \b ) /
115+ closeBrackets : { brackets : [ '(' , '[' , '{' , '"' , '\'' , '"""' ] } ,
116+ indentOnInput : / ^ \s * ( [ ) \] } ] $ | ( e l s e | e l s e \s + i f | c a t c h | f i n a l l y ) \b ) /
118117 }
119118} ) ;
120119
0 commit comments