improve formating
This commit is contained in:
parent
aa4e527781
commit
83318018e6
@ -176,7 +176,7 @@ void TType::buildMangledName(TString& mangledName) const
|
|||||||
// Dump functions.
|
// Dump functions.
|
||||||
//
|
//
|
||||||
|
|
||||||
void TSymbol::dumpExtensions(TInfoSink &infoSink) const
|
void TSymbol::dumpExtensions(TInfoSink& infoSink) const
|
||||||
{
|
{
|
||||||
int numExtensions = getNumExtensions();
|
int numExtensions = getNumExtensions();
|
||||||
if (numExtensions) {
|
if (numExtensions) {
|
||||||
@ -189,13 +189,12 @@ void TSymbol::dumpExtensions(TInfoSink &infoSink) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TVariable::dump(TInfoSink &infoSink, bool complete) const
|
void TVariable::dump(TInfoSink& infoSink, bool complete) const
|
||||||
{
|
{
|
||||||
if (complete) {
|
if (complete) {
|
||||||
infoSink.debug << getName().c_str() << ": " << type.getCompleteString();
|
infoSink.debug << getName().c_str() << ": " << type.getCompleteString();
|
||||||
dumpExtensions(infoSink);
|
dumpExtensions(infoSink);
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
infoSink.debug << getName().c_str() << ": " << type.getStorageQualifierString() << " "
|
infoSink.debug << getName().c_str() << ": " << type.getStorageQualifierString() << " "
|
||||||
<< type.getBasicTypeString();
|
<< type.getBasicTypeString();
|
||||||
|
|
||||||
@ -206,7 +205,7 @@ void TVariable::dump(TInfoSink &infoSink, bool complete) const
|
|||||||
infoSink.debug << "\n";
|
infoSink.debug << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void TFunction::dump(TInfoSink &infoSink, bool complete) const
|
void TFunction::dump(TInfoSink& infoSink, bool complete) const
|
||||||
{
|
{
|
||||||
if (complete) {
|
if (complete) {
|
||||||
infoSink.debug << getName().c_str() << ": " << returnType.getCompleteString() << " " << getName().c_str()
|
infoSink.debug << getName().c_str() << ": " << returnType.getCompleteString() << " " << getName().c_str()
|
||||||
@ -222,8 +221,7 @@ void TFunction::dump(TInfoSink &infoSink, bool complete) const
|
|||||||
|
|
||||||
infoSink.debug << ")";
|
infoSink.debug << ")";
|
||||||
dumpExtensions(infoSink);
|
dumpExtensions(infoSink);
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
infoSink.debug << getName().c_str() << ": " << returnType.getBasicTypeString() << " "
|
infoSink.debug << getName().c_str() << ": " << returnType.getBasicTypeString() << " "
|
||||||
<< getMangledName().c_str() << "n";
|
<< getMangledName().c_str() << "n";
|
||||||
}
|
}
|
||||||
@ -231,20 +229,20 @@ void TFunction::dump(TInfoSink &infoSink, bool complete) const
|
|||||||
infoSink.debug << "\n";
|
infoSink.debug << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void TAnonMember::dump(TInfoSink &TInfoSink, bool complete) const
|
void TAnonMember::dump(TInfoSink& TInfoSink, bool complete) const
|
||||||
{
|
{
|
||||||
TInfoSink.debug << "anonymous member " << getMemberNumber() << " of " << getAnonContainer().getName().c_str()
|
TInfoSink.debug << "anonymous member " << getMemberNumber() << " of " << getAnonContainer().getName().c_str()
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSymbolTableLevel::dump(TInfoSink &infoSink, bool complete) const
|
void TSymbolTableLevel::dump(TInfoSink& infoSink, bool complete) const
|
||||||
{
|
{
|
||||||
tLevel::const_iterator it;
|
tLevel::const_iterator it;
|
||||||
for (it = level.begin(); it != level.end(); ++it)
|
for (it = level.begin(); it != level.end(); ++it)
|
||||||
(*it).second->dump(infoSink, complete);
|
(*it).second->dump(infoSink, complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSymbolTable::dump(TInfoSink &infoSink, bool complete) const
|
void TSymbolTable::dump(TInfoSink& infoSink, bool complete) const
|
||||||
{
|
{
|
||||||
for (int level = currentLevel(); level >= 0; --level) {
|
for (int level = currentLevel(); level >= 0; --level) {
|
||||||
infoSink.debug << "LEVEL " << level << "\n";
|
infoSink.debug << "LEVEL " << level << "\n";
|
||||||
|
|||||||
@ -116,8 +116,8 @@ public:
|
|||||||
}
|
}
|
||||||
virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
|
virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
|
||||||
virtual const char** getExtensions() const { return extensions->data(); }
|
virtual const char** getExtensions() const { return extensions->data(); }
|
||||||
virtual void dump(TInfoSink &infoSink, bool complete = false) const = 0;
|
virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
|
||||||
void dumpExtensions(TInfoSink &infoSink) const;
|
void dumpExtensions(TInfoSink& infoSink) const;
|
||||||
|
|
||||||
virtual bool isReadOnly() const { return ! writable; }
|
virtual bool isReadOnly() const { return ! writable; }
|
||||||
virtual void makeReadOnly() { writable = false; }
|
virtual void makeReadOnly() { writable = false; }
|
||||||
@ -193,7 +193,7 @@ public:
|
|||||||
}
|
}
|
||||||
virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
|
virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
|
||||||
|
|
||||||
virtual void dump(TInfoSink &infoSink, bool complete = false) const;
|
virtual void dump(TInfoSink& infoSink, bool complete = false) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit TVariable(const TVariable&);
|
explicit TVariable(const TVariable&);
|
||||||
@ -314,7 +314,7 @@ public:
|
|||||||
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
|
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
|
||||||
virtual const TParameter& operator[](int i) const { return parameters[i]; }
|
virtual const TParameter& operator[](int i) const { return parameters[i]; }
|
||||||
|
|
||||||
virtual void dump(TInfoSink &infoSink, bool complete = false) const override;
|
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit TFunction(const TFunction&);
|
explicit TFunction(const TFunction&);
|
||||||
@ -374,7 +374,7 @@ public:
|
|||||||
virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
|
virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
|
||||||
|
|
||||||
virtual int getAnonId() const { return anonId; }
|
virtual int getAnonId() const { return anonId; }
|
||||||
virtual void dump(TInfoSink &infoSink, bool complete = false) const override;
|
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit TAnonMember(const TAnonMember&);
|
explicit TAnonMember(const TAnonMember&);
|
||||||
@ -542,7 +542,7 @@ public:
|
|||||||
|
|
||||||
void relateToOperator(const char* name, TOperator op);
|
void relateToOperator(const char* name, TOperator op);
|
||||||
void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
|
void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
|
||||||
void dump(TInfoSink &infoSink, bool complete = false) const;
|
void dump(TInfoSink& infoSink, bool complete = false) const;
|
||||||
TSymbolTableLevel* clone() const;
|
TSymbolTableLevel* clone() const;
|
||||||
void readOnly();
|
void readOnly();
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int getMaxSymbolId() { return uniqueId; }
|
int getMaxSymbolId() { return uniqueId; }
|
||||||
void dump(TInfoSink &infoSink, bool complete = false) const;
|
void dump(TInfoSink& infoSink, bool complete = false) const;
|
||||||
void copyTable(const TSymbolTable& copyOf);
|
void copyTable(const TSymbolTable& copyOf);
|
||||||
|
|
||||||
void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); }
|
void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user