Interface ILeafElementType


public interface ILeafElementType
An additional interface to be implemented by IElementType instances to allow customizing how leaf AST elements are created for tokens of this type. By default, plain LeafElement instances would be created.

Implementing this interface makes sense if you want to override some methods in LeafElement. Moreover, it's required if you want to preserve zero-length tokens in the AST.

See Also:
  • ICompositeElementType
  • IReparseableLeafElementType
  • com.intellij.lang.ASTFactory#leaf(IElementType, CharSequence)
  • com.intellij.psi.impl.source.tree.LeafPsiElement
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull ASTNode
    createLeafNode(@NotNull CharSequence leafText)
    Invoked by PsiBuilder to create a leaf AST node based of this type.
  • Method Details

    • createLeafNode

      @NotNull @NotNull ASTNode createLeafNode(@NotNull @NotNull CharSequence leafText)
      Invoked by PsiBuilder to create a leaf AST node based of this type.
      Returns:
      a LeafElement object with the given text