You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Programmatically generate method signatures with required operand arguments and optional operand arguments for each instruction. This would entail finding the minimum and maximum number of operands for each instruction and building a list of arguments (ex: op1,op2,op3=nil). The generated argument list could be used in both the instructions.rb.erb file for the instruction method and the instruction.rb.erb file for the initialize method.
This will prevent accidentally calling an instruction with the wrong number of arguments.
The text was updated successfully, but these errors were encountered:
* If an instruction does not accept operand, then do not generate any
method arguments.
* If an instruction accepts a single operand, then generate a
`operand` argument.
* If an instruction accepts exactly N operands, then generate
`operand1,operand2,..,operandN` arguments.
* If an instruction accepts zero or more operands, then generate
a `*operands` argument.
* If an instruction accepts N or more operands, then generate
`operand1,operand2,...,*operands` arguments.
Programmatically generate method signatures with required operand arguments and optional operand arguments for each instruction. This would entail finding the minimum and maximum number of operands for each instruction and building a list of arguments (ex:
op1,op2,op3=nil
). The generated argument list could be used in both theinstructions.rb.erb
file for the instruction method and theinstruction.rb.erb
file for theinitialize
method.This will prevent accidentally calling an instruction with the wrong number of arguments.
The text was updated successfully, but these errors were encountered: