diff options
Diffstat (limited to 'include/cps/SourceUnit.h')
| -rw-r--r-- | include/cps/SourceUnit.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/cps/SourceUnit.h b/include/cps/SourceUnit.h index 34266ac..153d020 100644 --- a/include/cps/SourceUnit.h +++ b/include/cps/SourceUnit.h @@ -9,6 +9,9 @@ struct SourceUnit { std::string Path; const std::vector<std::unique_ptr<StmtAST>> &Statements; std::vector<bool> Visible; - bool IsLibrary = false; + std::vector<bool> LibraryLines; + bool isLibrary(int Line) const { + return Line > 0 && static_cast<size_t>(Line) <= LibraryLines.size() && LibraryLines[Line - 1]; + } }; } |
