Exemple #1
0
 /// <summary>
 /// Adds or updates a program line, if an empty list of tokens is provided
 /// deletes the line.
 /// </summary>
 /// <param name="programLine">Program line to add, update or remove.</param>
 public void SetProgramLine(ProgramLine programLine)
 {
     programLine.CurrentToken = 0;
     if (programLine.EndOfLine)
     {
         _program.Remove(programLine.LineNumber.Value);
     }
     else
     {
         _program[programLine.LineNumber.Value] = programLine;
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProgramLine"/> class.
 /// </summary>
 /// <param name="lineNumber">Line number.</param>
 /// <param name="original">Original program line to clone.</param>
 public ProgramLine(int?lineNumber, ProgramLine original)
 {
     LineNumber   = lineNumber;
     _tokens      = original._tokens;
     CurrentToken = 0;
 }