Fixes against errors/warnings in vint

This commit is contained in:
mattn
2014-12-17 17:26:10 +09:00
parent edf74342b5
commit 47b54c2e5e
11 changed files with 253 additions and 254 deletions

View File

@@ -1,12 +1,12 @@
function! emmet#lang#sass#findTokens(str)
function! emmet#lang#sass#findTokens(str) abort
return emmet#lang#css#findTokens(a:str)
endfunction
function! emmet#lang#sass#parseIntoTree(abbr, type)
function! emmet#lang#sass#parseIntoTree(abbr, type) abort
return emmet#lang#html#parseIntoTree(a:abbr, a:type)
endfunction
function! emmet#lang#sass#toString(settings, current, type, inline, filters, itemno, indent)
function! emmet#lang#sass#toString(settings, current, type, inline, filters, itemno, indent) abort
let settings = a:settings
let current = a:current
let type = a:type
@@ -14,7 +14,7 @@ function! emmet#lang#sass#toString(settings, current, type, inline, filters, ite
let filters = a:filters
let itemno = a:itemno
let indent = a:indent
let str = ""
let str = ''
let current_name = current.name
let current_name = substitute(current.name, '\$$', itemno+1, '')
@@ -23,13 +23,13 @@ function! emmet#lang#sass#toString(settings, current, type, inline, filters, ite
let tmp = ''
for attr in keys(current.attr)
let val = current.attr[attr]
while val =~ '\$\([^#{]\|$\)'
while val =~# '\$\([^#{]\|$\)'
let val = substitute(val, '\(\$\+\)\([^{]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
endwhile
let attr = substitute(attr, '\$$', itemno+1, '')
if attr == 'id'
if attr ==# 'id'
let str .= '#' . val
elseif attr == 'class'
elseif attr ==# 'class'
let str .= '.' . val
else
let tmp .= attr . ': ' . val
@@ -62,19 +62,19 @@ function! emmet#lang#sass#toString(settings, current, type, inline, filters, ite
return str
endfunction
function! emmet#lang#sass#imageSize()
function! emmet#lang#sass#imageSize() abort
endfunction
function! emmet#lang#sass#encodeImage()
function! emmet#lang#sass#encodeImage() abort
endfunction
function! emmet#lang#sass#parseTag(tag)
function! emmet#lang#sass#parseTag(tag) abort
endfunction
function! emmet#lang#sass#toggleComment()
function! emmet#lang#sass#toggleComment() abort
endfunction
function! emmet#lang#sass#balanceTag(flag) range
function! emmet#lang#sass#balanceTag(flag) range abort
let block = emmet#util#getVisualBlock()
if a:flag == -2 || a:flag == 2
let curpos = [0, line("'<"), col("'<"), 0]
@@ -139,11 +139,11 @@ function! emmet#lang#sass#balanceTag(flag) range
endif
endfunction
function! emmet#lang#sass#moveNextPrevItem(flag)
function! emmet#lang#sass#moveNextPrevItem(flag) abort
return emmet#lang#sass#moveNextPrev(a:flag)
endfunction
function! emmet#lang#sass#moveNextPrev(flag)
function! emmet#lang#sass#moveNextPrev(flag) abort
let pos = search('""\|\(^\s*|\s*\zs\)', a:flag ? 'Wpb' : 'Wp')
if pos == 2
startinsert!
@@ -153,8 +153,8 @@ function! emmet#lang#sass#moveNextPrev(flag)
endif
endfunction
function! emmet#lang#sass#splitJoinTag()
function! emmet#lang#sass#splitJoinTag() abort
endfunction
function! emmet#lang#sass#removeTag()
function! emmet#lang#sass#removeTag() abort
endfunction