mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
test fixes
This commit is contained in:
parent
d12811b0eb
commit
776b6cccc6
4 changed files with 11 additions and 11 deletions
|
|
@ -43,17 +43,17 @@ public:
|
||||||
|
|
||||||
std::optional<NamespaceInfo*> FindNamespace(const std::optional<std::vector<std::string>>& path);
|
std::optional<NamespaceInfo*> FindNamespace(const std::optional<std::vector<std::string>>& path);
|
||||||
|
|
||||||
std::optional<utils::IdType> FindFunction(const std::optional<std::vector<std::string>>& path,
|
std::optional<std::vector<utils::IdType>> FindFunction(const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string& name);
|
const std::string& name);
|
||||||
|
|
||||||
std::optional<utils::IdType> FindMethod(const std::optional<std::vector<std::string>>& path,
|
std::optional<std::vector<utils::IdType>> FindMethod(const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string& type,
|
const std::string& type,
|
||||||
const std::string& name);
|
const std::string& name);
|
||||||
|
|
||||||
std::optional<utils::IdType> FindType(const std::optional<std::vector<std::string>>& path,
|
std::optional<std::vector<utils::IdType>> FindType(const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string type);
|
const std::string type);
|
||||||
|
|
||||||
std::optional<utils::IdType> FindTypeclass(const std::optional<std::vector<std::string>>& path,
|
std::optional<std::vector<utils::IdType>> FindTypeclass(const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string typeclass);
|
const std::string typeclass);
|
||||||
|
|
||||||
NamespaceVisitor CreateVisitor() {
|
NamespaceVisitor CreateVisitor() {
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ std::optional<NamespaceInfo*> GlobalInfo::NamespaceVisitor::FindNamespace(const
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> GlobalInfo::NamespaceVisitor::FindFunction(
|
std::optional<std::vector<utils::IdType>> GlobalInfo::NamespaceVisitor::FindFunction(
|
||||||
const std::optional<std::vector<std::string>>& path,
|
const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string& name) {
|
const std::string& name) {
|
||||||
return FindSomething<utils::IdType>(path,
|
return FindSomething<utils::IdType>(path,
|
||||||
|
|
@ -157,7 +157,7 @@ std::optional<utils::IdType> GlobalInfo::NamespaceVisitor::FindFunction(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> GlobalInfo::NamespaceVisitor::FindMethod(
|
std::optional<std::vector<utils::IdType>> GlobalInfo::NamespaceVisitor::FindMethod(
|
||||||
const std::optional<std::vector<std::string>>& path,
|
const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string& type,
|
const std::string& type,
|
||||||
const std::string& name) {
|
const std::string& name) {
|
||||||
|
|
@ -185,7 +185,7 @@ std::optional<utils::IdType> GlobalInfo::NamespaceVisitor::FindMethod(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> GlobalInfo::NamespaceVisitor::FindType(
|
std::optional<std::vector<utils::IdType>> GlobalInfo::NamespaceVisitor::FindType(
|
||||||
const std::optional<std::vector<std::string>>& path,
|
const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string type) {
|
const std::string type) {
|
||||||
return FindSomething<utils::IdType>(path,
|
return FindSomething<utils::IdType>(path,
|
||||||
|
|
@ -200,7 +200,7 @@ std::optional<utils::IdType> GlobalInfo::NamespaceVisitor::FindType(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<utils::IdType> GlobalInfo::NamespaceVisitor::FindTypeclass(
|
std::optional<std::vector<utils::IdType>> GlobalInfo::NamespaceVisitor::FindTypeclass(
|
||||||
const std::optional<std::vector<std::string>>& path,
|
const std::optional<std::vector<std::string>>& path,
|
||||||
const std::string typeclass) {
|
const std::string typeclass) {
|
||||||
return FindSomething<utils::IdType>(path,
|
return FindSomething<utils::IdType>(path,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
decl sum ('A : #Add) : 'A -> 'A -> 'A
|
decl sum ('A : #Add) : 'A -> 'A -> 'A
|
||||||
def sum 'A : a b = a + b
|
def sum : a b = a + b
|
||||||
|
|
||||||
decl fib : Int -> Int
|
decl fib : Int -> Int
|
||||||
def fib : n =
|
def fib : n =
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ namespace Array {
|
||||||
decl something : Unit -> Unit
|
decl something : Unit -> Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace var : Array {
|
namespace var Array {
|
||||||
decl something : Unit -> Unit
|
decl something : Unit -> Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace const : Array {
|
namespace const Array {
|
||||||
decl something : Unit -> Unit
|
decl something : Unit -> Unit
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue