Changeset b5978ca for src/AST/Type.cpp


Ignore:
Timestamp:
Mar 24, 2025, 2:04:44 PM (5 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
d73e667
Parents:
f5bf3c2
Message:

Moved a reasonably large function out of a header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/AST/Type.cpp

    rf5bf3c2 rb5978ca  
    167167bool TypeInstType::isComplete() const { return base->sized; }
    168168
     169static std::string toTypeString( int usage, int id, std::string const & name ) {
     170        return "_" + std::to_string( usage ) + "_" + std::to_string( id ) + "_" + name;
     171}
     172
     173std::string TypeInstType::typeString() const {
     174        return ( 0 < formal_usage ) ? toTypeString( formal_usage, expr_id, name ) : name;
     175}
     176
    169177std::string TypeEnvKey::typeString() const {
    170         return std::string("_") + std::to_string(formal_usage)
    171                 + "_" + std::to_string(expr_id) + "_" + base->name;
     178        return toTypeString( formal_usage, expr_id, base->name );
    172179}
    173180
Note: See TracChangeset for help on using the changeset viewer.