Changeset 3931 for to-imperative


Ignore:
Timestamp:
Sep 18, 2008, 5:49:38 PM (12 years ago)
Author:
yura
Message:
  • TExpr::eq(TExpr*, size_t)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/opents/samples/trefal.hh

    r3928 r3931  
    2525   inline TExpr (Term& _t);                             // dereference: _t is EXPR or CONST
    2626   inline bool operator== (TExpr& _e);
     27   inline bool eq (TExpr& _e, size_t _start);
    2728   inline TExpr operator+ (TExpr& _e);
    2829   inline TExpr operator() ();
     
    405406}
    406407
     408inline bool TExpr::eq (TExpr& _e, size_t _start) {
     409    GExpr l(*this);
     410    GExpr r(_e);
     411    r.subexpr(_start, l.size);
     412    return l == r;
     413}
     414
    407415inline TExpr TExpr::operator+ (TExpr& _e) {
    408416    const Expr* exprs[] = { &(Expr&)*this, &(Expr&)_e };
Note: See TracChangeset for help on using the changeset viewer.