In revising a written instrument, the court may inquire what the instrument was intended to mean, and what were intended to be its legal consequences, and is not confined to the inquiry what the language of the instrument was intended to be.
SDCL 21-11-3