Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C] Emit correct function prototypes #185

Merged
merged 1 commit into from Sep 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/src/BNFC/Backend/C/CFtoCAbs.hs
Expand Up @@ -138,7 +138,7 @@ prRuleH c (fun, cats) =
show c ++ " make_" ++ fun ++ "(" ++ (prParamsH 0 (getVars cats)) ++ ");\n"
where
prParamsH :: Int -> [(String, a)] -> String
prParamsH _ [] = ""
prParamsH _ [] = "void"
prParamsH n ((t,_):[]) = t ++ " p" ++ (show n)
prParamsH n ((t,_):vs) = (t ++ " p" ++ (show n) ++ ", ") ++ (prParamsH (n+1) vs)

Expand Down