mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:45:06 +00:00
Guard against an AST node with no end token (issue 30089)
R=scheglov@google.com Review-Url: https://codereview.chromium.org/2974533002 .
This commit is contained in:
parent
ee4a09faea
commit
0c775ae412
|
@ -451,6 +451,9 @@ class CompletionTarget {
|
|||
* [CompletionTarget] associated with the given [offset].
|
||||
*/
|
||||
static bool _isCandidateToken(Token token, int offset) {
|
||||
if (token == null) {
|
||||
return false;
|
||||
}
|
||||
// A token is considered a candidate entity if the cursor offset is (a)
|
||||
// before the start of the token, (b) within the token, (c) at the end of
|
||||
// the token and the token is a keyword or identifier, or (d) at the
|
||||
|
|
Loading…
Reference in a new issue