Class FieldAssignment

  • All Implemented Interfaces:
    AstNode, Xmir

    public final class FieldAssignment
    extends Object
    implements AstNode
    Field assignment.

    x.y = 2;

    Since:
    0.2
    • Constructor Detail

      • FieldAssignment

        public FieldAssignment​(org.eolang.jeo.representation.xmir.XmlNode node,
                               Parser parser)
        Constructor.
        Parameters:
        node - Root node is an XMIR representation of a field assignment.
        parser - Parser that will be used to parse the child nodes of the field assignment.
      • FieldAssignment

        public FieldAssignment​(Field left,
                               AstNode right)
        Constructor.
        Parameters:
        left - The field to assign to
        right - The value to assign
    • 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.