Ark
Ark copied to clipboard
Refactor the import method of the parser
import acts like a macro: read filename, canonicalize it (our reference path being the path of the first file) can check if it's in our already imported files list. The way we handle the already imported files is ugly, we are synchronizing the current parser's and new parser's import lists, with some magic code on top of that to handle the root file path.
An idea could be to share a structure (through raw pointer) managed by the caller (the compiler) to store those informations to be cleaner.