godot-megaparsec 0.2.1.0 → 0.2.2.0
raw patch · 3 files changed
+97/−62 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Godot.Parser.Resource: [_connectionSectionEntries] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_connectionSectionFrom] :: GodotSection -> Text
- Godot.Parser.Resource: [_connectionSectionHeaders] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_connectionSectionMethod] :: GodotSection -> Text
- Godot.Parser.Resource: [_connectionSectionSignal] :: GodotSection -> Text
- Godot.Parser.Resource: [_connectionSectionTo] :: GodotSection -> Text
- Godot.Parser.Resource: [_extResourceSectionEntries] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_extResourceSectionHeaders] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_extResourceSectionId] :: GodotSection -> Int
- Godot.Parser.Resource: [_extResourceSectionPath] :: GodotSection -> Text
- Godot.Parser.Resource: [_extResourceSectionTy] :: GodotSection -> Text
- Godot.Parser.Resource: [_nodeSectionEntries] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_nodeSectionGroups] :: GodotSection -> Maybe [Text]
- Godot.Parser.Resource: [_nodeSectionHeaders] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_nodeSectionIndex] :: GodotSection -> Maybe Int
- Godot.Parser.Resource: [_nodeSectionInstPlaceholder] :: GodotSection -> Maybe Text
- Godot.Parser.Resource: [_nodeSectionInst] :: GodotSection -> Maybe Int
- Godot.Parser.Resource: [_nodeSectionName] :: GodotSection -> Text
- Godot.Parser.Resource: [_nodeSectionOwner] :: GodotSection -> Maybe Text
- Godot.Parser.Resource: [_nodeSectionParent] :: GodotSection -> Maybe Text
- Godot.Parser.Resource: [_nodeSectionTy] :: GodotSection -> Maybe Text
- Godot.Parser.Resource: [_resourceSectionClassName] :: GodotSection -> Maybe Text
- Godot.Parser.Resource: [_resourceSectionLibrary] :: GodotSection -> Maybe (Text, [GodotValue])
- Godot.Parser.Resource: [_resourceSectionResourceName] :: GodotSection -> Maybe Text
- Godot.Parser.Resource: [_subResourceSectionEntries] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_subResourceSectionHeaders] :: GodotSection -> HashMap Text GodotValue
- Godot.Parser.Resource: [_subResourceSectionId] :: GodotSection -> Int
- Godot.Parser.Resource: [_subResourceSectionTy] :: GodotSection -> Text
- Godot.Parser.Resource.Lens: connectionSectionEntries :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: connectionSectionFrom :: Traversal' GodotSection Text
- Godot.Parser.Resource.Lens: connectionSectionHeaders :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: connectionSectionMethod :: Traversal' GodotSection Text
- Godot.Parser.Resource.Lens: connectionSectionSignal :: Traversal' GodotSection Text
- Godot.Parser.Resource.Lens: connectionSectionTo :: Traversal' GodotSection Text
- Godot.Parser.Resource.Lens: extResourceSectionEntries :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: extResourceSectionHeaders :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: extResourceSectionId :: Traversal' GodotSection Int
- Godot.Parser.Resource.Lens: extResourceSectionPath :: Traversal' GodotSection Text
- Godot.Parser.Resource.Lens: extResourceSectionTy :: Traversal' GodotSection Text
- Godot.Parser.Resource.Lens: nodeSectionEntries :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: nodeSectionGroups :: Traversal' GodotSection (Maybe [Text])
- Godot.Parser.Resource.Lens: nodeSectionHeaders :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: nodeSectionIndex :: Traversal' GodotSection (Maybe Int)
- Godot.Parser.Resource.Lens: nodeSectionInst :: Traversal' GodotSection (Maybe Int)
- Godot.Parser.Resource.Lens: nodeSectionInstPlaceholder :: Traversal' GodotSection (Maybe Text)
- Godot.Parser.Resource.Lens: nodeSectionName :: Traversal' GodotSection Text
- Godot.Parser.Resource.Lens: nodeSectionOwner :: Traversal' GodotSection (Maybe Text)
- Godot.Parser.Resource.Lens: nodeSectionParent :: Traversal' GodotSection (Maybe Text)
- Godot.Parser.Resource.Lens: nodeSectionTy :: Traversal' GodotSection (Maybe Text)
- Godot.Parser.Resource.Lens: resourceSectionClassName :: Traversal' GodotSection (Maybe Text)
- Godot.Parser.Resource.Lens: resourceSectionLibrary :: Traversal' GodotSection (Maybe (Text, [GodotValue]))
- Godot.Parser.Resource.Lens: resourceSectionResourceName :: Traversal' GodotSection (Maybe Text)
- Godot.Parser.Resource.Lens: subResourceSectionEntries :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: subResourceSectionHeaders :: Traversal' GodotSection (HashMap Text GodotValue)
- Godot.Parser.Resource.Lens: subResourceSectionId :: Traversal' GodotSection Int
- Godot.Parser.Resource.Lens: subResourceSectionTy :: Traversal' GodotSection Text
+ Godot.Parser.Resource: Connection :: Text -> Text -> Text -> Text -> HashMap Text GodotValue -> HashMap Text GodotValue -> Connection
+ Godot.Parser.Resource: ExtResource :: Text -> Text -> Int -> HashMap Text GodotValue -> HashMap Text GodotValue -> ExtResource
+ Godot.Parser.Resource: Node :: Maybe Text -> Text -> Maybe Text -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe Int -> Maybe [Text] -> HashMap Text GodotValue -> HashMap Text GodotValue -> Node
+ Godot.Parser.Resource: Resource :: Maybe Text -> Maybe Text -> Maybe (Text, [GodotValue]) -> Resource
+ Godot.Parser.Resource: SubResource :: Text -> Int -> HashMap Text GodotValue -> HashMap Text GodotValue -> SubResource
+ Godot.Parser.Resource: [_connectionEntries] :: Connection -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_connectionFrom] :: Connection -> Text
+ Godot.Parser.Resource: [_connectionHeaders] :: Connection -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_connectionMethod] :: Connection -> Text
+ Godot.Parser.Resource: [_connectionSignal] :: Connection -> Text
+ Godot.Parser.Resource: [_connectionTo] :: Connection -> Text
+ Godot.Parser.Resource: [_extResourceEntries] :: ExtResource -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_extResourceHeaders] :: ExtResource -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_extResourceId] :: ExtResource -> Int
+ Godot.Parser.Resource: [_extResourcePath] :: ExtResource -> Text
+ Godot.Parser.Resource: [_extResourceTy] :: ExtResource -> Text
+ Godot.Parser.Resource: [_nodeEntries] :: Node -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_nodeGroups] :: Node -> Maybe [Text]
+ Godot.Parser.Resource: [_nodeHeaders] :: Node -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_nodeIndex] :: Node -> Maybe Int
+ Godot.Parser.Resource: [_nodeInstPlaceholder] :: Node -> Maybe Text
+ Godot.Parser.Resource: [_nodeInst] :: Node -> Maybe Int
+ Godot.Parser.Resource: [_nodeName] :: Node -> Text
+ Godot.Parser.Resource: [_nodeOwner] :: Node -> Maybe Text
+ Godot.Parser.Resource: [_nodeParent] :: Node -> Maybe Text
+ Godot.Parser.Resource: [_nodeTy] :: Node -> Maybe Text
+ Godot.Parser.Resource: [_resourceClassName] :: Resource -> Maybe Text
+ Godot.Parser.Resource: [_resourceLibrary] :: Resource -> Maybe (Text, [GodotValue])
+ Godot.Parser.Resource: [_resourceResourceName] :: Resource -> Maybe Text
+ Godot.Parser.Resource: [_subResourceEntries] :: SubResource -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_subResourceHeaders] :: SubResource -> HashMap Text GodotValue
+ Godot.Parser.Resource: [_subResourceId] :: SubResource -> Int
+ Godot.Parser.Resource: [_subResourceTy] :: SubResource -> Text
+ Godot.Parser.Resource: data Connection
+ Godot.Parser.Resource: data ExtResource
+ Godot.Parser.Resource: data Node
+ Godot.Parser.Resource: data Resource
+ Godot.Parser.Resource: data SubResource
+ Godot.Parser.Resource: instance GHC.Generics.Generic Godot.Parser.Resource.Connection
+ Godot.Parser.Resource: instance GHC.Generics.Generic Godot.Parser.Resource.ExtResource
+ Godot.Parser.Resource: instance GHC.Generics.Generic Godot.Parser.Resource.Node
+ Godot.Parser.Resource: instance GHC.Generics.Generic Godot.Parser.Resource.Resource
+ Godot.Parser.Resource: instance GHC.Generics.Generic Godot.Parser.Resource.SubResource
+ Godot.Parser.Resource: instance GHC.Show.Show Godot.Parser.Resource.Connection
+ Godot.Parser.Resource: instance GHC.Show.Show Godot.Parser.Resource.ExtResource
+ Godot.Parser.Resource: instance GHC.Show.Show Godot.Parser.Resource.Node
+ Godot.Parser.Resource: instance GHC.Show.Show Godot.Parser.Resource.Resource
+ Godot.Parser.Resource: instance GHC.Show.Show Godot.Parser.Resource.SubResource
+ Godot.Parser.Resource.Lens: connectionEntries :: Lens' Connection (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: connectionFrom :: Lens' Connection Text
+ Godot.Parser.Resource.Lens: connectionHeaders :: Lens' Connection (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: connectionMethod :: Lens' Connection Text
+ Godot.Parser.Resource.Lens: connectionSignal :: Lens' Connection Text
+ Godot.Parser.Resource.Lens: connectionTo :: Lens' Connection Text
+ Godot.Parser.Resource.Lens: extResourceEntries :: Lens' ExtResource (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: extResourceHeaders :: Lens' ExtResource (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: extResourceId :: Lens' ExtResource Int
+ Godot.Parser.Resource.Lens: extResourcePath :: Lens' ExtResource Text
+ Godot.Parser.Resource.Lens: extResourceTy :: Lens' ExtResource Text
+ Godot.Parser.Resource.Lens: nodeEntries :: Lens' Node (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: nodeGroups :: Lens' Node (Maybe [Text])
+ Godot.Parser.Resource.Lens: nodeHeaders :: Lens' Node (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: nodeIndex :: Lens' Node (Maybe Int)
+ Godot.Parser.Resource.Lens: nodeInst :: Lens' Node (Maybe Int)
+ Godot.Parser.Resource.Lens: nodeInstPlaceholder :: Lens' Node (Maybe Text)
+ Godot.Parser.Resource.Lens: nodeName :: Lens' Node Text
+ Godot.Parser.Resource.Lens: nodeOwner :: Lens' Node (Maybe Text)
+ Godot.Parser.Resource.Lens: nodeParent :: Lens' Node (Maybe Text)
+ Godot.Parser.Resource.Lens: nodeTy :: Lens' Node (Maybe Text)
+ Godot.Parser.Resource.Lens: resourceClassName :: Lens' Resource (Maybe Text)
+ Godot.Parser.Resource.Lens: resourceLibrary :: Lens' Resource (Maybe (Text, [GodotValue]))
+ Godot.Parser.Resource.Lens: resourceResourceName :: Lens' Resource (Maybe Text)
+ Godot.Parser.Resource.Lens: subResourceEntries :: Lens' SubResource (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: subResourceHeaders :: Lens' SubResource (HashMap Text GodotValue)
+ Godot.Parser.Resource.Lens: subResourceId :: Lens' SubResource Int
+ Godot.Parser.Resource.Lens: subResourceTy :: Lens' SubResource Text
- Godot.Parser.Resource: ConnectionSection :: Text -> Text -> Text -> Text -> HashMap Text GodotValue -> HashMap Text GodotValue -> GodotSection
+ Godot.Parser.Resource: ConnectionSection :: Connection -> GodotSection
- Godot.Parser.Resource: ExtResourceSection :: Text -> Text -> Int -> HashMap Text GodotValue -> HashMap Text GodotValue -> GodotSection
+ Godot.Parser.Resource: ExtResourceSection :: ExtResource -> GodotSection
- Godot.Parser.Resource: NodeSection :: Maybe Text -> Text -> Maybe Text -> Maybe Int -> Maybe Text -> Maybe Text -> Maybe Int -> Maybe [Text] -> HashMap Text GodotValue -> HashMap Text GodotValue -> GodotSection
+ Godot.Parser.Resource: NodeSection :: Node -> GodotSection
- Godot.Parser.Resource: ResourceSection :: Maybe Text -> Maybe Text -> Maybe (Text, [GodotValue]) -> GodotSection
+ Godot.Parser.Resource: ResourceSection :: Resource -> GodotSection
- Godot.Parser.Resource: SubResourceSection :: Text -> Int -> HashMap Text GodotValue -> HashMap Text GodotValue -> GodotSection
+ Godot.Parser.Resource: SubResourceSection :: SubResource -> GodotSection
Files
- godot-megaparsec.cabal +1/−1
- src/Godot/Parser/Resource.hs +86/−61
- src/Godot/Parser/Resource/Lens.hs +10/−0
godot-megaparsec.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: godot-megaparsec-version: 0.2.1.0+version: 0.2.2.0 -- A short (one-line) description of the package. synopsis: Megaparsec parser for Godot `tscn` and `gdns` files.
src/Godot/Parser/Resource.hs view
@@ -24,6 +24,11 @@ ,GdnsDescriptor(..) ,GdnsParsed(..) ,GodotParsed(..)+ ,ExtResource(..)+ ,SubResource(..)+ ,Node(..)+ ,Connection(..)+ ,Resource(..) ,tscnParser ,gdnsParser ,otherParser@@ -170,62 +175,82 @@ collectRest its = M.filterWithKey (\k _ -> k `S.member` S.fromList its) --- | Godot resource section prefixed with a bracket-enclosed header, optionally--- with body entries.------ Header entries not specified in a record are accessed with the relevant `headers` field.--- Likewise, body entries not specified are accessed with the `entries` field.--- Note that explicitly specified section fields are not duplicated in `headers` and--- `entries` fields.-data GodotSection- = ExtResourceSection- { _extResourceSectionPath :: T.Text- , _extResourceSectionTy :: T.Text- , _extResourceSectionId :: Int- -- | Other header information.- , _extResourceSectionHeaders :: M.HashMap T.Text GodotValue- -- | Body of the configuration entry.- , _extResourceSectionEntries :: M.HashMap T.Text GodotValue- }- | SubResourceSection- { _subResourceSectionTy :: T.Text- , _subResourceSectionId :: Int- -- | Other header information.- , _subResourceSectionHeaders :: M.HashMap T.Text GodotValue- -- | Body of the configuration entry.- , _subResourceSectionEntries :: M.HashMap T.Text GodotValue- }- | NodeSection- { _nodeSectionTy :: Maybe T.Text- , _nodeSectionName :: T.Text+data ExtResource =+ ExtResource+ { _extResourcePath :: T.Text+ , _extResourceTy :: T.Text+ , _extResourceId :: Int+ -- | Other header information.+ , _extResourceHeaders :: M.HashMap T.Text GodotValue+ -- | Body of the configuration entry.+ , _extResourceEntries :: M.HashMap T.Text GodotValue+ }+ deriving (Show, Generic)++data SubResource =+ SubResource+ { _subResourceTy :: T.Text+ , _subResourceId :: Int+ -- | Other header information.+ , _subResourceHeaders :: M.HashMap T.Text GodotValue+ -- | Body of the configuration entry.+ , _subResourceEntries :: M.HashMap T.Text GodotValue+ }+ deriving (Show, Generic)++data Node =+ Node+ { _nodeTy :: Maybe T.Text+ , _nodeName :: T.Text -- | If `Nothing`, then this node is the root.- , _nodeSectionParent :: Maybe T.Text+ , _nodeParent :: Maybe T.Text -- | Instance refers to an `ExtResource` ID, usually listed at the top of a file.- , _nodeSectionInst :: Maybe Int- , _nodeSectionInstPlaceholder :: Maybe T.Text- , _nodeSectionOwner :: Maybe T.Text- , _nodeSectionIndex :: Maybe Int- , _nodeSectionGroups :: Maybe [T.Text]+ , _nodeInst :: Maybe Int+ , _nodeInstPlaceholder :: Maybe T.Text+ , _nodeOwner :: Maybe T.Text+ , _nodeIndex :: Maybe Int+ , _nodeGroups :: Maybe [T.Text] -- | Other header information.- , _nodeSectionHeaders :: M.HashMap T.Text GodotValue+ , _nodeHeaders :: M.HashMap T.Text GodotValue -- | Body of the configuration entry.- , _nodeSectionEntries :: M.HashMap T.Text GodotValue+ , _nodeEntries :: M.HashMap T.Text GodotValue }- | ConnectionSection- { _connectionSectionSignal :: T.Text- , _connectionSectionFrom :: T.Text- , _connectionSectionTo :: T.Text- , _connectionSectionMethod :: T.Text+ deriving (Show, Generic)++data Connection =+ Connection+ { _connectionSignal :: T.Text+ , _connectionFrom :: T.Text+ , _connectionTo :: T.Text+ , _connectionMethod :: T.Text -- | Other header information.- , _connectionSectionHeaders :: M.HashMap T.Text GodotValue+ , _connectionHeaders :: M.HashMap T.Text GodotValue -- | Body of the configuration entry.- , _connectionSectionEntries :: M.HashMap T.Text GodotValue+ , _connectionEntries :: M.HashMap T.Text GodotValue }- | ResourceSection- { _resourceSectionResourceName :: Maybe T.Text- , _resourceSectionClassName :: Maybe T.Text- , _resourceSectionLibrary :: Maybe (T.Text, [GodotValue])+ deriving (Show, Generic)++data Resource =+ Resource+ { _resourceResourceName :: Maybe T.Text+ , _resourceClassName :: Maybe T.Text+ , _resourceLibrary :: Maybe (T.Text, [GodotValue]) }+ deriving (Show, Generic)++-- | Godot resource section prefixed with a bracket-enclosed header, optionally+-- with body entries.+--+-- Header entries not specified in a record are accessed with the relevant `headers` field.+-- Likewise, body entries not specified are accessed with the `entries` field.+-- Note that explicitly specified section fields are not duplicated in `headers` and+-- `entries` fields.+data GodotSection+ = ExtResourceSection ExtResource+ | SubResourceSection SubResource+ | NodeSection Node+ | ConnectionSection Connection+ | ResourceSection Resource | OtherSection { _otherSectionHeader :: T.Text , _otherSectionHeaders :: M.HashMap T.Text GodotValue@@ -314,33 +339,33 @@ -- conversion function. headerWrapper :: T.Text- -> (M.HashMap T.Text GodotValue -> M.HashMap T.Text GodotValue -> GodotSection)- -> Parser GodotSection+ -> (M.HashMap T.Text GodotValue -> M.HashMap T.Text GodotValue -> a)+ -> Parser a headerWrapper targetSect p = do (headerName, headerKvs', bodyKvs) <- bodyAndKvs unless (headerName == targetSect) (fail "mismatched expected header") pure $ p headerKvs' bodyKvs -- | Parse a `[sub_resource]` section.-tscnSubResourceP :: Parser GodotSection+tscnSubResourceP :: Parser SubResource tscnSubResourceP = headerWrapper "sub_resource"- (\kvs bodyKvs -> SubResourceSection (unGodotString' "type" kvs) (unGodotInt' "id" kvs)+ (\kvs bodyKvs -> SubResource (unGodotString' "type" kvs) (unGodotInt' "id" kvs) (collectRest ["type", "id"] kvs) bodyKvs) -- | Parse an `[ext_resource]` section.-tscnExtResourceP :: Parser GodotSection+tscnExtResourceP :: Parser ExtResource tscnExtResourceP = headerWrapper "ext_resource"- (\kvs bodyKvs -> ExtResourceSection (unGodotString' "path" kvs)+ (\kvs bodyKvs -> ExtResource (unGodotString' "path" kvs) (unGodotString' "type" kvs) (unGodotInt' "id" kvs) (collectRest ["path", "type", "id"] kvs) bodyKvs) -- | Parse a `[node]` section.-tscnNodeP :: Parser GodotSection+tscnNodeP :: Parser Node tscnNodeP = headerWrapper "node"- (\kvs bodyKvs -> NodeSection (unGodotString "type" kvs) (unGodotString' "name" kvs)+ (\kvs bodyKvs -> Node (unGodotString "type" kvs) (unGodotString' "name" kvs) (unGodotString "parent" kvs) ((\(GodotInt i) -> i) . head . snd <$> unGodotConstructor "instance" kvs) (unGodotString "instance_placeholder" kvs) (unGodotString "owner" kvs)@@ -357,10 +382,10 @@ , "groups"] kvs) bodyKvs) -- | Parse a `[connection]` section.-tscnConnectionP :: Parser GodotSection+tscnConnectionP :: Parser Connection tscnConnectionP = headerWrapper "connection"- (\kvs bodyKvs -> ConnectionSection (unGodotString' "signal" kvs)+ (\kvs bodyKvs -> Connection (unGodotString' "signal" kvs) (unGodotString' "from" kvs) (unGodotString' "to" kvs) (unGodotString' "method" kvs) (collectRest ["signal", "from", "to", "method"] kvs) bodyKvs) @@ -379,15 +404,15 @@ sectionP = P.choice (map P.try- [tscnConnectionP, tscnExtResourceP, tscnSubResourceP, tscnNodeP, otherP])+ [ConnectionSection <$> tscnConnectionP, ExtResourceSection <$> tscnExtResourceP, SubResourceSection <$> tscnSubResourceP, NodeSection <$> tscnNodeP, otherP]) sections <- P.manyTill sectionP P.eof pure $ TscnParsed (TscnDescriptor loadSteps format) sections -- | Parse a `[resource]` section.-resourceP :: Parser GodotSection+resourceP :: Parser Resource resourceP = headerWrapper "resource"- (\_ bodyKvs -> ResourceSection (unGodotString "resource_name" bodyKvs)+ (\_ bodyKvs -> Resource (unGodotString "resource_name" bodyKvs) (unGodotString "class_name" bodyKvs) (unGodotConstructor "library" bodyKvs)) -- | Parse a `gdns` file.@@ -397,7 +422,7 @@ let ty = unGodotString' "type" kvs loadSteps = unGodotInt' "load_steps" kvs format = unGodotInt' "format" kvs- sectionP = P.choice (map P.try [tscnExtResourceP, resourceP, otherP])+ sectionP = P.choice (map P.try [ExtResourceSection <$> tscnExtResourceP, ResourceSection <$> resourceP, otherP]) sections <- P.manyTill sectionP P.eof pure $ GdnsParsed (GdnsDescriptor ty loadSteps format) sections
src/Godot/Parser/Resource/Lens.hs view
@@ -26,3 +26,13 @@ makeLenses ''OtherParsed makeLenses ''GodotParsed++makeLenses ''ExtResource++makeLenses ''SubResource++makeLenses ''Node++makeLenses ''Connection++makeLenses ''Resource