mirror of
https://github.com/github/semantic.git
synced 2024-11-23 16:37:50 +03:00
Select an abstract parser.
This commit is contained in:
parent
d5cc356a8a
commit
52b0d4c508
@ -51,14 +51,16 @@ callGraphProject' session proxy path
|
||||
callGraphProject proxy paths = withOptions defaultOptions $ \ config logger statter ->
|
||||
callGraphProject' (TaskSession config "" False logger statter) proxy paths
|
||||
|
||||
evaluateProject proxy parser path = withOptions defaultOptions $ \ config logger statter ->
|
||||
evaluateProject proxy path
|
||||
| let lang = Language.reflect proxy
|
||||
, Just (SomeParser parser) <- Map.lookup lang analysisParsers = withOptions defaultOptions $ \ config logger statter ->
|
||||
fmap (const ()) . justEvaluating =<< evaluateProject' (TaskSession config "" False logger statter) proxy parser [Path.toString path]
|
||||
|
||||
pyEval :: Path.RelFile -> Benchmarkable
|
||||
pyEval p = nfIO $ evaluateProject (Proxy @'Language.Python) pythonParser (Path.relDir "bench/bench-fixtures/python" </> p)
|
||||
pyEval p = nfIO $ evaluateProject (Proxy @'Language.Python) (Path.relDir "bench/bench-fixtures/python" </> p)
|
||||
|
||||
rbEval :: Path.RelFile -> Benchmarkable
|
||||
rbEval p = nfIO $ evaluateProject (Proxy @'Language.Ruby) rubyParser (Path.relDir "bench/bench-fixtures/ruby" </> p)
|
||||
rbEval p = nfIO $ evaluateProject (Proxy @'Language.Ruby) (Path.relDir "bench/bench-fixtures/ruby" </> p)
|
||||
|
||||
pyCall :: Path.RelFile -> Benchmarkable
|
||||
pyCall p = nfIO $ callGraphProject (Proxy @'Language.Python) (Path.relDir "bench/bench-fixtures/python/" </> p)
|
||||
|
Loading…
Reference in New Issue
Block a user