Skip to content

Commit

Permalink
ogma-language-jsonspec: Make JSONFormat readable. Refs nasa#170.
Browse files Browse the repository at this point in the history
To make Ogma more easily extensible, we want to make it possible to
store the format specifications in individual files, so that they do not
have to be included with the code and they can be provided by users.

This commit makes a JSONFormat readable, so that it can be easily read
from a file.
  • Loading branch information
ivanperez-keera committed Nov 22, 2024
1 parent 4f0f145 commit 6a9a9c7
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions ogma-language-jsonspec/src/Language/JSONSpec/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,19 @@ import Text.Megaparsec (eof, errorBundlePretty, parse)
import Data.OgmaSpec

data JSONFormat = JSONFormat
{ specInternalVars :: Maybe String
, specInternalVarId :: String
, specInternalVarExpr :: String
, specInternalVarType :: Maybe String
, specExternalVars :: Maybe String
, specExternalVarId :: String
, specExternalVarType :: Maybe String
, specRequirements :: String
, specRequirementId :: String
, specRequirementDesc :: Maybe String
, specRequirementExpr :: String
}
{ specInternalVars :: Maybe String
, specInternalVarId :: String
, specInternalVarExpr :: String
, specInternalVarType :: Maybe String
, specExternalVars :: Maybe String
, specExternalVarId :: String
, specExternalVarType :: Maybe String
, specRequirements :: String
, specRequirementId :: String
, specRequirementDesc :: Maybe String
, specRequirementExpr :: String
}
deriving (Read)

data JSONFormatInternal = JSONFormatInternal
{ jfiInternalVars :: Maybe [JSONPathElement]
Expand Down

0 comments on commit 6a9a9c7

Please sign in to comment.