Changeset 5cc53b2


Ignore:
Timestamp:
Jan 16, 2025, 1:58:15 PM (4 days ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
4ac0949
Parents:
9c65169
Message:

Updated documenation in VariableExpr::get_lvalue. This accounts for the code update that did not update the documentation and the rather sparse original documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r9c65169 r5cc53b2  
    122122
    123123bool VariableExpr::get_lvalue() const {
    124         // It isn't always an lvalue, but it is never an rvalue.
     124        // Special case for enumeration labels (more literals than variables):
    125125        if(dynamic_cast<const ast::EnumInstType *>(var->get_type())) return !var->isMember;
     126        // The remaining uses are either actual variables (lvalues) or function
     127        // names which are a special value catagory that can be treated as
     128        // lvalues in the places we are worried about.
    126129        return true;
    127130}
Note: See TracChangeset for help on using the changeset viewer.