Writing RethinkDB Drivers has incorrect AST example for `r.do`
Open
@chipotle is already working on this.
Since Sep 14, 2016.
bug
- Dominant language
- CSS
- Stars
- 118
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
The docs currently show:
[FUNCALL,
[FUNC,
[[MAKE_ARRAY, [1, 2]],
[ADD,
[[VAR, [1]],
[VAR, [2]]]]]],
10,
20]
// FUNCALL = 64, FUNC = 69, MAKE_ARRAY = 2, ADD = 24, VAR = 10
[64, [69, [[2, [1, 2]], [24, [[10, [1]], [10, [2]]]]]], 10, 20]
I believe it is incorrect and should instead read:
[FUNCALL,
[[FUNC,
[[MAKE_ARRAY, [1, 2]],
[ADD,
[[VAR, [1]],
[VAR, [2]]]]]],
10,
20]
]
// FUNCALL = 64, FUNC = 69, MAKE_ARRAY = 2, ADD = 24, VAR = 10
[64, [[69, [[2, [1, 2]], [24, [[10, [1]], [10, [2]]]]]], 10, 20]]
There is a missing [ before FUNC and at the end there is a missing ]. I think it may be valid REQL to have both of these brackets emitted but it's confusing when the node.js driver does emit these.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.