ynkdir/vim-vimlparser — pull request #13 by Kuniwak (2014-11-24 08:24:25+00:00)
Title: [WIP] NODE_CURLYNAME children should be also Nodes

I give the following Vim script to VimLParser:

```vim
let f{'oo'} = 0
```

then, the attribute `value` of a node `NODE_CURRYNAME` that VimLParser returned:

```javascript
[{
curly: 0,
value: 'foo',
}, {
curly: 1,
value: (NODE_STRING),
}]
```

But, I think the following structure is better than this structure:

```javascript
[{
type: NODE_CURRYNAMEPART
value: 'foo',
pos: pos
curly: 0, // <- To keep backward compatibility
}, {
type: NODE_CURRYNAMEEXPR
value: (NODE_STRING),
pos: pos
curly: 1, // <- To keep backward compatibility
}]
```

This changes makes implementing event-driven traversing easy.

---

I did not how [`opprec`](https://github.com/ynkdir/vim-vimlparser/blob/master/py/pycompiler.vim#L4) work, so I did not implement the `opprec` for `NODE_CURLYNAMEPART` and `NODE_CURLYNAMEEXPR`.
Please tell me why `opprec` is necessary and how `opprec` work.