Template compiler for Sword