We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to use the data structure and a couple of the functions in a project.
The text was updated successfully, but these errors were encountered:
Can you be more specific about which types and functions you would like to be exported?
Sorry, something went wrong.
I am using the HashDefine type, and I've written functions to convert a HashDefine to a CPP argument and to a CPP predicate:
asArgument :: HashDefine -> String asArgument (AntiDefined{..}) = "-U" <> name asArgument (SymbolReplacement{..}) = "-D" <> name <> if replacement == "" then "" else ("=" <> replacement) asArgument _ = error $ "Unexpected HashDefine value" asPredicate :: HashDefine -> String asPredicate (AntiDefined{..}) = "!defined(" <> name <> ")" asPredicate (SymbolReplacement{..}) | replacement == "" = "defined(" <> name <> ")" asPredicate (SymbolReplacement{..}) | all (== '0') replacement = "!" <> name asPredicate (SymbolReplacement{..}) | all isDigit replacement = name asPredicate (SymbolReplacement{..}) = name <> " == " <> replacement asPredicate _ = ""
I might need the parseHashDefine function in the near future.
No branches or pull requests
I want to use the data structure and a couple of the functions in a project.
The text was updated successfully, but these errors were encountered: