[m-rev.] for review: read interface files via bespoke parse tree types
Julien Fischer
jfischer at opturion.com
Thu Sep 5 11:40:50 AEST 2019
Hi Zoltan,
On Wed, 4 Sep 2019, Zoltan Somogyi wrote:
> For review by anyone.
>
> I plan to gradually move to using the generic parse_tree_int type
> only during parsing, using the types parse_tree_intN for N in {0,1,2,3}
> everywhere else in the compiler.
...
> Parse interface files via bespoke representations.
>
> We used to read all kinds of interface files (.int0, .int, .int2 and .int3)
> into the same representation, parse_tree_int. This diff makes the first step
> towards returning the contents of each kind of interface file in its own
> bespoke parse tree type, parse_tree_intN for N in {0,1,2,3}.
...
> @@ -1365,6 +1522,10 @@ read_module_header(FileString, MaxOffset,
> ; wrong_module_decl_present(module_name, prog_context)
> ; right_module_decl_present(module_name, prog_context).
>
> +:- type may_change_source_file_name
> + ---> may_not_change_source_file_name
> + ; may_change_source_file_name.
Add a comment describing this type.
The rest looks fine.
Julien.
More information about the reviews
mailing list