def source
  'foo != bar'
end

def expected_tokens
  [
    {
      type: 'T_IDENTIFIER',
      value: 'foo'
    },
    {
      type: 'T_WHITESPACES',
      value: ' '
    },
    {
      type: 'T_OPERATOR',
      value: '!='
    },
    {
      type: 'T_WHITESPACES',
      value: ' '
    },
    {
      type: 'T_IDENTIFIER',
      value: 'bar'
    }
  ]
end

def expected_ast
  {
    __type: 'program',
    body: [
      {
        __type: 'binary-expression',
        operator: '!=',
        left: {
          __type: 'identifier',
          value: 'foo'
        },
        right: {
          __type: 'identifier',
          value: 'bar'
        }
      }
    ]
  }
end

load 'spec_builder.rb'
