git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: move to '_prime' codegen
c6b0b0aAndy Arvanitis
src/Language/PureScript/CodeGen/Cpp/Common.hs+3−22
@@ -53,28 +53,9 @@ identNeedsEscaping s = s /= identToCpp (Ident s)
53identCharToString :: Char -> String
53identCharToString :: Char -> String
54identCharToString c | isAlphaNum c = [c]
54identCharToString c | isAlphaNum c = [c]
55identCharToString '_' = "_"
55identCharToString '_' = "_"
56−identCharToString '.' = "_dot_"
56+identCharToString '.' = "_"
57−identCharToString '$' = "_dollar_"
57+identCharToString '\'' = "_prime"
58−identCharToString '~' = "_tilde_"
58+identCharToString c = "$0" ++ show (ord c)
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) ++ "_"
78
59
79-- |
60-- |
80-- Checks whether an identifier name is reserved in C++11.
61-- Checks whether an identifier name is reserved in C++11.