cdc.applic.expressions.checks.SyntaxIssue Maven / Gradle / Ivy
Show all versions of cdc-applic-expressions Show documentation
package cdc.applic.expressions.checks;
import cdc.applic.expressions.SyntacticException;
/**
* Specialization of Issue dedicated to Syntax problems.
*
* They are associated to a {@link SyntacticException}.
*
* @author Damien Carbonne
*/
public class SyntaxIssue extends ApplicIssue {
public SyntaxIssue(String context,
SyntacticException cause) {
super(ApplicIssueType.SYNTACTIC_ISSUE,
null,
new ExpressionLocation(context,
cause.getExpression(),
cause.getBeginIndex(),
cause.getEndIndex()),
cause.getFullMessage(),
cause);
}
@Override
public SyntacticException getCause() {
return (SyntacticException) super.getCause();
}
public SyntacticException.Detail getDetail() {
return getCause().getDetail();
}
}