浏览代码

ObjectField.quotes is optional, so handle that in haxe.macro.Printer

Dan Korostelev 8 年之前
父节点
当前提交
13112d7623
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/haxe/macro/Printer.hx

+ 1 - 1
std/haxe/macro/Printer.hx

@@ -174,7 +174,7 @@ class Printer {
 
 	public function printObjectFieldKey(of:ObjectField) {
 		return switch (of.quotes) {
-			case Unquoted: of.field;
+			case null | Unquoted: of.field;
 			case Quoted: '"${of.field}"'; // TODO: Have to escape that?
 		}
 	}