mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Don’t trim the source for recursive calls into termToDiffInfo.
This commit is contained in:
parent
6a2f773a1d
commit
52025ac5e5
@ -155,7 +155,7 @@ termToDiffInfo source term = case unwrap term of
|
||||
toTermName' subterm = toTermName (Source.slice (subtermRange subterm) source) subterm
|
||||
range = characterRange . extract
|
||||
subtermRange subterm = offsetRange (range subterm) (negate (start (range term)))
|
||||
termToDiffInfo' subterm = termToDiffInfo (Source.slice (subtermRange subterm) source) subterm
|
||||
termToDiffInfo' = termToDiffInfo source
|
||||
toLeafInfo term = LeafInfo (category $ extract term) (toTermName' term) (getField $ extract term)
|
||||
|
||||
toTermName :: forall leaf fields. DefaultFields fields => Source -> SyntaxTerm leaf fields -> Text
|
||||
|
Loading…
Reference in New Issue
Block a user