text: import Lexer from '../Lexer'
  
  export default Complex {
    constructor(re, im) {
      this.name = 'complex'
      if (typeof re === 'string') {
        this.parse(new Lexer(src))
      } else if (typeof re === 'number') {
        this.re = re
        this.im = im
      } else {
        throw new TypeError('Invalid type for complex.')
      }
    }
  
    // get value() { return [this.re, this.im] }
  
    parse(lexer) {
  
    }
  
    toString() {
  
    }
  
    toJSON() {
      const { name, re, im } = this
      return { name, re, im }
    }
  }
  