Skip to content

Commit

Permalink
Update polserver to e26755d; Fix Semantic Token modifiers (#40)
Browse files Browse the repository at this point in the history
* Update polserver to e26755d

* Fix token modifiers
  • Loading branch information
KevinEady authored Jan 20, 2024
1 parent 4594eec commit 92a2bb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion native/cpp/napi/LSPDocument.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,14 @@ Napi::Value LSPDocument::Tokens( const Napi::CallbackInfo& info )
push.Call( semTok, { Napi::Number::New( env, token.character_column - 1 ) } );
push.Call( semTok, { Napi::Number::New( env, token.length ) } );
push.Call( semTok, { Napi::Number::New( env, static_cast<unsigned int>( token.type ) ) } );
push.Call( semTok, { Napi::Number::New( env, 0 ) } );

int modifiers = 0;
for ( auto const& modifier : token.modifiers )
{
modifiers += ( 1 << static_cast<unsigned int>( modifier ) );
}
push.Call( semTok, { Napi::Number::New( env, modifiers ) } );

push.Call( results, { semTok } );
}
}
Expand Down

0 comments on commit 92a2bb5

Please sign in to comment.