1
0
nvim-config/pythonx/ultisnips/c.py
valeth d6fcdb2060 add ultisnips plugin
add snippets in UltiSnips
add python modules in pythonx/ultisnips
2016-04-21 21:18:46 +02:00

17 lines
274 B
Python

def returnval(t):
if t == "void":
return ""
ret = {
"int": "0",
"float": "0.0",
"double": "0.0",
"bool": "false"
}
if t in ret.keys():
return "return " + ret[t] + ";"
else:
return "return NULL;"