def create_float(self, node): """ Return float """ value = str(node.text) Number.validate(value) return Number.cast(value)
def create_integer(self, node): """ Create an integer """ value = str(node.text) if not Number.validate(value): raise Exception("Value does is not a valid integer") return Number.cast(value)