Skip to content

Commit

Permalink
Replace ?. to . for hover null safe field access
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed May 31, 2024
1 parent 1cfe719 commit eb4605a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/HLAdapter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ class HLAdapter extends DebugSession {
// ?ident => hover on optional param (most likely)
if( ~/^\?[A-Za-z0-9_]+$/.match(args.expression) )
args.expression = args.expression.substr(1);
// ?. => likely null safe field access, replace to .
args.expression = StringTools.replace(args.expression, "?.", ".");
if( KEYWORDS.exists(args.expression) ) {
// Do nothing
} else {
Expand Down

0 comments on commit eb4605a

Please sign in to comment.