Ignore:
Timestamp:
Jul 27, 2006, 5:00:40 PM (14 years ago)
Author:
orlov
Message:
  • New RTS option -break -- for breaking in functions compiled with -dbg.
  • Table support for Values and Entries new library functions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/runtime/rf_table.cc

    r1266 r2040  
    365365}
    366366
    367 
    368 }
     367void list_values (TableNode const& _node, Expr& _res)
     368{
     369  if (_node.left != TableNode::nil) {   
     370    list_values( * _node.left, _res);
     371  }
     372  if (_node.right != TableNode::nil) {
     373    list_values( * _node.right, _res);
     374  }
     375  _res = _res + _node.val();
     376}
     377
     378void list_entries (TableNode const& _node, Expr& _res)
     379{
     380  if (_node.left != TableNode::nil) {   
     381    list_entries( * _node.left, _res);
     382  }
     383  if (_node.right != TableNode::nil) {
     384    list_entries( * _node.right, _res);
     385  }
     386  _res = _res + (_node.key() + _node.val())();
     387}
     388
     389
     390}
Note: See TracChangeset for help on using the changeset viewer.