Skip to content

Commit 71bf32f

Browse files
authored
Merge pull request #178 from itchyny/fix-format-depth
Fix format specifier for node.depth
2 parents 5dddf85 + 225212c commit 71bf32f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

autoload/vimlparser.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5191,7 +5191,7 @@ function! s:Compiler.compile_lockvar(node) abort
51915191
if a:node.depth is# s:NIL
51925192
call self.out('(lockvar %s)', join(list, ' '))
51935193
else
5194-
call self.out('(lockvar %s %s)', a:node.depth, join(list, ' '))
5194+
call self.out('(lockvar %d %s)', a:node.depth, join(list, ' '))
51955195
endif
51965196
endfunction
51975197

@@ -5200,7 +5200,7 @@ function! s:Compiler.compile_unlockvar(node) abort
52005200
if a:node.depth is# s:NIL
52015201
call self.out('(unlockvar %s)', join(list, ' '))
52025202
else
5203-
call self.out('(unlockvar %s %s)', a:node.depth, join(list, ' '))
5203+
call self.out('(unlockvar %d %s)', a:node.depth, join(list, ' '))
52045204
endif
52055205
endfunction
52065206

js/vimlparser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4681,7 +4681,7 @@ Compiler.prototype.compile_lockvar = function(node) {
46814681
this.out("(lockvar %s)", viml_join(list, " "));
46824682
}
46834683
else {
4684-
this.out("(lockvar %s %s)", node.depth, viml_join(list, " "));
4684+
this.out("(lockvar %d %s)", node.depth, viml_join(list, " "));
46854685
}
46864686
}
46874687

@@ -4691,7 +4691,7 @@ Compiler.prototype.compile_unlockvar = function(node) {
46914691
this.out("(unlockvar %s)", viml_join(list, " "));
46924692
}
46934693
else {
4694-
this.out("(unlockvar %s %s)", node.depth, viml_join(list, " "));
4694+
this.out("(unlockvar %d %s)", node.depth, viml_join(list, " "));
46954695
}
46964696
}
46974697

py/vimlparser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3745,14 +3745,14 @@ def compile_lockvar(self, node):
37453745
if node.depth is NIL:
37463746
self.out("(lockvar %s)", viml_join(list, " "))
37473747
else:
3748-
self.out("(lockvar %s %s)", node.depth, viml_join(list, " "))
3748+
self.out("(lockvar %d %s)", node.depth, viml_join(list, " "))
37493749

37503750
def compile_unlockvar(self, node):
37513751
list = [self.compile(vval) for vval in node.list]
37523752
if node.depth is NIL:
37533753
self.out("(unlockvar %s)", viml_join(list, " "))
37543754
else:
3755-
self.out("(unlockvar %s %s)", node.depth, viml_join(list, " "))
3755+
self.out("(unlockvar %d %s)", node.depth, viml_join(list, " "))
37563756

37573757
def compile_if(self, node):
37583758
self.out("(if %s", self.compile(node.cond))

0 commit comments

Comments
 (0)