1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 22:28:10 +03:00

update ToTags instance for Rb.SingletonMethod

This commit is contained in:
Ayman Nadeem 2020-05-11 16:48:39 -04:00
parent d8e48e55f6
commit 1f09965e24

View File

@ -182,13 +182,13 @@ instance ToTags Rb.SingletonMethod where
tags
t@Rb.SingletonMethod
{ ann = Loc {byteRange = Range {start}},
name,
name = Parse.Success n,
parameters
} = yieldMethodNameTag t range' name
} = yieldMethodNameTag t range' n
where
range' = case parameters of
Just Rb.MethodParameters {ann = Loc {byteRange = Range {end}}} -> Range start end
_ -> Range start (getEnd name)
Just (Parse.Success (Rb.MethodParameters {ann = Loc {byteRange = Range {end}}})) -> Range start end
_ -> Range start (getEnd n)
getEnd = Range.end . byteRange . TS.gann
instance ToTags Rb.Block where