Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static EXP_type evaluate_sequence(PAI_type Expressions)
- { sEQ_type sequence_thread;
- CNT_type continuation;
- EXP_type expression;
- PAI_type expressions;
- TAG_type tag;
- expression = Expressions->car;
- expressions = Expressions->cdr;
- tag = Tag_of(expressions);
- switch (tag)
- { case NUL_tag:
- return evaluate_expression(expression);
- case PAI_tag:
- // If the previous continuation was a continue_sequence we can reuse it.
- continuation = Thread_Peek();
- if(continuation->cfn == Continue_sequence)
- {
- sequence_thread = (sEQ_type)continuation;
- sequence_thread->exs = expressions;
- }
- else
- {
- continuation = Thread_Push(Continue_sequence,
- sEQ_size);
- sequence_thread = (sEQ_type)continuation;
- sequence_thread->exs = expressions;
- }
- return evaluate_expression(expression);
- }
- return Main_Error_Text(ITF_error_string,
- Main_Sequence_String); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement