public override Result VisitSET(LowLevelAssemblyParser.SETContext context) { string register = context.register_ab().GetText(); string binaryValue = context.FourBitBinaryValue().GetText(); string opcode = "111"; opcode += GetRegisterOpCode_ALU(register); opcode += binaryValue; opcode += " ; SET " + register + ", \"" + binaryValue + "\""; try { opcode += context.JumpLabel().GetText(); opcode += context.@int().GetText(); } catch (NullReferenceException) { } assembly.Add(opcode); return(base.VisitSET(context)); }
/// <summary> /// Visit a parse tree produced by <see cref="LowLevelAssemblyParser.SET"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitSET([NotNull] LowLevelAssemblyParser.SETContext context) { return(VisitChildren(context)); }