package com.zephir.lang;

import com.intellij.lang.Commenter;
import org.jetbrains.annotations.Nullable;

/**
 * @author Nikita Gusakov
 */
public class ZephirCommenter implements Commenter {
    @Nullable
    @Override
    public String getLineCommentPrefix() {
        return "//";
    }

    @Nullable
    @Override
    public String getBlockCommentPrefix() {
        return "/*";
    }

    @Nullable
    @Override
    public String getBlockCommentSuffix() {
        return "*/";
    }

    @Nullable
    @Override
    public String getCommentedBlockCommentPrefix() {
        return "/*";
    }

    @Nullable
    @Override
    public String getCommentedBlockCommentSuffix() {
        return "*/";
    }
}

@@ -46,23 +46,159 @@
 .lang.Co
-mmenter
+deDocumentationAwareCommenter;%0Aimport com.intellij.psi.PsiComment;%0Aimport com.intellij.psi.tree.IElementType;%0Aimport com.zephir.psi.ZephirTypes
 ;%0Aimport
@@ -309,16 +309,38 @@
 lements 
+CodeDocumentationAware
 Commente
@@ -730,36 +730,36 @@
 %0A        return 
-%22/*%22
+null
 ;%0A    %7D%0A%0A    @Nu
@@ -839,30 +839,899 @@
 %0A        return 
-%22*/%22
+null;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public IElementType getLineCommentTokenType() %7B%0A        return ZephirTypes.COMMENT;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public IElementType getBlockCommentTokenType() %7B%0A        return ZephirTypes.COMMENT_BLOCK;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public IElementType getDocumentationCommentTokenType() %7B%0A        return ZephirTypes.COMMENT_BLOCK;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public String getDocumentationCommentPrefix() %7B%0A        return %22/**%22;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public String getDocumentationCommentLinePrefix() %7B%0A        return %22*%22;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public String getDocumentationCommentSuffix() %7B%0A        return %22*/%22;%0A    %7D%0A%0A    @Override%0A    public boolean isDocumentationComment(PsiComment element) %7B%0A        return element.getTokenType() == ZephirTypes.CODE_BLOCK
 ;%0A    %7D%0A%7D%0A

Improve commenter