packages feed

dhscanner-ast 1.0.8 → 1.0.9

raw patch · 2 files changed

+15/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Ast: ExpAssign :: ExpAssignContent -> Exp
+ Ast: ExpAssignContent :: Var -> Exp -> Location -> ExpAssignContent
+ Ast: [expAssignLhs] :: ExpAssignContent -> Var
+ Ast: [expAssignLocation] :: ExpAssignContent -> Location
+ Ast: [expAssignRhs] :: ExpAssignContent -> Exp
+ Ast: data ExpAssignContent
+ Ast: instance Data.Aeson.Types.FromJSON.FromJSON Ast.ExpAssignContent
+ Ast: instance Data.Aeson.Types.ToJSON.ToJSON Ast.ExpAssignContent
+ Ast: instance GHC.Classes.Eq Ast.ExpAssignContent
+ Ast: instance GHC.Classes.Ord Ast.ExpAssignContent
+ Ast: instance GHC.Generics.Generic Ast.ExpAssignContent
+ Ast: instance GHC.Show.Show Ast.ExpAssignContent

Files

dhscanner-ast.cabal view
@@ -8,7 +8,7 @@     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 container security checks. As part of that 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
@@ -22,7 +22,7 @@     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.0.8
+version:            1.0.9
 license:            GPL-3.0-only
 license-file:       LICENSE
 author:             OrenGitHub
src/Ast.hs view
@@ -84,6 +84,7 @@    | ExpNull ExpNullContent
    | ExpCall ExpCallContent
    | ExpBinop ExpBinopContent
+   | ExpAssign ExpAssignContent
    | ExpLambda ExpLambdaContent
    deriving ( Show, Eq, Ord, Generic, ToJSON, FromJSON )
 
@@ -237,6 +238,18 @@          expBinopRight :: Exp,
          expBinopOperator :: Operator,
          expBinopLocation :: Location
+     }
+     deriving ( Show, Eq, Ord, Generic, ToJSON, FromJSON )
+
+-- |
+-- @since 1.0.9
+-- ( added for better [php support](https://www.php.net/manual/en/language.operators.assignment.php) )
+data ExpAssignContent
+   = ExpAssignContent
+     {
+         expAssignLhs :: Var,
+         expAssignRhs :: Exp,
+         expAssignLocation :: Location
      }
      deriving ( Show, Eq, Ord, Generic, ToJSON, FromJSON )