소스 검색

[python] generate Void as None

Dan Korostelev 4 년 전
부모
커밋
b80eff3fd0
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/generators/genpy.ml

+ 2 - 0
src/generators/genpy.ml

@@ -1215,6 +1215,8 @@ module Printer = struct
 		match e.eexpr with
 			| TConst ct ->
 				print_constant ct
+			| TTypeExpr (TAbstractDecl { a_path = [],"Void" }) ->
+				"None"
 			| TTypeExpr mt ->
 				print_module_type mt
 			| (TLocal v | TParenthesis({ eexpr = (TLocal v) })) ->