git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge remote-tracking branch 'pure11/pure11' into native
commit7026c438d30029f74eb1fb08f8fa4695e5427950 authorAndy Arvanitis <andyarvanitis@gmail.com> dateTue 22 Nov 2016, 16:25 (10 years ago) parentaded024c6b0b0a
1 file changed+3−22
src/Language/PureScript/CodeGen/Cpp/Common.hs+3−22
src/Language/PureScript/CodeGen/Cpp/Common.hs+3−22
@@ -53,28 +53,9 @@ identNeedsEscaping s = s /= identToCpp (Ident s)
5353identCharToString :: Char -> String
5454identCharToString c | isAlphaNum c = [c]
5555identCharToString '_' = "_"
56−identCharToString '.' = "_dot_"
57−identCharToString '$' = "_dollar_"
58−identCharToString '~' = "_tilde_"
59−identCharToString '=' = "_eq_"
60−identCharToString '<' = "_less_"
61−identCharToString '>' = "_greater_"
62−identCharToString '!' = "_bang_"
63−identCharToString '#' = "_hash_"
64−identCharToString '%' = "_percent_"
65−identCharToString '^' = "_up_"
66−identCharToString '&' = "_amp_"
67−identCharToString '|' = "_bar_"
68−identCharToString '*' = "_times_"
69−identCharToString '/' = "_div_"
70−identCharToString '+' = "_plus_"
71−identCharToString '-' = "_minus_"
72−identCharToString ':' = "_colon_"
73−identCharToString '\\' = "_bslash_"
74−identCharToString '?' = "_qmark_"
75−identCharToString '@' = "_at_"
76−identCharToString '\'' = "_prime_"
77−identCharToString c = '_' : show (ord c) ++ "_"
56+identCharToString '.' = "_"
57+identCharToString '\'' = "_prime"
58+identCharToString c = "$0" ++ show (ord c)
7859
7960-- |
8061-- Checks whether an identifier name is reserved in C++11.