packages feed

dhscanner-ast-1.1.2: dhscanner-ast.cabal

cabal-version:      3.0
name:               dhscanner-ast
category:           parsing
synopsis:           abstract syntax tree for multiple programming languages
description:

    The [abstract ayntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_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](https://github.com/OrenGitHub/dhscanner) framework
    for CI/CD security code scans. 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](https://docs.python.org/3/library/ast.html) for example).
    The native ast is then dumped (as JSON, or plain text)
    and sent to a [Happy](https://haskell-happy.readthedocs.io/en/latest/) +
    [Alex](https://haskell-alex.readthedocs.io/en/latest/) 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 ...)

version:            1.1.2
license:            GPL-3.0-only
license-file:       LICENSE
author:             OrenGitHub
maintainer:         Oren Ish Shalom
copyright:          (c) 2024 Oren Ish Shalom
homepage:           https://github.com/OrenGitHub/dhscanner
stability:          experimental
build-type:         Simple

common ghc_options

    ghc-options: -Wall -O2

library

    import:
        ghc_options

    exposed-modules:
        Ast,
        Token,
        Location

    build-depends:
        aeson < 2.3,
        base < 4.19,
        containers < 0.7

    hs-source-dirs:
        src

    default-language:
        Haskell2010

test-suite dhscanner-ast-test

    import:
        ghc_options

    type:
        exitcode-stdio-1.0

    hs-source-dirs:
        test

    main-is:
        Main.hs

    build-depends:
        base,
        dhscanner-ast,
        QuickCheck,
        random

    default-language:
        Haskell2010