diff --git a/semantic-ast/src/Main.hs b/semantic-ast/src/Main.hs index 7262f99c5..f1de6d0f3 100644 --- a/semantic-ast/src/Main.hs +++ b/semantic-ast/src/Main.hs @@ -39,9 +39,9 @@ main :: IO () main = generateAST =<< execParser opts generateAST :: SemanticAST -> IO () -generateAST (SemanticAST sourceInput _) = do - case sourceInput of - FileInput filePath -> do +generateAST (SemanticAST filePath sourceString _) = do + case filePath of + Just filePath -> do bytestring <- Data.ByteString.readFile filePath print =<< parseByteString @TreeSitter.Python.AST.Module @(Range, Span) tree_sitter_python bytestring StdInput -> do