瀏覽代碼

handle keywords for nonlocal declarations

Simon Krajewski 11 年之前
父節點
當前提交
4753212155
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      genpy.ml

+ 1 - 1
genpy.ml

@@ -132,7 +132,7 @@ module Transformer = struct
 		{ v_name = n; v_type = t; v_id = 0; v_capture = capture; v_extra = None; v_meta = [] }
 
 	let create_non_local n pos =
-		let s = "nonlocal " ^ n in
+		let s = "nonlocal " ^ (KeywordHandler.handle_keywords n) in
 		(* TODO: this is a hack... *)
 		let id = mk (TLocal (to_tvar "python_Syntax.pythonCode" t_dynamic ) ) !t_void pos in
 		let id2 = mk (TLocal( to_tvar s t_dynamic )) !t_void pos in