git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Clean up comments
commit4198e2bc1b5dc92809c7c675e2d92c039c7bdf9a authorAndy Arvanitis <andyarvanitis@gmail.com> dateMon 13 Aug 2018, 18:05 (8 years ago) parentac0782e
1 file changed+12−12
src/CodeGen/Cpp.hs+12−12
src/CodeGen/Cpp.hs+12−12
@@ -41,7 +41,7 @@ import CodeGen.Cpp.Printer
4141
4242data DeclType = ModuleDecl | LetDecl | RecLetDecl deriving (Eq)
4343
44−-- | Generate code in the simplified Objective-C intermediate representation for all declarations in a
44+-- | Generate code in the simplified intermediate representation for all declarations in a
4545-- module.
4646moduleToCpp
4747 :: forall m
@@ -93,7 +93,7 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
9393 then freshModuleName (i + 1) mn' used
9494 else newName
9595
96− -- | Generates Objective-C code for a module import, binding the required module
96+ -- | Generates C++ code for a module import, binding the required module
9797 -- to the alternative
9898 importToCpp :: M.Map ModuleName (Ann, ModuleName) -> ModuleName -> m Text
9999 importToCpp mnLookup mn' = do
@@ -121,7 +121,7 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
121121 renameQual q = q
122122
123123 -- |
124− -- Generate code in the simplified Objective-C intermediate representation for a declaration
124+ -- Generate code in the simplified intermediate representation for a declaration
125125 --
126126 bindToCpp :: DeclType -> Bind Ann -> m [AST]
127127 bindToCpp dt (NonRec ann ident val) = return <$> nonRecToCpp dt ann ident val
@@ -129,7 +129,7 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
129129 where
130130 dt' = if dt == LetDecl then RecLetDecl else dt
131131
132− -- | Generate code in the simplified Objective-C intermediate representation for a single non-recursive
132+ -- | Generate code in the simplified intermediate representation for a single non-recursive
133133 -- declaration.
134134 --
135135 -- The main purpose of this function is to handle code generation for comments.
@@ -166,13 +166,13 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
166166 cpp <- valueToCpp val
167167 pure $ AST.VariableIntroduction Nothing (identToCpp ident) (Just cpp)
168168
169− -- | Generate code in the simplified Objective-C intermediate representation for a variable based on a
169+ -- | Generate code in the simplified intermediate representation for a variable based on a
170170 -- PureScript identifier.
171171 var :: Ident -> AST
172172 var = AST.Var Nothing . identToCpp
173173
174− -- | Generate code in the simplified Objective-C intermediate representation for an accessor based on
175− -- a PureScript identifier. If the name is not valid in Objective-C (symbol based, reserved name) an
174+ -- | Generate code in the simplified intermediate representation for an accessor based on
175+ -- a PureScript identifier. If the name is not valid in C++ (symbol based, reserved name) an
176176 -- indexer is returned.
177177 accessor :: Ident -> AST -> AST
178178 accessor (Ident prop) = accessorString $ mkString prop
@@ -182,7 +182,7 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
182182 accessorString :: PSString -> AST -> AST
183183 accessorString prop = AST.Indexer Nothing (AST.StringLiteral Nothing prop)
184184
185− -- | Generate code in the simplified Objective-C intermediate representation for a value or expression.
185+ -- | Generate code in the simplified intermediate representation for a value or expression.
186186
187187 valueToCpp :: Expr Ann -> m AST
188188 valueToCpp (Literal (pos, _, _, _) l) = literalToValueCpp pos l
@@ -266,13 +266,13 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
266266 literalToValueCpp ss (ArrayLiteral xs) = AST.ArrayLiteral (Just ss) <$> mapM valueToCpp xs
267267 literalToValueCpp ss (ObjectLiteral ps) = AST.ObjectLiteral (Just ss) <$> mapM (sndM valueToCpp) ps
268268
269− -- | Generate code in the simplified Objective-C intermediate representation for a reference to a
269+ -- | Generate code in the simplified intermediate representation for a reference to a
270270 -- variable.
271271 varToCpp :: Qualified Ident -> AST
272272 varToCpp (Qualified Nothing ident) = var ident
273273 varToCpp qual = qualifiedToCpp id qual
274274
275− -- | Generate code in the simplified Objective-C intermediate representation for a reference to a
275+ -- | Generate code in the simplified intermediate representation for a reference to a
276276 -- variable that may have a qualified name.
277277 qualifiedToCpp :: (a -> Ident) -> Qualified a -> AST
278278 qualifiedToCpp f (Qualified (Just (ModuleName [ProperName mn'])) a) | mn' == C.prim = AST.Var Nothing . runIdent $ f a
@@ -282,7 +282,7 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
282282 -- foreignIdent :: Ident -> AST
283283 -- foreignIdent ident = accessorString (mkString $ runIdent ident) (AST.Var Nothing "$foreign")
284284
285− -- | Generate code in the simplified Objective-C intermediate representation for pattern match binders
285+ -- | Generate code in the simplified intermediate representation for pattern match binders
286286 -- and guards.
287287 bindersToCpp :: SourceSpan -> [CaseAlternative Ann] -> [AST] -> m AST
288288 bindersToCpp ss binders vals = do
@@ -315,7 +315,7 @@ moduleToCpp (Module _ coms mn _ imps exports foreigns decls) _ =
315315
316316 guardsToCpp (Right v) = return . AST.Return Nothing <$> valueToCpp v
317317
318− -- | Generate code in the simplified Objective-C intermediate representation for a pattern match
318+ -- | Generate code in the simplified intermediate representation for a pattern match
319319 -- binder.
320320 binderToCpp :: Text -> [AST] -> Binder Ann -> m [AST]
321321 binderToCpp _ done NullBinder{} = return done