@Override
  @NotNull
  public Syntax getSyntax() {
    PsiElement previous = getPrevSibling();
    while (previous != null) {
      if (previous.getNode().getElementType().equals(IgnoreTypes.SYNTAX)) {
        Syntax syntax =
          Syntax.find(((IgnoreSyntax)previous).getValue().getText());
        if (syntax != null) {
          return syntax;
        }
      }
      previous = previous.getPrevSibling();
    }
    return ((IgnoreLanguage)getContainingFile().getLanguage()).getDefaultSyntax();
  }
@Override
  @NotNull
  public Syntax getSyntax()