@hackage dhscanner-ast0.1.0.3

abstract syntax tree for multiple programming languages

The abstract ayntax tree (ast) aims to be a data structure able to represent multiple abstract syntax trees from various programming languages. Its main purpose is to serve as the first step for static code analysis, as part of the dhscanner framework for CI/CD container security checks. As part of that framework, it targets mostly languages used for cloud native applications: Python, Ruby, Php, Javascript, Typescript, Java and Golang. Typically, a file is first parsed with the corresponding native parser of the language it's written in (see Python's native parser for example). The native ast is then dumped (as JSON, or plain text) and sent to a Happy + Alex Haskell parser which accommodates the natively parsed content into the ast. Geared towards static code analysis, the ast design abstracts away details that are normally ignored anyway. For example, it does not distinguish between try and catch blocks, and models both of them as plain sequential code blocks. Every file has exactly one ast that represents it. Non Haskell parogrammers note: The ast is immutable (like everything else in Haskell ...)