swp-uebersetzerbau-ss13 / common

Shared files between teams.
1 stars 0 forks source link

ReportLog #30

Closed flofreud closed 11 years ago

flofreud commented 11 years ago

To increase usability and testability the Javabite group propose to change the interface of the ReportLog.

  1. In context of #27 it seems appropriated to give the tokens instead the column and line to the ReportLog.
  2. The errors should be categorized by an enumeration. This enumeration can be extended without big discussion.

Interface would look like:

interface ReportLog {
     public void reportWarning(ErrorType type, List<Token> tokens, String message);
     public void reportError(ErrorType type, List<Token> tokens, String message);
}

enum ErrorType {
   DIVISION_BY_ZERO,
   DOUBLE_DECLARATION,
   ...
   UNKNOWN;
}
flofreud commented 11 years ago

Attention: This changes will break the build if the submodule is updated and the usages not. Javabite group is already updated.