mirror of
https://github.com/github/semantic.git
synced 2024-12-27 17:05:33 +03:00
Define a precise Python parser.
This commit is contained in:
parent
ead0253c73
commit
f4d89746d1
@ -24,6 +24,8 @@ module Parsing.Parser
|
||||
, phpParser
|
||||
, phpASTParser
|
||||
, haskellParser
|
||||
-- Precise parsers
|
||||
, precisePythonParser
|
||||
) where
|
||||
|
||||
import Assigning.Assignment
|
||||
@ -57,6 +59,7 @@ import TreeSitter.JSON
|
||||
import qualified TreeSitter.Language as TS (Language, Symbol)
|
||||
import TreeSitter.PHP
|
||||
import TreeSitter.Python
|
||||
import qualified TreeSitter.Python.AST as Py
|
||||
import TreeSitter.Ruby (tree_sitter_ruby)
|
||||
import TreeSitter.TSX
|
||||
import TreeSitter.TypeScript
|
||||
@ -170,6 +173,10 @@ markdownParser :: Parser Markdown.Term
|
||||
markdownParser = AssignmentParser MarkdownParser Markdown.assignment
|
||||
|
||||
|
||||
precisePythonParser :: Parser (Py.Module Loc)
|
||||
precisePythonParser = UnmarshalParser tree_sitter_python
|
||||
|
||||
|
||||
data SomeTerm typeclasses ann where
|
||||
SomeTerm :: ApplyAll typeclasses syntax => Term syntax ann -> SomeTerm typeclasses ann
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user