Class BinaryOpAST

java.lang.Object
xyz.cofe.cxel.ast.ASTBase<SELF>
xyz.cofe.cxel.ast.OpAST<BinaryOpAST>
xyz.cofe.cxel.ast.BinaryOpAST
All Implemented Interfaces:
xyz.cofe.collection.ImTree<AST>, xyz.cofe.collection.ImTreeWalk<AST>, AST, xyz.cofe.text.tparse.Tok<xyz.cofe.text.tparse.TPointer>

public class BinaryOpAST
extends OpAST<BinaryOpAST>
Бинарный оператор
  • 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 AST left
    левый операнд
    protected AST right
    правый операнд

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

    operator

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

    begin, end
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
      BinaryOpAST​(AST left, KeywordAST op, AST right)
    Конструктор
    protected BinaryOpAST​(BinaryOpAST sample)
    Конструктор копирования
  • Method Summary

    Modifier and Type Method Description
    AST[] children()
    Возвращает дочерние узлы
    BinaryOpAST clone()
    Клонирование
    AST left()
    Возвращает левый операнд
    BinaryOpAST left​(AST left)
    Указывает левый операнд
    AST right()
    Возвращает правй операнд
    BinaryOpAST right​(AST right)
    Указывает правый операнд
    java.lang.String toString()  

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

    operator, operator, opKeyword, opText

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

    begin, children, children, cloneAndConf, emptyChildren, end

    Methods inherited from class java.lang.Object

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

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

    nodes

    Methods inherited from interface xyz.cofe.collection.ImTreeWalk

    walk
  • Field Details

    • left

      protected AST left
      левый операнд
    • right

      protected AST right
      правый операнд
  • Constructor Details

    • BinaryOpAST

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

      public BinaryOpAST​(AST left, KeywordAST op, AST right)
      Конструктор
      Parameters:
      left - левый операнд
      op - оператор
      right - правй операнд
  • Method Details

    • clone

      public BinaryOpAST clone()
      Клонирование
      Specified by:
      clone in class ASTBase<BinaryOpAST>
      Returns:
      клон
    • left

      public AST left()
      Возвращает левый операнд
      Returns:
      левый операнд
    • left

      public BinaryOpAST left​(AST left)
      Указывает левый операнд
      Parameters:
      left - левый операнд
      Returns:
      клон с новым операндом
    • right

      public AST right()
      Возвращает правй операнд
      Returns:
      правый операнд
    • right

      public BinaryOpAST right​(AST right)
      Указывает правый операнд
      Parameters:
      right - операнд
      Returns:
      клон с новым операндом
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • children

      public AST[] children()
      Description copied from interface: AST
      Возвращает дочерние узлы
      Returns:
      дочерние узлы