sourcebrainfuck::Token.fan

**
** Save information about the type of instruction and its position in
** the source code. The `line` and `column` information can be used
** to report better error messages or debug.
**
const class Token
{
  **
  ** Instruction's type
  **
  const Instruction instruction
  
  **
  ** Number of line in source code. First line number is 1.
  **
  const Int line
  
  **
  ** Number of column in source code. First column number is 1.
  **
  const Int column

  new make(Instruction instruction, Int line, Int column) 
  { 
    this.instruction = instruction
    this.line        = line
    this.column      = column
  }

  override Str toStr()
  {
    "${instruction} ${line}:${column}"
  }
}