1
1
mirror of https://github.com/github/semantic.git synced 2024-11-27 12:57:49 +03:00

Program is PHP's top-level rule

This commit is contained in:
Ayman Nadeem 2020-02-12 16:44:07 -05:00
parent b2148607c4
commit 05760f6d11

View File

@ -10,11 +10,11 @@ import qualified Tags.Tagging.Precise as Tags
import qualified TreeSitter.PHP (tree_sitter_php) import qualified TreeSitter.PHP (tree_sitter_php)
import qualified AST.Unmarshal as TS import qualified AST.Unmarshal as TS
newtype Term a = Term { getTerm :: PHP.Document a } newtype Term a = Term { getTerm :: PHP.Program a }
instance TS.SymbolMatching Term where instance TS.SymbolMatching Term where
matchedSymbols _ = TS.matchedSymbols (Proxy :: Proxy PHP.Document) matchedSymbols _ = TS.matchedSymbols (Proxy :: Proxy PHP.Program)
showFailure _ = TS.showFailure (Proxy :: Proxy PHP.Document) showFailure _ = TS.showFailure (Proxy :: Proxy PHP.Program)
instance TS.Unmarshal Term where instance TS.Unmarshal Term where
matchers = fmap (fmap (TS.hoist Term)) TS.matchers matchers = fmap (fmap (TS.hoist Term)) TS.matchers