Make font-stretch animatable.

This commit is contained in:
Mantaroh Yoshinaga 2017-05-19 09:02:27 +09:00
parent 0b3fd8de76
commit c71abc0c28
4 changed files with 78 additions and 9 deletions

View file

@ -127,6 +127,15 @@ class Keyword(object):
def maybe_cast(self, type_str):
return "as " + type_str if self.needs_cast() else ""
def casted_constant_name(self, value, cast_type):
if cast_type is None:
raise TypeError("We should specify the cast_type.")
if self.gecko_enum_prefix is None:
return cast_type.upper() + "_" + self.gecko_constant(value)
else:
return cast_type.upper() + "_" + self.gecko_constant(value).upper().replace("::", "_")
def arg_to_bool(arg):
if isinstance(arg, bool):