Browse Source

added NULL as C kwd (close https://github.com/HaxeFoundation/hashlink/issues/341)

Nicolas Cannasse 5 years ago
parent
commit
cd0f0219b4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/generators/hl2c.ml

+ 2 - 0
src/generators/hl2c.ml

@@ -87,6 +87,8 @@ let keywords =
 	"auto";"break";"case";"char";"const";"continue";"default";"do";"double";"else";"enum";"extern";"float";"for";"goto";
 	"if";"int";"long";"register";"return";"short";"signed";"sizeof";"static";"struct";"switch";"typedef";"union";"unsigned";
 	"void";"volatile";"while";
+	(* Values *)
+	"NULL";"true";"false";
 	(* MS specific *)
 	"__asm";"dllimport2";"__int8";"naked2";"__based1";"__except";"__int16";"__stdcall";"__cdecl";"__fastcall";"__int32";
 	"thread2";"__declspec";"__finally";"__int64";"__try";"dllexport2";"__inline";"__leave";"asm";