/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.translator.language;

import cx2x.xcodeml.exception.IllegalDirectiveException;
import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;

/**
 * Listener that save the last error information from the CLAW language parser.
 *
 * @author clementval
 */
public class ClawErrorListener extends BaseErrorListener {

  private static IllegalDirectiveException ex = null;

  /**
   * Default ctor
   */
  public ClawErrorListener(){}

  @Override
  public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol,
                          int line, int charPositionInLine,
                          String msg, RecognitionException e)
  {
    ex = new IllegalDirectiveException("", msg, line, charPositionInLine);
  }

  /**
   * Get the last error information.
   * @return IllegalDirectiveException encapsulating the last error information.
   */
  IllegalDirectiveException getLastError(){
      return ex;
    }

}

@@ -610,17 +610,21 @@
 stener()
-%7B
+ %7B%0A  
 %7D%0A%0A  @Ov
@@ -954,24 +954,29 @@
 nformation.%0A
+   *%0A
    * @return
@@ -1052,16 +1052,23 @@
    */%0A  
+public 
 IllegalD
@@ -1099,20 +1099,19 @@
 tError()
+ 
 %7B%0A
-  
     retu
@@ -1117,17 +1117,15 @@
 urn ex;%0A
-  
   %7D%0A%0A%7D%0A

Update modifier + code style