Class VariableAssignment

  • All Implemented Interfaces:
    AstNode, Xmir

    public final class VariableAssignment
    extends Object
    implements AstNode
    Variable assignment.

    x = 2;

    Since:
    0.2
    • Constructor Detail

      • VariableAssignment

        public VariableAssignment​(org.eolang.jeo.representation.xmir.XmlNode root,
                                  Parser parser)
        Constructor.
        Parameters:
        root - Xmir representation of a variable assignment.
        parser - Parser that will be used to parse the child nodes of the variable assignment.
      • VariableAssignment

        public VariableAssignment​(List<org.eolang.jeo.representation.xmir.XmlNode> children,
                                  Parser parser)
        Constructor.
        Parameters:
        children - Child nodes that represent the variable and the expression.
        parser - Parser that will be used to parse the child nodes of the variable assignment.
      • VariableAssignment

        public VariableAssignment​(LocalVariable left,
                                  AstNode right)
        Constructor.
        Parameters:
        left - Left variable.
        right - Right expression.
    • Method Detail

      • toXmir

        public Iterable<org.xembly.Directive> toXmir()
        Description copied from interface: Xmir
        Convert node to XMIR.
        Specified by:
        toXmir in interface Xmir
        Returns:
        XMIR XML.
      • opcodes

        public List<AstNode> opcodes()
        Description copied from interface: AstNode
        Bytecode instructions.
        Specified by:
        opcodes in interface AstNode
        Returns:
        List of opcodes.