Added $scryer_prolog_version/1

This commit is contained in:
notoria
2020-05-02 01:52:53 +02:00
parent 319a4622b3
commit 98d38d763b
4 changed files with 19 additions and 16 deletions

View File

@@ -3543,6 +3543,15 @@ impl MachineState {
unreachable!()
}
}
&SystemClauseType::ScryerPrologVersion => {
use crate::git_version::git_version;
let version = self[temp_v!(1)];
let buffer =
git_version!(cargo_prefix = "cargo:", fallback = "unknown");
let chars = buffer.chars().map(|c| Addr::Char(c));
let result = Addr::HeapCell(self.heap.to_list(chars));
self.unify(version, result);
}
};
return_from_clause!(self.last_call, self)