integrated-application-development / integrated-application-development/pasfmt
Generics consolidation during logical line parsing
- Dominant language
- Rust
- Stars
- 105
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
As discussed in https://github.com/integrated-application-development/pasfmt/pull/39#discussion_r1558804639 we need to disambiguate generics _during_ parsing in order for keyword consolidation to be correct.
Consider this example
```delphi
type
Read = class end;
T = class end;
A = class
F: T;
property P: T read F;
end;
```
The current implementation doesn't parse the generics used in the type of the property and will turn the `Read` token in `T` into a keyword, which isn't correct.
Another example is
```delphi
raise A at ...
```
in which the current implementation will consume the (impure) `at` keyword as part of the raised expression, because it sees the `>` token as starting a binary expression.
A similar example is
```delphi
type
T = class end;
A = class helper for T
private
end;
```
in which the current implementation will consume the (impure) `private` keyword as part of the helped class expression.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.