Class OpAST<SELF extends OpAST<SELF>>

java.lang.Object
xyz.cofe.cxel.ast.ASTBase<SELF>
xyz.cofe.cxel.ast.OpAST<SELF>
Type Parameters:
SELF - собственный (производный) тип
All Implemented Interfaces:
xyz.cofe.collection.ImTree<AST>, xyz.cofe.collection.ImTreeWalk<AST>, AST, xyz.cofe.text.tparse.Tok<xyz.cofe.text.tparse.TPointer>
Direct Known Subclasses:
BinaryOpAST, UnaryOpAST

public abstract class OpAST<SELF extends OpAST<SELF>>
extends ASTBase<SELF>
Базовый класс для оператора
  • Nested Class Summary

    Nested classes/interfaces inherited from interface xyz.cofe.collection.ImTreeWalk

    xyz.cofe.collection.ImTreeWalk.Walk<A extends xyz.cofe.collection.ImTree<? extends A>>
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected KeywordAST operator
    оператор

    Fields inherited from class xyz.cofe.cxel.ast.ASTBase

    begin, end
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected OpAST​(SELF sample)
    Конструктор копирования
      OpAST​(xyz.cofe.text.tparse.TPointer begin, xyz.cofe.text.tparse.TPointer end, KeywordAST op)
    Конструктор
  • Method Summary

    Modifier and Type Method Description
    KeywordAST operator()
    Указывает оператор
    SELF operator​(KeywordAST op)
    Указывает оператор
    Keyword opKeyword()
    Возвращает ключевое слово
    java.lang.String opText()
    Возвращает ключевое слово (текст)

    Methods inherited from class xyz.cofe.cxel.ast.ASTBase

    begin, children, children, clone, cloneAndConf, emptyChildren, end

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface xyz.cofe.cxel.ast.AST

    children, nodes

    Methods inherited from interface xyz.cofe.collection.ImTreeWalk

    walk
  • Field Details

  • Constructor Details

    • OpAST

      public OpAST​(xyz.cofe.text.tparse.TPointer begin, xyz.cofe.text.tparse.TPointer end, KeywordAST op)
      Конструктор
      Parameters:
      begin - начало
      end - конец
      op - оператор
    • OpAST

      protected OpAST​(SELF sample)
      Конструктор копирования
      Parameters:
      sample - образец для копирования
  • Method Details

    • opKeyword

      public Keyword opKeyword()
      Возвращает ключевое слово
      Returns:
      ключевое слово
    • opText

      public java.lang.String opText()
      Возвращает ключевое слово (текст)
      Returns:
      ключевое слово
    • operator

      public KeywordAST operator()
      Указывает оператор
      Returns:
      оператор
    • operator

      public SELF operator​(KeywordAST op)
      Указывает оператор
      Parameters:
      op - оператор
      Returns:
      клон с новым оператором