Add '$random_integer'/3

This commit is contained in:
notoria
2024-12-08 20:00:00 +01:00
parent dba9c9a0a7
commit 8cde3f8ce3
6 changed files with 78 additions and 23 deletions

View File

@@ -419,6 +419,8 @@ enum SystemClauseType {
GetUnknown,
#[strum_discriminants(strum(props(Arity = "1", Name = "$install_new_block")))]
InstallNewBlock,
#[strum_discriminants(strum(props(Arity = "3", Name = "$random_integer")))]
RandomInteger,
#[strum_discriminants(strum(props(Arity = "0", Name = "$maybe")))]
Maybe,
#[strum_discriminants(strum(props(Arity = "1", Name = "$current_time")))]
@@ -1805,6 +1807,7 @@ fn generate_instruction_preface() -> TokenStream {
&Instruction::CallGetDoubleQuotes |
&Instruction::CallGetUnknown |
&Instruction::CallInstallNewBlock |
&Instruction::CallRandomInteger |
&Instruction::CallMaybe |
&Instruction::CallCpuNow |
&Instruction::CallDeterministicLengthRundown |
@@ -2042,6 +2045,7 @@ fn generate_instruction_preface() -> TokenStream {
&Instruction::ExecuteGetDoubleQuotes |
&Instruction::ExecuteGetUnknown |
&Instruction::ExecuteInstallNewBlock |
&Instruction::ExecuteRandomInteger |
&Instruction::ExecuteMaybe |
&Instruction::ExecuteCpuNow |
&Instruction::ExecuteDeterministicLengthRundown |