[Improvement]: Combine redundant compiler diagnostic error codes #42202
Labels
Area/Diagnostics
Issues related Diagnostics reported by the Compiler. #Compiler
Team/CompilerFE
All issues related to Language implementation and Compiler, this exclude run times.
Type/Improvement
Description
Currently error codes that represent missing tokens and keywords have separate error codes for every single token and keyword. All of these follow a simple pattern that can be represented by a few generic messages instead.
Eg.
missing $MISSING_TOKEN token
ormissing $MISSING_KEYWORD keyword
.Describe your problem(s)
No response
Describe your solution(s)
Current approach is as below,
DiagnosticErrorCode.java
syntax_diagnostic_message.properties
These can instead be replaced with something like,
and
This is the approach used for invalid tokens where BCE0600 represents all invalid tokens and uses the generic message
invalid token ''{0}''
for representing the error message.Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: