Browse Source

AST: Make more const

master
Riyyi 2 years ago
parent
commit
5f49f08eea
  1. 18
      src/ast.h

18
src/ast.h

@ -124,7 +124,7 @@ public:
const std::string& data() const { return m_data; } const std::string& data() const { return m_data; }
private: private:
std::string m_data; const std::string m_data;
}; };
// ----------------------------------------- // -----------------------------------------
@ -140,7 +140,7 @@ public:
const std::string& keyword() const { return m_data; } const std::string& keyword() const { return m_data; }
private: private:
std::string m_data; const std::string m_data;
}; };
// ----------------------------------------- // -----------------------------------------
@ -155,7 +155,7 @@ public:
int64_t number() const { return m_number; } int64_t number() const { return m_number; }
private: private:
int64_t m_number { 0 }; const int64_t m_number { 0 };
}; };
// ----------------------------------------- // -----------------------------------------
@ -177,7 +177,7 @@ public:
State state() const { return m_state; } State state() const { return m_state; }
private: private:
State m_state; const State m_state;
}; };
// ----------------------------------------- // -----------------------------------------
@ -193,7 +193,7 @@ public:
const std::string& symbol() const { return m_symbol; } const std::string& symbol() const { return m_symbol; }
private: private:
std::string m_symbol; const std::string m_symbol;
}; };
// ----------------------------------------- // -----------------------------------------
@ -212,7 +212,7 @@ public:
private: private:
const std::string m_name; const std::string m_name;
FunctionType m_function; const FunctionType m_function;
}; };
// ----------------------------------------- // -----------------------------------------
@ -229,9 +229,9 @@ public:
EnvironmentPtr env() const { return m_env; } EnvironmentPtr env() const { return m_env; }
private: private:
std::vector<std::string> m_bindings; const std::vector<std::string> m_bindings;
ASTNodePtr m_body; const ASTNodePtr m_body;
EnvironmentPtr m_env; const EnvironmentPtr m_env;
}; };
// ----------------------------------------- // -----------------------------------------

Loading…
Cancel
Save