mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Add the name getter for symbols
Change-Id: I270ff8202f106a70a8bb0c980955a1b7d431c455
This commit is contained in:
@@ -10,6 +10,7 @@ class Symbol : public LeafExpression {
|
||||
ExpressionLayout * createLayout() const override;
|
||||
float approximate(Context& context) const override;
|
||||
Type type() const override;
|
||||
const char* name() const;
|
||||
Expression * clone() const override;
|
||||
bool valueEquals(const Expression * e) const override;
|
||||
private:
|
||||
|
||||
@@ -25,6 +25,10 @@ Expression::Type Symbol::type() const {
|
||||
return Expression::Type::Symbol;
|
||||
}
|
||||
|
||||
const char* Symbol::name() const {
|
||||
return m_name;
|
||||
}
|
||||
|
||||
ExpressionLayout * Symbol::createLayout() const {
|
||||
size_t length = strlen(m_name);
|
||||
return new StringLayout(m_name, length);
|
||||
|
||||
Reference in New Issue
Block a user