mirror of
https://github.com/github/semantic.git
synced 2024-11-24 00:42:33 +03:00
Few more python built-in functions
This commit is contained in:
parent
4bcbdb945c
commit
955e2622f2
@ -51,8 +51,11 @@ type family ToTagsInstance t :: Strategy where
|
||||
|
||||
-- These built-in functions all get handled as calls
|
||||
ToTagsInstance Py.AssertStatement = 'Custom
|
||||
ToTagsInstance Py.GlobalStatement = 'Custom
|
||||
ToTagsInstance Py.Await = 'Custom
|
||||
ToTagsInstance Py.DeleteStatement = 'Custom
|
||||
ToTagsInstance Py.ExecStatement = 'Custom
|
||||
ToTagsInstance Py.GlobalStatement = 'Custom
|
||||
ToTagsInstance Py.NonlocalStatement = 'Custom
|
||||
ToTagsInstance Py.PrintStatement = 'Custom
|
||||
|
||||
ToTagsInstance _ = 'Generic
|
||||
@ -71,12 +74,21 @@ keywordFunctionCall t loc range name = do
|
||||
instance ToTagsBy 'Custom Py.AssertStatement where
|
||||
tags' t@Py.AssertStatement { ann = loc@Loc { byteRange = range } } = keywordFunctionCall t loc range "assert"
|
||||
|
||||
instance ToTagsBy 'Custom Py.Await where
|
||||
tags' t@Py.Await { ann = loc@Loc { byteRange = range } } = keywordFunctionCall t loc range "await"
|
||||
|
||||
instance ToTagsBy 'Custom Py.DeleteStatement where
|
||||
tags' t@Py.DeleteStatement { ann = loc@Loc { byteRange = range } } = keywordFunctionCall t loc range "del"
|
||||
|
||||
instance ToTagsBy 'Custom Py.ExecStatement where
|
||||
tags' t@Py.ExecStatement { ann = loc@Loc { byteRange = range } } = keywordFunctionCall t loc range "exec"
|
||||
|
||||
instance ToTagsBy 'Custom Py.GlobalStatement where
|
||||
tags' t@Py.GlobalStatement { ann = loc@Loc { byteRange = range } } = keywordFunctionCall t loc range "global"
|
||||
|
||||
instance ToTagsBy 'Custom Py.NonlocalStatement where
|
||||
tags' t@Py.NonlocalStatement { ann = loc@Loc { byteRange = range } } = keywordFunctionCall t loc range "nonlocal"
|
||||
|
||||
instance ToTagsBy 'Custom Py.PrintStatement where
|
||||
tags' t@Py.PrintStatement { ann = loc@Loc { byteRange = range } } = keywordFunctionCall t loc range "print"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user