# Code Climate Parser Backend for Ruby

Setup

```
bundle install
```

Run

```
bundle exec thin \
  --log - \
  --socket /tmp/codeclimate-parser-rb.sock \
  --rackup app.ru start
```

## AST Grammar Extensions

To allow for JSON serialization, the parser extends the [Ruby AST Grammar](https://github.com/whitequark/parser/blob/master/doc/AST_FORMAT.md) with a few custom `type` values.

### `infinity` and `negative_infinity`

Values for literal infinity (ex. `1e1020`) and negative infinity (ex. `-1e1020`) are represented by `infinity` and `negative_infinity` types.

#### Example

```json
{
  "type": "float",
  "value": {
    "type": "infinity"
  }
}
```
