mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 05:38:04 +00:00
Compare commits
2 Commits
1d68b3a01a
...
73d7b285fa
Author | SHA1 | Date | |
---|---|---|---|
|
73d7b285fa | ||
|
26a5a3d8b8 |
@ -126,7 +126,7 @@ func handleToken(tokens []*token, index int, postProcessedTokens []*token) (toke
|
||||
if tokenIsOpType(currentToken, createMapOpType) {
|
||||
log.Debugf("tokenIsOpType: createMapOpType")
|
||||
// check the previous token is '[', means we are slice, but dont have a first number
|
||||
if tokens[index-1].TokenType == traverseArrayCollect {
|
||||
if index > 0 && tokens[index-1].TokenType == traverseArrayCollect {
|
||||
log.Debugf("previous token is : traverseArrayOpType")
|
||||
// need to put the number 0 before this token, as that is implied
|
||||
postProcessedTokens = append(postProcessedTokens, &token{TokenType: operationToken, Operation: createValueOperation(0, "0")})
|
||||
|
Loading…
Reference in New Issue
Block a user