mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-05 22:48:42 +00:00
new compiler options in CMakeLists, fixes
This commit is contained in:
parent
9b3d2812ba
commit
17328b842c
11 changed files with 62 additions and 60 deletions
|
|
@ -4,9 +4,9 @@ project(LangInterpreter)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
find_package(Catch2 2 REQUIRED)
|
# find_package(Catch2 2 REQUIRED)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
|
||||||
|
|
||||||
include_directories(include
|
include_directories(include
|
||||||
tree-sitter/lib/src
|
tree-sitter/lib/src
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,13 @@ class ExecuteVisitor : public Visitor {
|
||||||
public:
|
public:
|
||||||
explicit ExecuteVisitor(info::GlobalInfo& global_info,
|
explicit ExecuteVisitor(info::GlobalInfo& global_info,
|
||||||
info::ContextManager<info::type::Type, info::type::TypeManager>& type_context_manager,
|
info::ContextManager<info::type::Type, info::type::TypeManager>& type_context_manager,
|
||||||
info::ContextManager<info::value::Value, info::value::ValueManager>& context_manager,
|
info::ContextManager<info::value::Value, info::value::ValueManager>& context_manager)
|
||||||
interpreter::tokens::PartitionStatement* execution_root)
|
: global_info_(global_info),
|
||||||
: namespace_visitor_(global_info.CreateVisitor()),
|
|
||||||
global_info_(global_info),
|
|
||||||
typeclass_graph_(*global_info.GetTypeclassGraph()),
|
typeclass_graph_(*global_info.GetTypeclassGraph()),
|
||||||
type_context_manager_(type_context_manager),
|
type_context_manager_(type_context_manager),
|
||||||
context_manager_(context_manager) {}
|
context_manager_(context_manager) {}
|
||||||
|
|
||||||
void VisitSourceFile(SourceFile* source_file) override {
|
void VisitSourceFile(SourceFile*) override {
|
||||||
error_handling::HandleInternalError("VisitSourceFile unavailible", "ExecuteVisitor.VisitSourceFile");
|
error_handling::HandleInternalError("VisitSourceFile unavailible", "ExecuteVisitor.VisitSourceFile");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -160,7 +158,6 @@ private:
|
||||||
return maybe_internal_value_info.value();
|
return maybe_internal_value_info.value();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
info::GlobalInfo::NamespaceVisitor namespace_visitor_;
|
|
||||||
info::GlobalInfo& global_info_;
|
info::GlobalInfo& global_info_;
|
||||||
info::TypeclassGraph& typeclass_graph_;
|
info::TypeclassGraph& typeclass_graph_;
|
||||||
info::ContextManager<info::type::Type, info::type::TypeManager>& type_context_manager_;
|
info::ContextManager<info::type::Type, info::type::TypeManager>& type_context_manager_;
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ public:
|
||||||
const std::string& type,
|
const std::string& type,
|
||||||
const std::string& name,
|
const std::string& name,
|
||||||
utils::IsConstModifier modifier) {
|
utils::IsConstModifier modifier) {
|
||||||
std::optional<utils::IdType> id = FindFunctionId(path, name);
|
std::optional<utils::IdType> id = FindMethodId(path, type, name, modifier);
|
||||||
if (!id.has_value()) {
|
if (!id.has_value()) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public:
|
||||||
utils::IdType type,
|
utils::IdType type,
|
||||||
utils::ClassModifier class_modifier,
|
utils::ClassModifier class_modifier,
|
||||||
TypeManager* type_manager)
|
TypeManager* type_manager)
|
||||||
: type_id_(type_id), type_(type), type_manager_(type_manager) {}
|
: type_id_(type_id), type_(type), class_modifier_(class_modifier), type_manager_(type_manager) {}
|
||||||
|
|
||||||
std::optional<utils::IdType> InContext(const std::unordered_map<std::string, utils::IdType>& context);
|
std::optional<utils::IdType> InContext(const std::unordered_map<std::string, utils::IdType>& context);
|
||||||
bool Same(const DefinedType& type) const;
|
bool Same(const DefinedType& type) const;
|
||||||
|
|
@ -177,7 +177,7 @@ public:
|
||||||
return constructors_;
|
return constructors_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const void SetCurrentConstructor(size_t constructor) {
|
void SetCurrentConstructor(size_t constructor) {
|
||||||
current_constructor_ = constructor;
|
current_constructor_ = constructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ void ExecuteVisitor::Visit(Namespace* node) { // never used ??
|
||||||
|
|
||||||
// Definitions -----------------
|
// Definitions -----------------
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(ImportStatement* node) {} // no value
|
void ExecuteVisitor::Visit(ImportStatement*) {} // no value
|
||||||
void ExecuteVisitor::Visit(AliasDefinitionStatement* node) {} // no value
|
void ExecuteVisitor::Visit(AliasDefinitionStatement*) {} // no value
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(VariableDefinitionStatement* node) { // visited on function call
|
void ExecuteVisitor::Visit(VariableDefinitionStatement* node) { // visited on function call
|
||||||
Visitor::Visit(node->value);
|
Visitor::Visit(node->value);
|
||||||
|
|
@ -42,17 +42,17 @@ void ExecuteVisitor::Visit(VariableDefinitionStatement* node) { // visited on fu
|
||||||
is_const_definition_ = std::nullopt;
|
is_const_definition_ = std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(FunctionDeclaration* node) {} // no value
|
void ExecuteVisitor::Visit(FunctionDeclaration*) {} // no value
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(FunctionDefinitionStatement* node) { // visited on function call
|
void ExecuteVisitor::Visit(FunctionDefinitionStatement* node) { // visited on function call
|
||||||
// Visit(node->definition.get());
|
// Visit(node->definition.get());
|
||||||
Visitor::Visit(node->value);
|
Visitor::Visit(node->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(TypeDefinitionStatement* node) {} // no value
|
void ExecuteVisitor::Visit(TypeDefinitionStatement*) {} // no value
|
||||||
void ExecuteVisitor::Visit(AbstractTypeDefinitionStatement* node) {} // no value
|
void ExecuteVisitor::Visit(AbstractTypeDefinitionStatement*) {} // no value
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(TypeclassDefinitionStatement* node) {} // no value
|
void ExecuteVisitor::Visit(TypeclassDefinitionStatement*) {} // no value
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(PartitionStatement* node) {
|
void ExecuteVisitor::Visit(PartitionStatement* node) {
|
||||||
Visitor::Visit(node->value);
|
Visitor::Visit(node->value);
|
||||||
|
|
@ -60,7 +60,7 @@ void ExecuteVisitor::Visit(PartitionStatement* node) {
|
||||||
|
|
||||||
// Flow control -----------------
|
// Flow control -----------------
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(TypeConstructorPatternParameter* node) {} // handled in TypeConstructorPattern
|
void ExecuteVisitor::Visit(TypeConstructorPatternParameter*) {} // handled in TypeConstructorPattern
|
||||||
|
|
||||||
// TODO: check
|
// TODO: check
|
||||||
void ExecuteVisitor::Visit(TypeConstructorPattern* node) {
|
void ExecuteVisitor::Visit(TypeConstructorPattern* node) {
|
||||||
|
|
@ -100,7 +100,7 @@ void ExecuteVisitor::Visit(TypeConstructorPattern* node) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(MatchCase* node) {} // handeled in Match
|
void ExecuteVisitor::Visit(MatchCase*) {} // handeled in Match
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(Match* node) {
|
void ExecuteVisitor::Visit(Match* node) {
|
||||||
context_manager_.EnterContext();
|
context_manager_.EnterContext();
|
||||||
|
|
@ -497,7 +497,7 @@ void ExecuteVisitor::Visit(ReturnExpression* node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(TypeConstructorParameter* node) {} // handled in TypeConstructor
|
void ExecuteVisitor::Visit(TypeConstructorParameter*) {} // handled in TypeConstructor
|
||||||
|
|
||||||
// TODO: check
|
// TODO: check
|
||||||
void ExecuteVisitor::Visit(TypeConstructor* node) {
|
void ExecuteVisitor::Visit(TypeConstructor* node) {
|
||||||
|
|
@ -534,7 +534,7 @@ void ExecuteVisitor::Visit(TypeConstructor* node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
void ExecuteVisitor::Visit(LambdaFunction* node) {
|
void ExecuteVisitor::Visit(LambdaFunction*) {
|
||||||
error_handling::HandleInternalError("Lambda function are not implemented yet",
|
error_handling::HandleInternalError("Lambda function are not implemented yet",
|
||||||
"ExecuteVisitor.LambdaFunction");
|
"ExecuteVisitor.LambdaFunction");
|
||||||
}
|
}
|
||||||
|
|
@ -686,19 +686,19 @@ void ExecuteVisitor::Visit(AnnotatedName* node) { // TODO: check
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(FunctionType* node) {} // no value
|
void ExecuteVisitor::Visit(FunctionType*) {} // no value
|
||||||
void ExecuteVisitor::Visit(TupleType* node) {} // no value
|
void ExecuteVisitor::Visit(TupleType*) {} // no value
|
||||||
void ExecuteVisitor::Visit(VariantType* node) {} // no value
|
void ExecuteVisitor::Visit(VariantType*) {} // no value
|
||||||
void ExecuteVisitor::Visit(TypeExpression* node) {} // no value
|
void ExecuteVisitor::Visit(TypeExpression*) {} // no value
|
||||||
void ExecuteVisitor::Visit(ExtendedScopedAnyType* node) {} // no value
|
void ExecuteVisitor::Visit(ExtendedScopedAnyType*) {} // no value
|
||||||
|
|
||||||
// Typeclass
|
// Typeclass
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(ParametrizedTypeclass* node) {} // no value
|
void ExecuteVisitor::Visit(ParametrizedTypeclass*) {} // no value
|
||||||
|
|
||||||
// Typeclass & Type -----------------
|
// Typeclass & Type -----------------
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(ParametrizedType* node) {} // no value
|
void ExecuteVisitor::Visit(ParametrizedType*) {} // no value
|
||||||
|
|
||||||
// Identifiers, constants, etc. -----------------
|
// Identifiers, constants, etc. -----------------
|
||||||
|
|
||||||
|
|
@ -730,7 +730,7 @@ void ExecuteVisitor::Visit(CharLiteral* node) {
|
||||||
utils::ValueType::Tmp);
|
utils::ValueType::Tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecuteVisitor::Visit(UnitLiteral* node) {
|
void ExecuteVisitor::Visit(UnitLiteral*) {
|
||||||
current_value_ = context_manager_.AddValue(
|
current_value_ = context_manager_.AddValue(
|
||||||
info::value::InternalValue(info::value::Unit()),
|
info::value::InternalValue(info::value::Unit()),
|
||||||
utils::ValueType::Tmp);
|
utils::ValueType::Tmp);
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,9 @@ int main(int argc, char** argv) { // TODO, only test version
|
||||||
|
|
||||||
interpreter::ExecuteVisitor execute_visitor(global_info,
|
interpreter::ExecuteVisitor execute_visitor(global_info,
|
||||||
type_context_manager,
|
type_context_manager,
|
||||||
context_manager,
|
context_manager);
|
||||||
main_partition.node);
|
|
||||||
|
execute_visitor.ExecutePartition(main_partition.node);
|
||||||
|
|
||||||
std::cout << "\n---------------------------------- Typed -------------------------------------\n\n";
|
std::cout << "\n---------------------------------- Typed -------------------------------------\n\n";
|
||||||
typed_print_visitor.VisitSourceFile(source_file.get());
|
typed_print_visitor.VisitSourceFile(source_file.get());
|
||||||
|
|
|
||||||
|
|
@ -728,7 +728,7 @@ void PrintVisitor::Visit(CharLiteral* node) {
|
||||||
out_ << "[Char " << node->value << "] ";
|
out_ << "[Char " << node->value << "] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintVisitor::Visit(UnitLiteral* node) {
|
void PrintVisitor::Visit(UnitLiteral*) {
|
||||||
out_ << "[Unit ()] ";
|
out_ << "[Unit ()] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,10 @@ void TypeCheckVisitor::Visit(Namespace* node) {
|
||||||
|
|
||||||
// Definitions -----------------
|
// Definitions -----------------
|
||||||
|
|
||||||
void TypeCheckVisitor::Visit(ImportStatement* node) {}
|
void TypeCheckVisitor::Visit(ImportStatement*) {}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
void TypeCheckVisitor::Visit(AliasDefinitionStatement* node) {
|
void TypeCheckVisitor::Visit(AliasDefinitionStatement*) {
|
||||||
error_handling::HandleInternalError("Unimplemented",
|
error_handling::HandleInternalError("Unimplemented",
|
||||||
"TypeCheckVisitor.AliasDefinitionStatement");
|
"TypeCheckVisitor.AliasDefinitionStatement");
|
||||||
}
|
}
|
||||||
|
|
@ -356,7 +356,7 @@ void TypeCheckVisitor::Visit(AnyAnnotatedType* node) {
|
||||||
|
|
||||||
// Flow control -----------------
|
// Flow control -----------------
|
||||||
|
|
||||||
void TypeCheckVisitor::Visit(TypeConstructorPatternParameter* node) {} // Handled in TypeConstructorPattern
|
void TypeCheckVisitor::Visit(TypeConstructorPatternParameter*) {} // Handled in TypeConstructorPattern
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// TODO: check for tuples
|
// TODO: check for tuples
|
||||||
|
|
@ -675,7 +675,7 @@ void TypeCheckVisitor::Visit(ScopedStatement* node) {
|
||||||
node->base.type_ = current_type_;
|
node->base.type_ = current_type_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypeCheckVisitor::Visit(LoopControlExpression& node) { // enum
|
void TypeCheckVisitor::Visit(LoopControlExpression&) { // enum
|
||||||
current_type_ = context_manager_.AddValue(info::type::InternalType::Unit, utils::ValueType::Tmp);
|
current_type_ = context_manager_.AddValue(info::type::InternalType::Unit, utils::ValueType::Tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -829,7 +829,7 @@ void TypeCheckVisitor::Visit(ReturnExpression* node) {
|
||||||
node->base.type_ = current_type_;
|
node->base.type_ = current_type_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypeCheckVisitor::Visit(TypeConstructorParameter* node) {} // Handeled in TypeConstructor visit
|
void TypeCheckVisitor::Visit(TypeConstructorParameter*) {} // Handeled in TypeConstructor visit
|
||||||
|
|
||||||
// TODO: check for tuples
|
// TODO: check for tuples
|
||||||
void TypeCheckVisitor::Visit(TypeConstructor* node) {
|
void TypeCheckVisitor::Visit(TypeConstructor* node) {
|
||||||
|
|
@ -956,7 +956,7 @@ void TypeCheckVisitor::Visit(ArrayExpression* node) {
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
|
|
||||||
void TypeCheckVisitor::Visit(PartitionName* node) {} // Handled in partition ( executable / test )
|
void TypeCheckVisitor::Visit(PartitionName*) {} // Handled in partition ( executable / test )
|
||||||
|
|
||||||
void TypeCheckVisitor::Visit(NameExpression* node) {
|
void TypeCheckVisitor::Visit(NameExpression* node) {
|
||||||
// TODO: move, etc.
|
// TODO: move, etc.
|
||||||
|
|
@ -1259,7 +1259,7 @@ void TypeCheckVisitor::Visit(ParametrizedTypeclass* node) {
|
||||||
|
|
||||||
// Typeclass & Type -----------------
|
// Typeclass & Type -----------------
|
||||||
|
|
||||||
void TypeCheckVisitor::Visit(ParametrizedType* node) {} // Handled in TypeExpression
|
void TypeCheckVisitor::Visit(ParametrizedType*) {} // Handled in TypeExpression
|
||||||
|
|
||||||
// Identifiers, constants, etc. -----------------
|
// Identifiers, constants, etc. -----------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ bool AbstractType::operator>(const AbstractType& type) const {
|
||||||
return type < *this;
|
return type < *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> AbstractType::GetFieldType(const std::string& name,
|
std::optional<utils::IdType> AbstractType::GetFieldType(const std::string&,
|
||||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
const std::unordered_set<utils::IdType>&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -115,7 +115,7 @@ bool TupleType::operator>(const TupleType& type) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> TupleType::GetFieldType(const std::string& name,
|
std::optional<utils::IdType> TupleType::GetFieldType(const std::string& name,
|
||||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
const std::unordered_set<utils::IdType>&) const {
|
||||||
for (size_t i = 0; i < fields_.size(); ++i) { // TODO: optimize??
|
for (size_t i = 0; i < fields_.size(); ++i) { // TODO: optimize??
|
||||||
if (fields_[i].first.has_value() && fields_[i].first.value() == name) {
|
if (fields_[i].first.has_value() && fields_[i].first.value() == name) {
|
||||||
return fields_[i].second;
|
return fields_[i].second;
|
||||||
|
|
@ -198,8 +198,8 @@ bool OptionalType::operator>(const OptionalType& type) const {
|
||||||
return type < *this;
|
return type < *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> OptionalType::GetFieldType(const std::string& name,
|
std::optional<utils::IdType> OptionalType::GetFieldType(const std::string&,
|
||||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
const std::unordered_set<utils::IdType>&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -279,8 +279,8 @@ bool FunctionType::operator>(const FunctionType& type) const {
|
||||||
return type < *this;
|
return type < *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> FunctionType::GetFieldType(const std::string& name,
|
std::optional<utils::IdType> FunctionType::GetFieldType(const std::string&,
|
||||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
const std::unordered_set<utils::IdType>&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -309,8 +309,8 @@ bool ArrayType::operator>(const ArrayType& type) const {
|
||||||
return type < *this;
|
return type < *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> ArrayType::GetFieldType(const std::string& name,
|
std::optional<utils::IdType> ArrayType::GetFieldType(const std::string&,
|
||||||
const std::unordered_set<utils::IdType>& type_namespaces) const {
|
const std::unordered_set<utils::IdType>&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ bool InternalValue::Same(const InternalValue& other_value) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> InternalValue::GetFieldValue(const std::string& name) const {
|
std::optional<utils::IdType> InternalValue::GetFieldValue(const std::string&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +62,11 @@ std::optional<utils::IdType> TupleValue::GetFieldValue(const std::string& name)
|
||||||
|
|
||||||
bool VariantValue::Same(const VariantValue& other_value) const {
|
bool VariantValue::Same(const VariantValue& other_value) const {
|
||||||
// TODO: check, that type is same ?? (checked in typecheck ??)
|
// TODO: check, that type is same ?? (checked in typecheck ??)
|
||||||
|
if (current_constructor != other_value.current_constructor) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return value.Same(other_value.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> VariantValue::GetFieldValue(const std::string& name) const {
|
std::optional<utils::IdType> VariantValue::GetFieldValue(const std::string& name) const {
|
||||||
|
|
@ -108,7 +112,7 @@ bool FunctionValue::Same(const FunctionValue& other_value) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> FunctionValue::GetFieldValue(const std::string& name) const {
|
std::optional<utils::IdType> FunctionValue::GetFieldValue(const std::string&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -127,7 +131,7 @@ bool ArrayValue::Same(const ArrayValue& other_value) const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> ArrayValue::GetFieldValue(const std::string& name) const {
|
std::optional<utils::IdType> ArrayValue::GetFieldValue(const std::string&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -144,7 +148,7 @@ bool OptionalValue::Same(const OptionalValue& other_value) const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> OptionalValue::GetFieldValue(const std::string& name) const {
|
std::optional<utils::IdType> OptionalValue::GetFieldValue(const std::string&) const {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,7 @@ void Visitor::Visit(ScopedStatement* node) {
|
||||||
Visit(node->statement);
|
Visit(node->statement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Visitor::Visit(LoopControlExpression& node) {} // enum
|
void Visitor::Visit(LoopControlExpression&) {} // enum
|
||||||
|
|
||||||
// Operators
|
// Operators
|
||||||
|
|
||||||
|
|
@ -645,19 +645,19 @@ void Visitor::Visit(ParametrizedType* node) {
|
||||||
|
|
||||||
// Identifiers, constants, etc. -----------------
|
// Identifiers, constants, etc. -----------------
|
||||||
|
|
||||||
void Visitor::Visit(std::string* node) {} // std::string
|
void Visitor::Visit(std::string*) {} // std::string
|
||||||
|
|
||||||
void Visitor::Visit(FloatNumberLiteral* node) {}
|
void Visitor::Visit(FloatNumberLiteral*) {}
|
||||||
|
|
||||||
void Visitor::Visit(NumberLiteral* node) {}
|
void Visitor::Visit(NumberLiteral*) {}
|
||||||
|
|
||||||
void Visitor::Visit(StringLiteral* node) {}
|
void Visitor::Visit(StringLiteral*) {}
|
||||||
|
|
||||||
void Visitor::Visit(CharLiteral* node) {}
|
void Visitor::Visit(CharLiteral*) {}
|
||||||
|
|
||||||
void Visitor::Visit(UnitLiteral* node) {}
|
void Visitor::Visit(UnitLiteral*) {}
|
||||||
|
|
||||||
void Visitor::Visit(BoolLiteral* node) {}
|
void Visitor::Visit(BoolLiteral*) {}
|
||||||
|
|
||||||
} // namespace interpreter
|
} // namespace interpreter
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue