devoncarew/gen_tools.dart — pull request #5 by financeCoding (2013-09-13 05:40:19+00:00)
Title: Adding epsilon as a const

@devoncarew what are your thoughts on adding a sentinel type for `ε`. Currently the parser interprets `ε` as `spaces`. `spaces` on successful parse is null. This patch will instead parse the structure and not return null but a const type of `EMPTY`.

```
test('example', () {
final s = """interface Events : Object {};""";
var p = webIdlParser.start;
var sp = p.parse(s);
print(sp);
});
```

Before change:

```
sp = [null, ["interface", "Events", [":", "Object"], null, ";"], null]
```

After change:

```
sp = [EMPTY, ["interface", "Events", [":", "Object"], EMPTY, ";"], EMPTY]
```

There might be a way to parse so `EMPTY` does not get included, I'm just not aware of it yet :8ball: