Skip to content
Snippets Groups Projects
Commit e42f4c61 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

rephrase comments

parent c0a3ed4f
No related branches found
No related tags found
No related merge requests found
...@@ -677,7 +677,7 @@ let markReferenced ast = ...@@ -677,7 +677,7 @@ let markReferenced ast =
(* Assumption: one can order logic labels according to their visibility. (* Assumption: one can order logic labels according to their visibility.
The goal of this function is to minimize name clash when the program contains The goal of this function is to minimize name clash when the program contains
C labels with a name that correspond to a builtin logic label. Parsing the C labels with a name that corresponds to a builtin logic label. Parsing the
result should not lead to a program with a different semantics. result should not lead to a program with a different semantics.
For example: [Here: Old: ;] For example: [Here: Old: ;]
cannot be normalized into: [Here: ;] cannot be normalized into: [Here: ;]
...@@ -685,7 +685,7 @@ let markReferenced ast = ...@@ -685,7 +685,7 @@ let markReferenced ast =
The behavior is as follows: The behavior is as follows:
- select a name without name clash if there is one, - select a name without name clash if there is one,
- else, order preferencer by visibility: Post > Old > Loop* > Other - else, select according to visibility: Post > Old > Loop* > Other
A difference in semantics can appear if: A difference in semantics can appear if:
- there are several builtin label names with different visibilities - there are several builtin label names with different visibilities
...@@ -693,9 +693,9 @@ let markReferenced ast = ...@@ -693,9 +693,9 @@ let markReferenced ast =
- we select a visible label from the list - we select a visible label from the list
By selecting the less visible we guarantee that we do not change the By selecting the less visible we guarantee that we do not change the
semantics: either the selected label was not visible, it is not more visible semantics: either original name did not correspond to a visible logic label,
now, or it was already visible and thus already masked during the typing and this is also the case for the selected one, or it was already masked
phase. during the typing phase.
*) *)
let prefer ~new_label ~old_label = let prefer ~new_label ~old_label =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment