-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide two-stage interface to front module #451
Comments
I envisage a public class ScannedModule and a function public function scanModule(SourcePart[] sourceParts, bir:ModuleId id) returns ScannedModule|err:Any|io:Error; scanModule would perform parsing up to the end of the imports. Then ScannedModule provides
|
This will need #443. |
What should the opt1) keep I feel like opt1 is the simplest. |
I would wrap Tokenizer in a class that provides a parse method that continues the parse. |
Public function creates a s:Parser object from an array of lines and a FilePath; Parser class provides parseImports and parse methods. These replaces parseModulePart. Parser contains private fields with Tokenizer plus a ModulePart. You can use Parser instead of LoadedSourcePart. |
There's a problem with what I suggested here #451 (comment) in that eventually we will want ScannedModule to be readonly (to facilitate doing stage 2 in parallel). Otherwise ScannedModule will need to be an isolated object, which is harder. We can address this as a follow on issue. |
In order to support #438, we need to provide a two stage interface to the front module:
The text was updated successfully, but these errors were encountered: