Import cycle checking

This commit is contained in:
Ginger Bill
2017-08-27 14:42:19 +01:00
parent e5502c13ee
commit 6707c8750e
7 changed files with 418 additions and 251 deletions

View File

@@ -149,6 +149,11 @@ struct TokenPos {
isize column;
};
TokenPos token_pos(String file, isize line, isize column) {
TokenPos pos = {file, line, column};
return pos;
}
i32 token_pos_cmp(TokenPos a, TokenPos b) {
if (a.line == b.line) {
if (a.column == b.column) {