diff --git a/src/codegen.inc.php b/src/codegen.inc.php index 0bea2fb..9d84729 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -23,10 +23,7 @@ function supported_tokens() { return [ 'default', - 'optional', 'virtual', - //TODO: anyone uses it? - 'is_enum_mask', ]; } @@ -223,8 +220,7 @@ function data2value($name, \mtgType $type, $buf, $prefix = '', $tokens = array() else if($type instanceof \mtgMetaEnum) { $str .= $cond_indent."{$tmp_val} = " . apply_value_filters($name, $tokens, "{$tmp_val}"). ";\n"; - $check_enum_validity = array_key_exists('is_enum_mask', $tokens) ? 'false' : 'true'; - $str .= $cond_indent."{$pname} = \metagen_php\\val_enum('$type', {$tmp_val}, {$check_enum_validity});\n"; + $str .= $cond_indent."{$pname} = \metagen_php\\val_enum('$type', {$tmp_val}, false);\n"; } else throw new Exception("Unknown type '{$type}'");