1#ifndef ARK_COMPILER_AST_IMPORT_HPP
2#define ARK_COMPILER_AST_IMPORT_HPP
14 std::size_t line,
col;
37 bool with_prefix =
true;
56 return std::accumulate(
60 [](
const std::string& left,
const std::string& right) {
61 return left +
"." + right;
71 return std::accumulate(
72 std::next(package.begin()),
75 [](
const std::string& a,
const std::string& b) {
88 return with_prefix && symbols.empty();
bool isBasic() const
Check if we should import everything with a prefix, given a (import foo.bar.egg)
std::vector< std::string > symbols
List of symbols to import, can be empty if none provided. (import package :a :b)
std::size_t col
Position in the source file.
std::string prefix
The filename without the extension.
std::string packageToPath() const
std::string toPackageString() const
std::vector< std::string > package
Package with all the segments.