浏览代码

[lua] add _G to reserved idents

Justin Donaldson 9 年之前
父节点
当前提交
383ab30e9e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/generators/genlua.ml

+ 1 - 1
src/generators/genlua.ml

@@ -74,7 +74,7 @@ let s_path ctx = dot_path
 let kwds =
 	let h = Hashtbl.create 0 in
 	List.iter (fun s -> Hashtbl.add h s ()) [
-	    ""; "and"; "break"; "do"; "else"; "elseif";
+	    "_G"; ""; "and"; "break"; "do"; "else"; "elseif";
 	    "end"; "false"; "for"; "function"; "if";
 	    "in"; "local"; "nil"; "not"; "or"; "repeat";
 	    "return"; "then"; "true"; "until"; "while";