File tree Expand file tree Collapse file tree 4 files changed +21
-1
lines changed Expand file tree Collapse file tree 4 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,14 @@ Big picture:
10
10
11
11
Language Improvements:
12
12
13
+ - enh(csharp) Add ` init ` and ` record ` keywords for C# 9.0 (#2660 ) [ Youssef Victor] [ ]
13
14
- enh(matlab) Add new R2019b ` arguments ` keyword and fix ` enumeration ` keyword (#2619 ) [ Andrew Janke] [ ]
14
15
- fix(kotlin) Remove very old keywords and update example code (#2623 ) [ kageru] [ ]
15
16
- fix(night) Prevent object prototypes method values from being returned in ` getLanguage ` (#2636 ) [ night] [ ]
16
17
- enh(java) Add support for ` enum ` , which will identify as a ` class ` now (#2643 ) [ ezksd] [ ]
17
18
- enh(nsis) Add support for NSIS 3.06 commands (#2653 ) [ idleberg] [ ]
18
19
20
+ [ Youssef Victor ] : https://github.com/Youssef1313
19
21
[ Josh Goebel ] : https://github.com/yyyc514
20
22
[ Andrew Janke ] : https://github.com/apjanke
21
23
[ Samia Ali ] : https://github.com/samiaab1990
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export default function(hljs) {
13
13
// Normal keywords.
14
14
'abstract as base bool break byte case catch char checked const continue decimal ' +
15
15
'default delegate do double enum event explicit extern finally fixed float ' +
16
- 'for foreach goto if implicit in int interface internal is lock long ' +
16
+ 'for foreach goto if implicit in init int interface internal is lock long ' +
17
17
'object operator out override params private protected public readonly ref sbyte ' +
18
18
'sealed short sizeof stackalloc static string struct switch this try typeof ' +
19
19
'uint ulong unchecked unsafe ushort using virtual void volatile while ' +
@@ -164,6 +164,16 @@ export default function(hljs) {
164
164
hljs . C_BLOCK_COMMENT_MODE
165
165
]
166
166
} ,
167
+ {
168
+ beginKeywords : 'record' , end : / [ { ; = ] / ,
169
+ illegal : / [ ^ \s : ] / ,
170
+ contains : [
171
+ TITLE_MODE ,
172
+ GENERIC_MODIFIER ,
173
+ hljs . C_LINE_COMMENT_MODE ,
174
+ hljs . C_BLOCK_COMMENT_MODE
175
+ ]
176
+ } ,
167
177
{
168
178
// [Attributes("")]
169
179
className : 'meta' ,
Original file line number Diff line number Diff line change
1
+ <span class="hljs-keyword">public</span> <span class="hljs-keyword">record</span> <span class="hljs-title">MyRecord</span>
2
+ {
3
+ <span class="hljs-keyword">public</span> <span class="hljs-keyword">string</span> SomeMember { <span class="hljs-keyword">get</span>; <span class="hljs-keyword">set</span>; }
4
+ }
Original file line number Diff line number Diff line change
1
+ public record MyRecord
2
+ {
3
+ public string SomeMember { get; set; }
4
+ }
You can’t perform that action at this time.
0 commit comments