Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RequiresEntryValue contain an Expression instead of a Reader #256

Merged
merged 1 commit into from
Oct 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ pub enum EvaluationResult<R: Reader> {
/// expression at the entry point of the current subprogram. Once the
/// caller determines what value to provide it should resume the
/// `Evaluation` by calling `Evaluation::resume_with_entry_value`.
RequiresEntryValue(R),
RequiresEntryValue(Expression<R>),
/// The `Evaluation` needs the value of the parameter at the given location
/// in the current function's caller. Once the caller determines what value
/// to provide it should resume the `Evaluation` by calling
Expand Down Expand Up @@ -1747,7 +1747,7 @@ impl<R: Reader> Evaluation<R> {
}
OperationEvaluationResult::AwaitingEntryValue { ref expression } => {
self.state = EvaluationState::Waiting(op_result.clone());
return Ok(EvaluationResult::RequiresEntryValue(expression.clone()));
return Ok(EvaluationResult::RequiresEntryValue(Expression(expression.clone())));
}
OperationEvaluationResult::AwaitingParameterRef { parameter } => {
self.state = EvaluationState::Waiting(op_result);
Expand Down Expand Up @@ -3179,7 +3179,7 @@ mod tests {
None, None, None, |eval, result| {
let entry_value = match result {
EvaluationResult::RequiresEntryValue(mut expression) => {
expression.read_u64()?
expression.0.read_u64()?
},
_ => panic!(),
};
Expand Down