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(package.begin() + 1, package.end(), package.front(), [](
const std::string& left,
const std::string& right) {
57 return left +
"." + right;
67 return std::accumulate(
68 std::next(package.begin()),
71 [](
const std::string& a,
const std::string& b) {
84 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.