@@ -88,13 +88,13 @@ public override void Visit(VarStatement statement)
88
88
{
89
89
var assignment = statement . Assignment as AssignmentExpression ;
90
90
91
- if ( assignment != null )
91
+ if ( assignment is not null )
92
92
{
93
93
var c = _variables . Count - 1 ;
94
94
var variables = _variables [ c ] ;
95
95
var variable = assignment . VariableName ;
96
96
97
- if ( variable != null && ! variables . Contains ( variable ) )
97
+ if ( variable is not null && ! variables . Contains ( variable ) )
98
98
{
99
99
variables . Add ( variable ) ;
100
100
}
@@ -148,7 +148,7 @@ public override void Visit(AssignmentExpression expression)
148
148
{
149
149
var name = expression . VariableName ;
150
150
151
- if ( name != null )
151
+ if ( name is not null )
152
152
{
153
153
var c = _variables . Count - 1 ;
154
154
@@ -186,7 +186,7 @@ public override void Visit(ParameterExpression expression)
186
186
{
187
187
var variable = parameter as VariableExpression ;
188
188
189
- if ( variable != null )
189
+ if ( variable is not null )
190
190
{
191
191
var variables = _variables [ _variables . Count - 1 ] ;
192
192
@@ -243,13 +243,13 @@ public override void Visit(MemberExpression expression)
243
243
var prefix = String . Empty ;
244
244
var obj = Resolve ( expression . Object ) ;
245
245
246
- if ( member != null )
246
+ if ( member is not null )
247
247
{
248
248
var length = _position . Index - member . Start . Index ;
249
249
prefix = member . Name . Substring ( 0 , length ) ;
250
250
}
251
251
252
- if ( obj != null )
252
+ if ( obj is not null )
253
253
{
254
254
AddSuggestions ( prefix , obj . Select ( m => m . Key ) ) ;
255
255
}
@@ -273,11 +273,11 @@ private IDictionary<String, Object> Resolve(IExpression expression)
273
273
var host = _symbols ;
274
274
var name = default ( String ) ;
275
275
276
- if ( member != null )
276
+ if ( member is not null )
277
277
{
278
278
var child = member . Member as IdentifierExpression ;
279
279
280
- if ( child != null )
280
+ if ( child is not null )
281
281
{
282
282
host = Resolve ( member . Object ) ;
283
283
name = child . Name ;
@@ -287,13 +287,13 @@ private IDictionary<String, Object> Resolve(IExpression expression)
287
287
{
288
288
var variable = expression as VariableExpression ;
289
289
290
- if ( variable != null )
290
+ if ( variable is not null )
291
291
{
292
292
name = variable . Name ;
293
293
}
294
294
}
295
295
296
- if ( ! String . IsNullOrEmpty ( name ) && host != null )
296
+ if ( ! String . IsNullOrEmpty ( name ) && host is not null )
297
297
{
298
298
host . TryGetValue ( name , out value ) ;
299
299
return value as IDictionary < String , Object > ;
0 commit comments