jviereck/regjsparser — pull request #61 by jviereck (2014-08-29 19:13:00+00:00)
Title: Fix references, rename ref -> reference and remove matchIdx from the AST...

.... Closes #57

This turned out to be a regression from my commit 278aabb:

> Remove the lastMatchIdx etc. Fixes #48.

This PR:

1) fixes the above regression
2) renames `ref` → `reference` in the AST
3) removes the `matchIdx` from the AST for capture groups

The reason to remove the `matchIdx` is the same as for `lastMatchIdx`. The `matchIdx` can be seen as a "state" variable, that can be computed easily when walking over the tree if needed.

@mathiasbynens, @d10, can someone of you maybe review the patch? What do you think about point 3)?