Created
August 1, 2019 19:42
-
-
Save tyru/1f7ff4c0c505e3c242dc2bdecb15e6a8 to your computer and use it in GitHub Desktop.
Add readable name to numbered-function (and vim-jp/vim-vimlparser profiling result)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT /Users/tyru/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim | |
Sourced 1 time | |
Total time: 0.011356 | |
Self time: 0.011356 | |
count total (s) self (s) | |
" vim:set ts=8 sts=2 sw=2 tw=0 et: | |
" | |
" VimL parser - Vim Script Parser | |
" | |
" License: This file is placed in the public domain. | |
1 0.000004 function! vimlparser#import() abort | |
return s: | |
endfunction | |
" @brief Read input as VimScript and return stringified AST. | |
" @param input Input filename or string of VimScript. | |
" @return Stringified AST. | |
1 0.000003 function! vimlparser#test(input, ...) abort | |
try | |
if a:0 > 0 | |
let l:neovim = a:1 | |
else | |
let l:neovim = 0 | |
endif | |
let i = type(a:input) == 1 && filereadable(a:input) ? readfile(a:input) : split(a:input, "\n") | |
let r = s:StringReader.new(i) | |
let p = s:VimLParser.new(l:neovim) | |
let c = s:Compiler.new() | |
echo join(c.compile(p.parse(r)), "\n") | |
catch | |
echoerr substitute(v:throwpoint, '\.\.\zs\d\+', '\=s:numtoname(submatch(0))', 'g') . "\n" . v:exception | |
endtry | |
endfunction | |
1 0.000004 function! s:numtoname(num) abort | |
let sig = printf("function('%s')", a:num) | |
for k in keys(s:) | |
if type(s:[k]) == type({}) | |
for name in keys(s:[k]) | |
if type(s:[k][name]) == type(function('tr')) && string(s:[k][name]) == sig | |
return printf('%s.%s', k, name) | |
endif | |
endfor | |
endif | |
endfor | |
return a:num | |
endfunction | |
1 0.000005 let s:NIL = [] | |
1 0.000003 let s:TRUE = 1 | |
1 0.000020 let s:FALSE = 0 | |
1 0.000008 let s:NODE_TOPLEVEL = 1 | |
1 0.000006 let s:NODE_COMMENT = 2 | |
1 0.000005 let s:NODE_EXCMD = 3 | |
1 0.000005 let s:NODE_FUNCTION = 4 | |
1 0.000006 let s:NODE_ENDFUNCTION = 5 | |
1 0.000006 let s:NODE_DELFUNCTION = 6 | |
1 0.000005 let s:NODE_RETURN = 7 | |
1 0.000005 let s:NODE_EXCALL = 8 | |
1 0.000005 let s:NODE_LET = 9 | |
1 0.000006 let s:NODE_UNLET = 10 | |
1 0.000006 let s:NODE_LOCKVAR = 11 | |
1 0.000008 let s:NODE_UNLOCKVAR = 12 | |
1 0.000005 let s:NODE_IF = 13 | |
1 0.000006 let s:NODE_ELSEIF = 14 | |
1 0.000005 let s:NODE_ELSE = 15 | |
1 0.000005 let s:NODE_ENDIF = 16 | |
1 0.000006 let s:NODE_WHILE = 17 | |
1 0.000005 let s:NODE_ENDWHILE = 18 | |
1 0.000004 let s:NODE_FOR = 19 | |
1 0.000005 let s:NODE_ENDFOR = 20 | |
1 0.000006 let s:NODE_CONTINUE = 21 | |
1 0.000005 let s:NODE_BREAK = 22 | |
1 0.000005 let s:NODE_TRY = 23 | |
1 0.000005 let s:NODE_CATCH = 24 | |
1 0.000005 let s:NODE_FINALLY = 25 | |
1 0.000005 let s:NODE_ENDTRY = 26 | |
1 0.000005 let s:NODE_THROW = 27 | |
1 0.000005 let s:NODE_ECHO = 28 | |
1 0.000005 let s:NODE_ECHON = 29 | |
1 0.000005 let s:NODE_ECHOHL = 30 | |
1 0.000005 let s:NODE_ECHOMSG = 31 | |
1 0.000025 let s:NODE_ECHOERR = 32 | |
1 0.000006 let s:NODE_EXECUTE = 33 | |
1 0.000005 let s:NODE_TERNARY = 34 | |
1 0.000005 let s:NODE_OR = 35 | |
1 0.000004 let s:NODE_AND = 36 | |
1 0.000006 let s:NODE_EQUAL = 37 | |
1 0.000005 let s:NODE_EQUALCI = 38 | |
1 0.000006 let s:NODE_EQUALCS = 39 | |
1 0.000009 let s:NODE_NEQUAL = 40 | |
1 0.000011 let s:NODE_NEQUALCI = 41 | |
1 0.000009 let s:NODE_NEQUALCS = 42 | |
1 0.000008 let s:NODE_GREATER = 43 | |
1 0.000009 let s:NODE_GREATERCI = 44 | |
1 0.000008 let s:NODE_GREATERCS = 45 | |
1 0.000007 let s:NODE_GEQUAL = 46 | |
1 0.000008 let s:NODE_GEQUALCI = 47 | |
1 0.000007 let s:NODE_GEQUALCS = 48 | |
1 0.000005 let s:NODE_SMALLER = 49 | |
1 0.000006 let s:NODE_SMALLERCI = 50 | |
1 0.000006 let s:NODE_SMALLERCS = 51 | |
1 0.000005 let s:NODE_SEQUAL = 52 | |
1 0.000005 let s:NODE_SEQUALCI = 53 | |
1 0.000006 let s:NODE_SEQUALCS = 54 | |
1 0.000005 let s:NODE_MATCH = 55 | |
1 0.000005 let s:NODE_MATCHCI = 56 | |
1 0.000006 let s:NODE_MATCHCS = 57 | |
1 0.000005 let s:NODE_NOMATCH = 58 | |
1 0.000006 let s:NODE_NOMATCHCI = 59 | |
1 0.000005 let s:NODE_NOMATCHCS = 60 | |
1 0.000005 let s:NODE_IS = 61 | |
1 0.000005 let s:NODE_ISCI = 62 | |
1 0.000005 let s:NODE_ISCS = 63 | |
1 0.000024 let s:NODE_ISNOT = 64 | |
1 0.000005 let s:NODE_ISNOTCI = 65 | |
1 0.000006 let s:NODE_ISNOTCS = 66 | |
1 0.000005 let s:NODE_ADD = 67 | |
1 0.000006 let s:NODE_SUBTRACT = 68 | |
1 0.000005 let s:NODE_CONCAT = 69 | |
1 0.000005 let s:NODE_MULTIPLY = 70 | |
1 0.000005 let s:NODE_DIVIDE = 71 | |
1 0.000005 let s:NODE_REMAINDER = 72 | |
1 0.000005 let s:NODE_NOT = 73 | |
1 0.000005 let s:NODE_MINUS = 74 | |
1 0.000005 let s:NODE_PLUS = 75 | |
1 0.000006 let s:NODE_SUBSCRIPT = 76 | |
1 0.000005 let s:NODE_SLICE = 77 | |
1 0.000005 let s:NODE_CALL = 78 | |
1 0.000005 let s:NODE_DOT = 79 | |
1 0.000014 let s:NODE_NUMBER = 80 | |
1 0.000005 let s:NODE_STRING = 81 | |
1 0.000023 let s:NODE_LIST = 82 | |
1 0.000003 let s:NODE_DICT = 83 | |
1 0.000003 let s:NODE_OPTION = 85 | |
1 0.000004 let s:NODE_IDENTIFIER = 86 | |
1 0.000003 let s:NODE_CURLYNAME = 87 | |
1 0.000003 let s:NODE_ENV = 88 | |
1 0.000003 let s:NODE_REG = 89 | |
1 0.000004 let s:NODE_CURLYNAMEPART = 90 | |
1 0.000004 let s:NODE_CURLYNAMEEXPR = 91 | |
1 0.000003 let s:NODE_LAMBDA = 92 | |
1 0.000004 let s:NODE_BLOB = 93 | |
1 0.000003 let s:NODE_CONST = 94 | |
1 0.000003 let s:TOKEN_EOF = 1 | |
1 0.000015 let s:TOKEN_EOL = 2 | |
1 0.000004 let s:TOKEN_SPACE = 3 | |
1 0.000003 let s:TOKEN_OROR = 4 | |
1 0.000004 let s:TOKEN_ANDAND = 5 | |
1 0.000003 let s:TOKEN_EQEQ = 6 | |
1 0.000003 let s:TOKEN_EQEQCI = 7 | |
1 0.000004 let s:TOKEN_EQEQCS = 8 | |
1 0.000003 let s:TOKEN_NEQ = 9 | |
1 0.000003 let s:TOKEN_NEQCI = 10 | |
1 0.000003 let s:TOKEN_NEQCS = 11 | |
1 0.000003 let s:TOKEN_GT = 12 | |
1 0.000003 let s:TOKEN_GTCI = 13 | |
1 0.000003 let s:TOKEN_GTCS = 14 | |
1 0.000004 let s:TOKEN_GTEQ = 15 | |
1 0.000003 let s:TOKEN_GTEQCI = 16 | |
1 0.000004 let s:TOKEN_GTEQCS = 17 | |
1 0.000003 let s:TOKEN_LT = 18 | |
1 0.000004 let s:TOKEN_LTCI = 19 | |
1 0.000003 let s:TOKEN_LTCS = 20 | |
1 0.000003 let s:TOKEN_LTEQ = 21 | |
1 0.000004 let s:TOKEN_LTEQCI = 22 | |
1 0.000003 let s:TOKEN_LTEQCS = 23 | |
1 0.000003 let s:TOKEN_MATCH = 24 | |
1 0.000004 let s:TOKEN_MATCHCI = 25 | |
1 0.000003 let s:TOKEN_MATCHCS = 26 | |
1 0.000003 let s:TOKEN_NOMATCH = 27 | |
1 0.000004 let s:TOKEN_NOMATCHCI = 28 | |
1 0.000004 let s:TOKEN_NOMATCHCS = 29 | |
1 0.000287 let s:TOKEN_IS = 30 | |
1 0.000006 let s:TOKEN_ISCI = 31 | |
1 0.000004 let s:TOKEN_ISCS = 32 | |
1 0.000003 let s:TOKEN_ISNOT = 33 | |
1 0.000022 let s:TOKEN_ISNOTCI = 34 | |
1 0.000003 let s:TOKEN_ISNOTCS = 35 | |
1 0.000007 let s:TOKEN_PLUS = 36 | |
1 0.000004 let s:TOKEN_MINUS = 37 | |
1 0.000003 let s:TOKEN_DOT = 38 | |
1 0.000003 let s:TOKEN_STAR = 39 | |
1 0.000003 let s:TOKEN_SLASH = 40 | |
1 0.000004 let s:TOKEN_PERCENT = 41 | |
1 0.000003 let s:TOKEN_NOT = 42 | |
1 0.000004 let s:TOKEN_QUESTION = 43 | |
1 0.000004 let s:TOKEN_COLON = 44 | |
1 0.000003 let s:TOKEN_POPEN = 45 | |
1 0.000004 let s:TOKEN_PCLOSE = 46 | |
1 0.000004 let s:TOKEN_SQOPEN = 47 | |
1 0.000003 let s:TOKEN_SQCLOSE = 48 | |
1 0.000004 let s:TOKEN_COPEN = 49 | |
1 0.000003 let s:TOKEN_CCLOSE = 50 | |
1 0.000004 let s:TOKEN_COMMA = 51 | |
1 0.000003 let s:TOKEN_NUMBER = 52 | |
1 0.000004 let s:TOKEN_SQUOTE = 53 | |
1 0.000017 let s:TOKEN_DQUOTE = 54 | |
1 0.000002 let s:TOKEN_OPTION = 55 | |
1 0.000002 let s:TOKEN_IDENTIFIER = 56 | |
1 0.000002 let s:TOKEN_ENV = 57 | |
1 0.000001 let s:TOKEN_REG = 58 | |
1 0.000002 let s:TOKEN_EQ = 59 | |
1 0.000002 let s:TOKEN_OR = 60 | |
1 0.000003 let s:TOKEN_SEMICOLON = 61 | |
1 0.000002 let s:TOKEN_BACKTICK = 62 | |
1 0.000002 let s:TOKEN_DOTDOTDOT = 63 | |
1 0.000002 let s:TOKEN_SHARP = 64 | |
1 0.000002 let s:TOKEN_ARROW = 65 | |
1 0.000010 let s:TOKEN_BLOB = 66 | |
1 0.000002 let s:TOKEN_LITCOPEN = 67 | |
1 0.000002 let s:TOKEN_DOTDOT = 68 | |
1 0.000002 let s:MAX_FUNC_ARGS = 20 | |
1 0.000005 function! s:isalpha(c) abort | |
return a:c =~# '^[A-Za-z]$' | |
endfunction | |
1 0.000003 function! s:isalnum(c) abort | |
return a:c =~# '^[0-9A-Za-z]$' | |
endfunction | |
1 0.000002 function! s:isdigit(c) abort | |
return a:c =~# '^[0-9]$' | |
endfunction | |
1 0.000002 function! s:isodigit(c) abort | |
return a:c =~# '^[0-7]$' | |
endfunction | |
1 0.000002 function! s:isxdigit(c) abort | |
return a:c =~# '^[0-9A-Fa-f]$' | |
endfunction | |
1 0.000002 function! s:iswordc(c) abort | |
return a:c =~# '^[0-9A-Za-z_]$' | |
endfunction | |
1 0.000001 function! s:iswordc1(c) abort | |
return a:c =~# '^[A-Za-z_]$' | |
endfunction | |
1 0.000002 function! s:iswhite(c) abort | |
return a:c =~# '^[ \t]$' | |
endfunction | |
1 0.000002 function! s:isnamec(c) abort | |
return a:c =~# '^[0-9A-Za-z_:#]$' | |
endfunction | |
1 0.000002 function! s:isnamec1(c) abort | |
return a:c =~# '^[A-Za-z_]$' | |
endfunction | |
1 0.000002 function! s:isargname(s) abort | |
return a:s =~# '^[A-Za-z_][0-9A-Za-z_]*$' | |
endfunction | |
1 0.000002 function! s:isvarname(s) abort | |
return a:s =~# '^[vgslabwt]:$\|^\([vgslabwt]:\)\?[A-Za-z_][0-9A-Za-z_#]*$' | |
endfunction | |
" FIXME: | |
1 0.000001 function! s:isidc(c) abort | |
return a:c =~# '^[0-9A-Za-z_]$' | |
endfunction | |
1 0.000002 function! s:isupper(c) abort | |
return a:c =~# '^[A-Z]$' | |
endfunction | |
1 0.000002 function! s:islower(c) abort | |
return a:c =~# '^[a-z]$' | |
endfunction | |
1 0.000002 function! s:ExArg() abort | |
let ea = {} | |
let ea.forceit = s:FALSE | |
let ea.addr_count = 0 | |
let ea.line1 = 0 | |
let ea.line2 = 0 | |
let ea.flags = 0 | |
let ea.do_ecmd_cmd = '' | |
let ea.do_ecmd_lnum = 0 | |
let ea.append = 0 | |
let ea.usefilter = s:FALSE | |
let ea.amount = 0 | |
let ea.regname = 0 | |
let ea.force_bin = 0 | |
let ea.read_edit = 0 | |
let ea.force_ff = 0 | |
let ea.force_enc = 0 | |
let ea.bad_char = 0 | |
let ea.linepos = {} | |
let ea.cmdpos = [] | |
let ea.argpos = [] | |
let ea.cmd = {} | |
let ea.modifiers = [] | |
let ea.range = [] | |
let ea.argopt = {} | |
let ea.argcmd = {} | |
return ea | |
endfunction | |
" struct node { | |
" int type | |
" pos pos | |
" node left | |
" node right | |
" node cond | |
" node rest | |
" node[] list | |
" node[] rlist | |
" node[] body | |
" string op | |
" string str | |
" int depth | |
" variant value | |
" } | |
" TOPLEVEL .body | |
" COMMENT .str | |
" EXCMD .ea .str | |
" FUNCTION .ea .body .left .rlist .attr .endfunction | |
" ENDFUNCTION .ea | |
" DELFUNCTION .ea .left | |
" RETURN .ea .left | |
" EXCALL .ea .left | |
" LET .ea .op .left .list .rest .right | |
" CONST .ea .op .left .list .rest .right | |
" UNLET .ea .list | |
" LOCKVAR .ea .depth .list | |
" UNLOCKVAR .ea .depth .list | |
" IF .ea .body .cond .elseif .else .endif | |
" ELSEIF .ea .body .cond | |
" ELSE .ea .body | |
" ENDIF .ea | |
" WHILE .ea .body .cond .endwhile | |
" ENDWHILE .ea | |
" FOR .ea .body .left .list .rest .right .endfor | |
" ENDFOR .ea | |
" CONTINUE .ea | |
" BREAK .ea | |
" TRY .ea .body .catch .finally .endtry | |
" CATCH .ea .body .pattern | |
" FINALLY .ea .body | |
" ENDTRY .ea | |
" THROW .ea .left | |
" ECHO .ea .list | |
" ECHON .ea .list | |
" ECHOHL .ea .str | |
" ECHOMSG .ea .list | |
" ECHOERR .ea .list | |
" EXECUTE .ea .list | |
" TERNARY .cond .left .right | |
" OR .left .right | |
" AND .left .right | |
" EQUAL .left .right | |
" EQUALCI .left .right | |
" EQUALCS .left .right | |
" NEQUAL .left .right | |
" NEQUALCI .left .right | |
" NEQUALCS .left .right | |
" GREATER .left .right | |
" GREATERCI .left .right | |
" GREATERCS .left .right | |
" GEQUAL .left .right | |
" GEQUALCI .left .right | |
" GEQUALCS .left .right | |
" SMALLER .left .right | |
" SMALLERCI .left .right | |
" SMALLERCS .left .right | |
" SEQUAL .left .right | |
" SEQUALCI .left .right | |
" SEQUALCS .left .right | |
" MATCH .left .right | |
" MATCHCI .left .right | |
" MATCHCS .left .right | |
" NOMATCH .left .right | |
" NOMATCHCI .left .right | |
" NOMATCHCS .left .right | |
" IS .left .right | |
" ISCI .left .right | |
" ISCS .left .right | |
" ISNOT .left .right | |
" ISNOTCI .left .right | |
" ISNOTCS .left .right | |
" ADD .left .right | |
" SUBTRACT .left .right | |
" CONCAT .left .right | |
" MULTIPLY .left .right | |
" DIVIDE .left .right | |
" REMAINDER .left .right | |
" NOT .left | |
" MINUS .left | |
" PLUS .left | |
" SUBSCRIPT .left .right | |
" SLICE .left .rlist | |
" CALL .left .rlist | |
" DOT .left .right | |
" NUMBER .value | |
" STRING .value | |
" LIST .value | |
" DICT .value | |
" NESTING .left | |
" OPTION .value | |
" IDENTIFIER .value | |
" CURLYNAME .value | |
" ENV .value | |
" REG .value | |
" CURLYNAMEPART .value | |
" CURLYNAMEEXPR .value | |
" LAMBDA .rlist .left | |
1 0.000004 function! s:Node(type) abort | |
return {'type': a:type} | |
endfunction | |
1 0.000002 function! s:Err(msg, pos) abort | |
return printf('vimlparser: %s: line %d col %d', a:msg, a:pos.lnum, a:pos.col) | |
endfunction | |
1 0.000004 let s:VimLParser = {} | |
1 0.000002 function! s:VimLParser.new(...) abort | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
endfunction | |
1 0.000002 function! s:VimLParser.__init__(...) abort | |
if len(a:000) > 0 | |
let self.neovim = a:000[0] | |
else | |
let self.neovim = 0 | |
endif | |
let self.find_command_cache = {} | |
endfunction | |
1 0.000003 function! s:VimLParser.push_context(node) abort | |
call insert(self.context, a:node) | |
endfunction | |
1 0.000002 function! s:VimLParser.pop_context() abort | |
call remove(self.context, 0) | |
endfunction | |
1 0.000003 function! s:VimLParser.find_context(type) abort | |
let i = 0 | |
for node in self.context | |
if node.type == a:type | |
return i | |
endif | |
let i += 1 | |
endfor | |
return -1 | |
endfunction | |
1 0.000030 function! s:VimLParser.add_node(node) abort | |
call add(self.context[0].body, a:node) | |
endfunction | |
1 0.000005 function! s:VimLParser.check_missing_endfunction(ends, pos) abort | |
if self.context[0].type == s:NODE_FUNCTION | |
throw s:Err(printf('E126: Missing :endfunction: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000005 function! s:VimLParser.check_missing_endif(ends, pos) abort | |
if self.context[0].type == s:NODE_IF || self.context[0].type == s:NODE_ELSEIF || self.context[0].type == s:NODE_ELSE | |
throw s:Err(printf('E171: Missing :endif: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.check_missing_endtry(ends, pos) abort | |
if self.context[0].type == s:NODE_TRY || self.context[0].type == s:NODE_CATCH || self.context[0].type == s:NODE_FINALLY | |
throw s:Err(printf('E600: Missing :endtry: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.check_missing_endwhile(ends, pos) abort | |
if self.context[0].type == s:NODE_WHILE | |
throw s:Err(printf('E170: Missing :endwhile: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000003 function! s:VimLParser.check_missing_endfor(ends, pos) abort | |
if self.context[0].type == s:NODE_FOR | |
throw s:Err(printf('E170: Missing :endfor: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000003 function! s:VimLParser.parse(reader) abort | |
let self.reader = a:reader | |
let self.context = [] | |
let toplevel = s:Node(s:NODE_TOPLEVEL) | |
let toplevel.pos = self.reader.getpos() | |
let toplevel.body = [] | |
call self.push_context(toplevel) | |
while self.reader.peek() !=# '<EOF>' | |
call self.parse_one_cmd() | |
endwhile | |
call self.check_missing_endfunction('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endif('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endtry('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endwhile('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endfor('TOPLEVEL', self.reader.getpos()) | |
call self.pop_context() | |
return toplevel | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_one_cmd() abort | |
let self.ea = s:ExArg() | |
if self.reader.peekn(2) ==# '#!' | |
call self.parse_hashbang() | |
call self.reader.get() | |
return | |
endif | |
call self.reader.skip_white_and_colon() | |
if self.reader.peekn(1) ==# '' | |
call self.reader.get() | |
return | |
endif | |
if self.reader.peekn(1) ==# '"' | |
call self.parse_comment() | |
call self.reader.get() | |
return | |
endif | |
let self.ea.linepos = self.reader.getpos() | |
call self.parse_command_modifiers() | |
call self.parse_range() | |
call self.parse_command() | |
call self.parse_trail() | |
endfunction | |
" FIXME: | |
1 0.000002 function! s:VimLParser.parse_command_modifiers() abort | |
let modifiers = [] | |
while s:TRUE | |
let pos = self.reader.tell() | |
let d = '' | |
if s:isdigit(self.reader.peekn(1)) | |
let d = self.reader.read_digit() | |
call self.reader.skip_white() | |
endif | |
let k = self.reader.read_alpha() | |
let c = self.reader.peekn(1) | |
call self.reader.skip_white() | |
if stridx('aboveleft', k) == 0 && len(k) >= 3 " abo\%[veleft] | |
call add(modifiers, {'name': 'aboveleft'}) | |
elseif stridx('belowright', k) == 0 && len(k) >= 3 " bel\%[owright] | |
call add(modifiers, {'name': 'belowright'}) | |
elseif stridx('browse', k) == 0 && len(k) >= 3 " bro\%[wse] | |
call add(modifiers, {'name': 'browse'}) | |
elseif stridx('botright', k) == 0 && len(k) >= 2 " bo\%[tright] | |
call add(modifiers, {'name': 'botright'}) | |
elseif stridx('confirm', k) == 0 && len(k) >= 4 " conf\%[irm] | |
call add(modifiers, {'name': 'confirm'}) | |
elseif stridx('keepmarks', k) == 0 && len(k) >= 3 " kee\%[pmarks] | |
call add(modifiers, {'name': 'keepmarks'}) | |
elseif stridx('keepalt', k) == 0 && len(k) >= 5 " keepa\%[lt] | |
call add(modifiers, {'name': 'keepalt'}) | |
elseif stridx('keepjumps', k) == 0 && len(k) >= 5 " keepj\%[umps] | |
call add(modifiers, {'name': 'keepjumps'}) | |
elseif stridx('keeppatterns', k) == 0 && len(k) >= 5 " keepp\%[atterns] | |
call add(modifiers, {'name': 'keeppatterns'}) | |
elseif stridx('hide', k) == 0 && len(k) >= 3 " hid\%[e] | |
if self.ends_excmds(c) | |
break | |
endif | |
call add(modifiers, {'name': 'hide'}) | |
elseif stridx('lockmarks', k) == 0 && len(k) >= 3 " loc\%[kmarks] | |
call add(modifiers, {'name': 'lockmarks'}) | |
elseif stridx('leftabove', k) == 0 && len(k) >= 5 " lefta\%[bove] | |
call add(modifiers, {'name': 'leftabove'}) | |
elseif stridx('noautocmd', k) == 0 && len(k) >= 3 " noa\%[utocmd] | |
call add(modifiers, {'name': 'noautocmd'}) | |
elseif stridx('noswapfile', k) == 0 && len(k) >= 3 " :nos\%[wapfile] | |
call add(modifiers, {'name': 'noswapfile'}) | |
elseif stridx('rightbelow', k) == 0 && len(k) >= 6 " rightb\%[elow] | |
call add(modifiers, {'name': 'rightbelow'}) | |
elseif stridx('sandbox', k) == 0 && len(k) >= 3 " san\%[dbox] | |
call add(modifiers, {'name': 'sandbox'}) | |
elseif stridx('silent', k) == 0 && len(k) >= 3 " sil\%[ent] | |
if c ==# '!' | |
call self.reader.get() | |
call add(modifiers, {'name': 'silent', 'bang': 1}) | |
else | |
call add(modifiers, {'name': 'silent', 'bang': 0}) | |
endif | |
elseif k ==# 'tab' " tab | |
if d !=# '' | |
call add(modifiers, {'name': 'tab', 'count': str2nr(d, 10)}) | |
else | |
call add(modifiers, {'name': 'tab'}) | |
endif | |
elseif stridx('topleft', k) == 0 && len(k) >= 2 " to\%[pleft] | |
call add(modifiers, {'name': 'topleft'}) | |
elseif stridx('unsilent', k) == 0 && len(k) >= 3 " uns\%[ilent] | |
call add(modifiers, {'name': 'unsilent'}) | |
elseif stridx('vertical', k) == 0 && len(k) >= 4 " vert\%[ical] | |
call add(modifiers, {'name': 'vertical'}) | |
elseif stridx('verbose', k) == 0 && len(k) >= 4 " verb\%[ose] | |
if d !=# '' | |
call add(modifiers, {'name': 'verbose', 'count': str2nr(d, 10)}) | |
else | |
call add(modifiers, {'name': 'verbose', 'count': 1}) | |
endif | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
let self.ea.modifiers = modifiers | |
endfunction | |
" FIXME: | |
1 0.000002 function! s:VimLParser.parse_range() abort | |
let tokens = [] | |
while s:TRUE | |
while s:TRUE | |
call self.reader.skip_white() | |
let c = self.reader.peekn(1) | |
if c ==# '' | |
break | |
endif | |
if c ==# '.' | |
call add(tokens, self.reader.getn(1)) | |
elseif c ==# '$' | |
call add(tokens, self.reader.getn(1)) | |
elseif c ==# "'" | |
call self.reader.getn(1) | |
let m = self.reader.getn(1) | |
if m ==# '' | |
break | |
endif | |
call add(tokens, "'" . m) | |
elseif c ==# '/' | |
call self.reader.getn(1) | |
let [pattern, _] = self.parse_pattern(c) | |
call add(tokens, pattern) | |
elseif c ==# '?' | |
call self.reader.getn(1) | |
let [pattern, _] = self.parse_pattern(c) | |
call add(tokens, pattern) | |
elseif c ==# '\' | |
let m = self.reader.p(1) | |
if m ==# '&' || m ==# '?' || m ==# '/' | |
call self.reader.seek_cur(2) | |
call add(tokens, '\' . m) | |
else | |
throw s:Err('E10: \\ should be followed by /, ? or &', self.reader.getpos()) | |
endif | |
elseif s:isdigit(c) | |
call add(tokens, self.reader.read_digit()) | |
endif | |
while s:TRUE | |
call self.reader.skip_white() | |
if self.reader.peekn(1) ==# '' | |
break | |
endif | |
let n = self.reader.read_integer() | |
if n ==# '' | |
break | |
endif | |
call add(tokens, n) | |
endwhile | |
if self.reader.p(0) !=# '/' && self.reader.p(0) !=# '?' | |
break | |
endif | |
endwhile | |
if self.reader.peekn(1) ==# '%' | |
call add(tokens, self.reader.getn(1)) | |
elseif self.reader.peekn(1) ==# '*' " && &cpoptions !~ '\*' | |
call add(tokens, self.reader.getn(1)) | |
endif | |
if self.reader.peekn(1) ==# ';' | |
call add(tokens, self.reader.getn(1)) | |
continue | |
elseif self.reader.peekn(1) ==# ',' | |
call add(tokens, self.reader.getn(1)) | |
continue | |
endif | |
break | |
endwhile | |
let self.ea.range = tokens | |
endfunction | |
" FIXME: | |
1 0.000003 function! s:VimLParser.parse_pattern(delimiter) abort | |
let pattern = '' | |
let endc = '' | |
let inbracket = 0 | |
while s:TRUE | |
let c = self.reader.getn(1) | |
if c ==# '' | |
break | |
endif | |
if c ==# a:delimiter && inbracket == 0 | |
let endc = c | |
break | |
endif | |
let pattern .= c | |
if c ==# '\' | |
let c = self.reader.peekn(1) | |
if c ==# '' | |
throw s:Err('E682: Invalid search pattern or delimiter', self.reader.getpos()) | |
endif | |
call self.reader.getn(1) | |
let pattern .= c | |
elseif c ==# '[' | |
let inbracket += 1 | |
elseif c ==# ']' | |
let inbracket -= 1 | |
endif | |
endwhile | |
return [pattern, endc] | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_command() abort | |
call self.reader.skip_white_and_colon() | |
let self.ea.cmdpos = self.reader.getpos() | |
if self.reader.peekn(1) ==# '' || self.reader.peekn(1) ==# '"' | |
if !empty(self.ea.modifiers) || !empty(self.ea.range) | |
call self.parse_cmd_modifier_range() | |
endif | |
return | |
endif | |
let self.ea.cmd = self.find_command() | |
if self.ea.cmd is# s:NIL | |
call self.reader.setpos(self.ea.cmdpos) | |
throw s:Err(printf('E492: Not an editor command: %s', self.reader.peekline()), self.ea.cmdpos) | |
endif | |
if self.reader.peekn(1) ==# '!' && self.ea.cmd.name !=# 'substitute' && self.ea.cmd.name !=# 'smagic' && self.ea.cmd.name !=# 'snomagic' | |
call self.reader.getn(1) | |
let self.ea.forceit = s:TRUE | |
else | |
let self.ea.forceit = s:FALSE | |
endif | |
if self.ea.cmd.flags !~# '\<BANG\>' && self.ea.forceit && self.ea.cmd.flags !~# '\<USERCMD\>' | |
throw s:Err('E477: No ! allowed', self.ea.cmdpos) | |
endif | |
if self.ea.cmd.name !=# '!' | |
call self.reader.skip_white() | |
endif | |
let self.ea.argpos = self.reader.getpos() | |
if self.ea.cmd.flags =~# '\<ARGOPT\>' | |
call self.parse_argopt() | |
endif | |
if self.ea.cmd.name ==# 'write' || self.ea.cmd.name ==# 'update' | |
if self.reader.p(0) ==# '>' | |
if self.reader.p(1) !=# '>' | |
throw s:Err('E494: Use w or w>>', self.ea.cmdpos) | |
endif | |
call self.reader.seek_cur(2) | |
call self.reader.skip_white() | |
let self.ea.append = 1 | |
elseif self.reader.peekn(1) ==# '!' && self.ea.cmd.name ==# 'write' | |
call self.reader.getn(1) | |
let self.ea.usefilter = s:TRUE | |
endif | |
endif | |
if self.ea.cmd.name ==# 'read' | |
if self.ea.forceit | |
let self.ea.usefilter = s:TRUE | |
let self.ea.forceit = s:FALSE | |
elseif self.reader.peekn(1) ==# '!' | |
call self.reader.getn(1) | |
let self.ea.usefilter = s:TRUE | |
endif | |
endif | |
if self.ea.cmd.name ==# '<' || self.ea.cmd.name ==# '>' | |
let self.ea.amount = 1 | |
while self.reader.peekn(1) ==# self.ea.cmd.name | |
call self.reader.getn(1) | |
let self.ea.amount += 1 | |
endwhile | |
call self.reader.skip_white() | |
endif | |
if self.ea.cmd.flags =~# '\<EDITCMD\>' && !self.ea.usefilter | |
call self.parse_argcmd() | |
endif | |
call self._parse_command(self.ea.cmd.parser) | |
endfunction | |
" TODO: self[a:parser] | |
1 0.000003 function! s:VimLParser._parse_command(parser) abort | |
if a:parser ==# 'parse_cmd_append' | |
call self.parse_cmd_append() | |
elseif a:parser ==# 'parse_cmd_break' | |
call self.parse_cmd_break() | |
elseif a:parser ==# 'parse_cmd_call' | |
call self.parse_cmd_call() | |
elseif a:parser ==# 'parse_cmd_catch' | |
call self.parse_cmd_catch() | |
elseif a:parser ==# 'parse_cmd_common' | |
call self.parse_cmd_common() | |
elseif a:parser ==# 'parse_cmd_continue' | |
call self.parse_cmd_continue() | |
elseif a:parser ==# 'parse_cmd_delfunction' | |
call self.parse_cmd_delfunction() | |
elseif a:parser ==# 'parse_cmd_echo' | |
call self.parse_cmd_echo() | |
elseif a:parser ==# 'parse_cmd_echoerr' | |
call self.parse_cmd_echoerr() | |
elseif a:parser ==# 'parse_cmd_echohl' | |
call self.parse_cmd_echohl() | |
elseif a:parser ==# 'parse_cmd_echomsg' | |
call self.parse_cmd_echomsg() | |
elseif a:parser ==# 'parse_cmd_echon' | |
call self.parse_cmd_echon() | |
elseif a:parser ==# 'parse_cmd_else' | |
call self.parse_cmd_else() | |
elseif a:parser ==# 'parse_cmd_elseif' | |
call self.parse_cmd_elseif() | |
elseif a:parser ==# 'parse_cmd_endfor' | |
call self.parse_cmd_endfor() | |
elseif a:parser ==# 'parse_cmd_endfunction' | |
call self.parse_cmd_endfunction() | |
elseif a:parser ==# 'parse_cmd_endif' | |
call self.parse_cmd_endif() | |
elseif a:parser ==# 'parse_cmd_endtry' | |
call self.parse_cmd_endtry() | |
elseif a:parser ==# 'parse_cmd_endwhile' | |
call self.parse_cmd_endwhile() | |
elseif a:parser ==# 'parse_cmd_execute' | |
call self.parse_cmd_execute() | |
elseif a:parser ==# 'parse_cmd_finally' | |
call self.parse_cmd_finally() | |
elseif a:parser ==# 'parse_cmd_finish' | |
call self.parse_cmd_finish() | |
elseif a:parser ==# 'parse_cmd_for' | |
call self.parse_cmd_for() | |
elseif a:parser ==# 'parse_cmd_function' | |
call self.parse_cmd_function() | |
elseif a:parser ==# 'parse_cmd_if' | |
call self.parse_cmd_if() | |
elseif a:parser ==# 'parse_cmd_insert' | |
call self.parse_cmd_insert() | |
elseif a:parser ==# 'parse_cmd_let' | |
call self.parse_cmd_let() | |
elseif a:parser ==# 'parse_cmd_const' | |
call self.parse_cmd_const() | |
elseif a:parser ==# 'parse_cmd_loadkeymap' | |
call self.parse_cmd_loadkeymap() | |
elseif a:parser ==# 'parse_cmd_lockvar' | |
call self.parse_cmd_lockvar() | |
elseif a:parser ==# 'parse_cmd_lua' | |
call self.parse_cmd_lua() | |
elseif a:parser ==# 'parse_cmd_modifier_range' | |
call self.parse_cmd_modifier_range() | |
elseif a:parser ==# 'parse_cmd_mzscheme' | |
call self.parse_cmd_mzscheme() | |
elseif a:parser ==# 'parse_cmd_perl' | |
call self.parse_cmd_perl() | |
elseif a:parser ==# 'parse_cmd_python' | |
call self.parse_cmd_python() | |
elseif a:parser ==# 'parse_cmd_python3' | |
call self.parse_cmd_python3() | |
elseif a:parser ==# 'parse_cmd_return' | |
call self.parse_cmd_return() | |
elseif a:parser ==# 'parse_cmd_ruby' | |
call self.parse_cmd_ruby() | |
elseif a:parser ==# 'parse_cmd_tcl' | |
call self.parse_cmd_tcl() | |
elseif a:parser ==# 'parse_cmd_throw' | |
call self.parse_cmd_throw() | |
elseif a:parser ==# 'parse_cmd_try' | |
call self.parse_cmd_try() | |
elseif a:parser ==# 'parse_cmd_unlet' | |
call self.parse_cmd_unlet() | |
elseif a:parser ==# 'parse_cmd_unlockvar' | |
call self.parse_cmd_unlockvar() | |
elseif a:parser ==# 'parse_cmd_usercmd' | |
call self.parse_cmd_usercmd() | |
elseif a:parser ==# 'parse_cmd_while' | |
call self.parse_cmd_while() | |
elseif a:parser ==# 'parse_wincmd' | |
call self.parse_wincmd() | |
elseif a:parser ==# 'parse_cmd_syntax' | |
call self.parse_cmd_syntax() | |
else | |
throw printf('unknown parser: %s', string(a:parser)) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.find_command() abort | |
let c = self.reader.peekn(1) | |
let name = '' | |
if c ==# 'k' | |
call self.reader.getn(1) | |
let name = 'k' | |
elseif c ==# 's' && self.reader.peekn(5) =~# '\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])' | |
call self.reader.getn(1) | |
let name = 'substitute' | |
elseif c =~# '[@*!=><&~#]' | |
call self.reader.getn(1) | |
let name = c | |
elseif self.reader.peekn(2) ==# 'py' | |
let name = self.reader.read_alnum() | |
else | |
let pos = self.reader.tell() | |
let name = self.reader.read_alpha() | |
if name !=# 'del' && name =~# '\v^d%[elete][lp]$' | |
call self.reader.seek_set(pos) | |
let name = self.reader.getn(len(name) - 1) | |
endif | |
endif | |
if name ==# '' | |
return s:NIL | |
endif | |
if has_key(self.find_command_cache, name) | |
return self.find_command_cache[name] | |
endif | |
let cmd = s:NIL | |
for x in self.builtin_commands | |
if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
unlet cmd | |
let cmd = x | |
break | |
endif | |
endfor | |
if self.neovim | |
for x in self.neovim_additional_commands | |
if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
unlet cmd | |
let cmd = x | |
break | |
endif | |
endfor | |
for x in self.neovim_removed_commands | |
if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
unlet cmd | |
let cmd = s:NIL | |
break | |
endif | |
endfor | |
endif | |
" FIXME: user defined command | |
if (cmd is# s:NIL || cmd.name ==# 'Print') && name =~# '^[A-Z]' | |
let name .= self.reader.read_alnum() | |
unlet cmd | |
let cmd = {'name': name, 'flags': 'USERCMD', 'parser': 'parse_cmd_usercmd'} | |
endif | |
let self.find_command_cache[name] = cmd | |
return cmd | |
endfunction | |
" TODO: | |
1 0.000002 function! s:VimLParser.parse_hashbang() abort | |
call self.reader.getn(-1) | |
endfunction | |
" TODO: | |
" ++opt=val | |
1 0.000002 function! s:VimLParser.parse_argopt() abort | |
while self.reader.p(0) ==# '+' && self.reader.p(1) ==# '+' | |
let s = self.reader.peekn(20) | |
if s =~# '^++bin\>' | |
call self.reader.getn(5) | |
let self.ea.force_bin = 1 | |
elseif s =~# '^++nobin\>' | |
call self.reader.getn(7) | |
let self.ea.force_bin = 2 | |
elseif s =~# '^++edit\>' | |
call self.reader.getn(6) | |
let self.ea.read_edit = 1 | |
elseif s =~# '^++ff=\(dos\|unix\|mac\)\>' | |
call self.reader.getn(5) | |
let self.ea.force_ff = self.reader.read_alpha() | |
elseif s =~# '^++fileformat=\(dos\|unix\|mac\)\>' | |
call self.reader.getn(13) | |
let self.ea.force_ff = self.reader.read_alpha() | |
elseif s =~# '^++enc=\S' | |
call self.reader.getn(6) | |
let self.ea.force_enc = self.reader.read_nonwhite() | |
elseif s =~# '^++encoding=\S' | |
call self.reader.getn(11) | |
let self.ea.force_enc = self.reader.read_nonwhite() | |
elseif s =~# '^++bad=\(keep\|drop\|.\)\>' | |
call self.reader.getn(6) | |
if s =~# '^++bad=keep' | |
let self.ea.bad_char = self.reader.getn(4) | |
elseif s =~# '^++bad=drop' | |
let self.ea.bad_char = self.reader.getn(4) | |
else | |
let self.ea.bad_char = self.reader.getn(1) | |
endif | |
elseif s =~# '^++' | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
else | |
break | |
endif | |
call self.reader.skip_white() | |
endwhile | |
endfunction | |
" TODO: | |
" +command | |
1 0.000002 function! s:VimLParser.parse_argcmd() abort | |
if self.reader.peekn(1) ==# '+' | |
call self.reader.getn(1) | |
if self.reader.peekn(1) ==# ' ' | |
let self.ea.do_ecmd_cmd = '$' | |
else | |
let self.ea.do_ecmd_cmd = self.read_cmdarg() | |
endif | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.read_cmdarg() abort | |
let r = '' | |
while s:TRUE | |
let c = self.reader.peekn(1) | |
if c ==# '' || s:iswhite(c) | |
break | |
endif | |
call self.reader.getn(1) | |
if c ==# '\' | |
let c = self.reader.getn(1) | |
endif | |
let r .= c | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_comment() abort | |
let npos = self.reader.getpos() | |
let c = self.reader.get() | |
if c !=# '"' | |
throw s:Err(printf('unexpected character: %s', c), npos) | |
endif | |
let node = s:Node(s:NODE_COMMENT) | |
let node.pos = npos | |
let node.str = self.reader.getn(-1) | |
call self.add_node(node) | |
endfunction | |
1 0.000009 function! s:VimLParser.parse_trail() abort | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if c ==# '<EOF>' | |
" pass | |
elseif c ==# '<EOL>' | |
call self.reader.get() | |
elseif c ==# '|' | |
call self.reader.get() | |
elseif c ==# '"' | |
call self.parse_comment() | |
call self.reader.get() | |
else | |
throw s:Err(printf('E488: Trailing characters: %s', c), self.reader.getpos()) | |
endif | |
endfunction | |
" modifier or range only command line | |
1 0.000002 function! s:VimLParser.parse_cmd_modifier_range() abort | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, self.reader.getpos()) | |
call self.add_node(node) | |
endfunction | |
" TODO: | |
1 0.000002 function! s:VimLParser.parse_cmd_common() abort | |
let end = self.reader.getpos() | |
if self.ea.cmd.flags =~# '\<TRLBAR\>' && !self.ea.usefilter | |
let end = self.separate_nextcmd() | |
elseif self.ea.cmd.name ==# '!' || self.ea.cmd.name ==# 'global' || self.ea.cmd.name ==# 'vglobal' || self.ea.usefilter | |
while s:TRUE | |
let end = self.reader.getpos() | |
if self.reader.getn(1) ==# '' | |
break | |
endif | |
endwhile | |
else | |
while s:TRUE | |
let end = self.reader.getpos() | |
if self.reader.getn(1) ==# '' | |
break | |
endif | |
endwhile | |
endif | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, end) | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.separate_nextcmd() abort | |
if self.ea.cmd.name ==# 'vimgrep' || self.ea.cmd.name ==# 'vimgrepadd' || self.ea.cmd.name ==# 'lvimgrep' || self.ea.cmd.name ==# 'lvimgrepadd' | |
call self.skip_vimgrep_pat() | |
endif | |
let pc = '' | |
let end = self.reader.getpos() | |
let nospend = end | |
while s:TRUE | |
let end = self.reader.getpos() | |
if !s:iswhite(pc) | |
let nospend = end | |
endif | |
let c = self.reader.peek() | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
break | |
elseif c ==# "\x16" " <C-V> | |
call self.reader.get() | |
let end = self.reader.getpos() | |
let nospend = self.reader.getpos() | |
let c = self.reader.peek() | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
break | |
endif | |
call self.reader.get() | |
elseif self.reader.peekn(2) ==# '`=' && self.ea.cmd.flags =~# '\<\(XFILE\|FILES\|FILE1\)\>' | |
call self.reader.getn(2) | |
call self.parse_expr() | |
let c = self.reader.peekn(1) | |
if c !=# '`' | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
endif | |
call self.reader.getn(1) | |
elseif c ==# '|' || c ==# "\n" || | |
\ (c ==# '"' && self.ea.cmd.flags !~# '\<NOTRLCOM\>' | |
\ && ((self.ea.cmd.name !=# '@' && self.ea.cmd.name !=# '*') | |
\ || self.reader.getpos() !=# self.ea.argpos) | |
\ && (self.ea.cmd.name !=# 'redir' | |
\ || self.reader.getpos().i !=# self.ea.argpos.i + 1 || pc !=# '@')) | |
let has_cpo_bar = s:FALSE " &cpoptions =~ 'b' | |
if (!has_cpo_bar || self.ea.cmd.flags !~# '\<USECTRLV\>') && pc ==# '\' | |
call self.reader.get() | |
else | |
break | |
endif | |
else | |
call self.reader.get() | |
endif | |
let pc = c | |
endwhile | |
if self.ea.cmd.flags !~# '\<NOTRLCOM\>' | |
let end = nospend | |
endif | |
return end | |
endfunction | |
" FIXME | |
1 0.000002 function! s:VimLParser.skip_vimgrep_pat() abort | |
if self.reader.peekn(1) ==# '' | |
" pass | |
elseif s:isidc(self.reader.peekn(1)) | |
" :vimgrep pattern fname | |
call self.reader.read_nonwhite() | |
else | |
" :vimgrep /pattern/[g][j] fname | |
let c = self.reader.getn(1) | |
let [_, endc] = self.parse_pattern(c) | |
if c !=# endc | |
return | |
endif | |
while self.reader.p(0) ==# 'g' || self.reader.p(0) ==# 'j' | |
call self.reader.getn(1) | |
endwhile | |
endif | |
endfunction | |
1 0.000008 function! s:VimLParser.parse_cmd_append() abort | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.readline() | |
let lines = [cmdline] | |
let m = '.' | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.getn(-1) | |
call add(lines, line) | |
if line ==# m | |
break | |
endif | |
call self.reader.get() | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_insert() abort | |
call self.parse_cmd_append() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_loadkeymap() abort | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.readline() | |
let lines = [cmdline] | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.readline() | |
call add(lines, line) | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_lua() abort | |
let lines = [] | |
call self.reader.skip_white() | |
if self.reader.peekn(2) ==# '<<' | |
call self.reader.getn(2) | |
call self.reader.skip_white() | |
let m = self.reader.readline() | |
if m ==# '' | |
let m = '.' | |
endif | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.getn(-1) | |
let lines = [cmdline] | |
call self.reader.get() | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.getn(-1) | |
call add(lines, line) | |
if line ==# m | |
break | |
endif | |
call self.reader.get() | |
endwhile | |
else | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.getn(-1) | |
let lines = [cmdline] | |
endif | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_mzscheme() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_perl() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_python() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_python3() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_ruby() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_tcl() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_finish() abort | |
call self.parse_cmd_common() | |
if self.context[0].type == s:NODE_TOPLEVEL | |
call self.reader.seek_end(0) | |
endif | |
endfunction | |
" FIXME | |
1 0.000002 function! s:VimLParser.parse_cmd_usercmd() abort | |
call self.parse_cmd_common() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_function() abort | |
let pos = self.reader.tell() | |
call self.reader.skip_white() | |
" :function | |
if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :function /pattern | |
if self.reader.peekn(1) ==# '/' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
let left = self.parse_lvalue_func() | |
call self.reader.skip_white() | |
if left.type == s:NODE_IDENTIFIER | |
let s = left.value | |
let ss = split(s, '\zs') | |
if ss[0] !=# '<' && !s:isupper(ss[0]) && stridx(s, ':') == -1 && stridx(s, '#') == -1 | |
throw s:Err(printf('E128: Function name must start with a capital or contain a colon: %s', s), left.pos) | |
endif | |
endif | |
" :function {name} | |
if self.reader.peekn(1) !=# '(' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :function[!] {name}([arguments]) [range] [abort] [dict] [closure] | |
let node = s:Node(s:NODE_FUNCTION) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.left = left | |
let node.rlist = [] | |
let node.attr = {'range': 0, 'abort': 0, 'dict': 0, 'closure': 0} | |
let node.endfunction = s:NIL | |
call self.reader.getn(1) | |
let tokenizer = s:ExprTokenizer.new(self.reader) | |
if tokenizer.peek().type == s:TOKEN_PCLOSE | |
call tokenizer.get() | |
else | |
let named = {} | |
while s:TRUE | |
let varnode = s:Node(s:NODE_IDENTIFIER) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_IDENTIFIER | |
if !s:isargname(token.value) || token.value ==# 'firstline' || token.value ==# 'lastline' | |
throw s:Err(printf('E125: Illegal argument: %s', token.value), token.pos) | |
elseif has_key(named, token.value) | |
throw s:Err(printf('E853: Duplicate argument name: %s', token.value), token.pos) | |
endif | |
let named[token.value] = 1 | |
let varnode.pos = token.pos | |
let varnode.value = token.value | |
call add(node.rlist, varnode) | |
" XXX: Vim doesn't skip white space before comma. F(a ,b) => E475 | |
if s:iswhite(self.reader.p(0)) && tokenizer.peek().type == s:TOKEN_COMMA | |
throw s:Err('E475: Invalid argument: White space is not allowed before comma', self.reader.getpos()) | |
endif | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_COMMA | |
" XXX: Vim allows last comma. F(a, b, ) => OK | |
if tokenizer.peek().type == s:TOKEN_PCLOSE | |
call tokenizer.get() | |
break | |
endif | |
elseif token.type == s:TOKEN_PCLOSE | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
elseif token.type == s:TOKEN_DOTDOTDOT | |
let varnode.pos = token.pos | |
let varnode.value = token.value | |
call add(node.rlist, varnode) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_PCLOSE | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
endwhile | |
endif | |
while s:TRUE | |
call self.reader.skip_white() | |
let epos = self.reader.getpos() | |
let key = self.reader.read_alpha() | |
if key ==# '' | |
break | |
elseif key ==# 'range' | |
let node.attr.range = s:TRUE | |
elseif key ==# 'abort' | |
let node.attr.abort = s:TRUE | |
elseif key ==# 'dict' | |
let node.attr.dict = s:TRUE | |
elseif key ==# 'closure' | |
let node.attr.closure = s:TRUE | |
else | |
throw s:Err(printf('unexpected token: %s', key), epos) | |
endif | |
endwhile | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_endfunction() abort | |
call self.check_missing_endif('ENDFUNCTION', self.ea.cmdpos) | |
call self.check_missing_endtry('ENDFUNCTION', self.ea.cmdpos) | |
call self.check_missing_endwhile('ENDFUNCTION', self.ea.cmdpos) | |
call self.check_missing_endfor('ENDFUNCTION', self.ea.cmdpos) | |
if self.context[0].type !=# s:NODE_FUNCTION | |
throw s:Err('E193: :endfunction not inside a function', self.ea.cmdpos) | |
endif | |
call self.reader.getn(-1) | |
let node = s:Node(s:NODE_ENDFUNCTION) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endfunction = node | |
call self.pop_context() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_delfunction() abort | |
let node = s:Node(s:NODE_DELFUNCTION) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.left = self.parse_lvalue_func() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_return() abort | |
if self.find_context(s:NODE_FUNCTION) == -1 | |
throw s:Err('E133: :return not inside a function', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_RETURN) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.left = s:NIL | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if c ==# '"' || !self.ends_excmds(c) | |
let node.left = self.parse_expr() | |
endif | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_call() abort | |
let node = s:Node(s:NODE_EXCALL) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if self.ends_excmds(c) | |
throw s:Err('E471: Argument required', self.reader.getpos()) | |
endif | |
let node.left = self.parse_expr() | |
if node.left.type !=# s:NODE_CALL | |
throw s:Err('Not an function call', node.left.pos) | |
endif | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_let() abort | |
let pos = self.reader.tell() | |
call self.reader.skip_white() | |
" :let | |
if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
let lhs = self.parse_letlhs() | |
call self.reader.skip_white() | |
let s1 = self.reader.peekn(1) | |
let s2 = self.reader.peekn(2) | |
" TODO check scriptversion? | |
if s2 ==# '..' | |
let s2 = self.reader.peekn(3) | |
endif | |
" :let {var-name} .. | |
if self.ends_excmds(s1) || (s2 !=# '+=' && s2 !=# '-=' && s2 !=# '.=' && s2 !=# '..=' && s2 !=# '*=' && s2 !=# '/=' && s2 !=# '%=' && s1 !=# '=') | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :let left op right | |
let node = s:Node(s:NODE_LET) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.op = '' | |
let node.left = lhs.left | |
let node.list = lhs.list | |
let node.rest = lhs.rest | |
let node.right = s:NIL | |
if s2 ==# '+=' || s2 ==# '-=' || s2 ==# '.=' || s2 ==# '..=' || s2 ==# '*=' || s2 ==# '/=' || s2 ==# '%=' | |
call self.reader.getn(len(s2)) | |
let node.op = s2 | |
elseif s1 ==# '=' | |
call self.reader.getn(1) | |
let node.op = s1 | |
else | |
throw 'NOT REACHED' | |
endif | |
let node.right = self.parse_expr() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_const() abort | |
let pos = self.reader.tell() | |
call self.reader.skip_white() | |
" :const | |
if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
let lhs = self.parse_constlhs() | |
call self.reader.skip_white() | |
let s1 = self.reader.peekn(1) | |
" :const {var-name} | |
if self.ends_excmds(s1) || s1 !=# '=' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :const left op right | |
let node = s:Node(s:NODE_CONST) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.reader.getn(1) | |
let node.op = s1 | |
let node.left = lhs.left | |
let node.list = lhs.list | |
let node.rest = lhs.rest | |
let node.right = self.parse_expr() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_unlet() abort | |
let node = s:Node(s:NODE_UNLET) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_lvaluelist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_lockvar() abort | |
let node = s:Node(s:NODE_LOCKVAR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.depth = s:NIL | |
let node.list = [] | |
call self.reader.skip_white() | |
if s:isdigit(self.reader.peekn(1)) | |
let node.depth = str2nr(self.reader.read_digit(), 10) | |
endif | |
let node.list = self.parse_lvaluelist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_unlockvar() abort | |
let node = s:Node(s:NODE_UNLOCKVAR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.depth = s:NIL | |
let node.list = [] | |
call self.reader.skip_white() | |
if s:isdigit(self.reader.peekn(1)) | |
let node.depth = str2nr(self.reader.read_digit(), 10) | |
endif | |
let node.list = self.parse_lvaluelist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_if() abort | |
let node = s:Node(s:NODE_IF) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.cond = self.parse_expr() | |
let node.elseif = [] | |
let node.else = s:NIL | |
let node.endif = s:NIL | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_elseif() abort | |
if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF | |
throw s:Err('E582: :elseif without :if', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_IF | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ELSEIF) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.cond = self.parse_expr() | |
call add(self.context[0].elseif, node) | |
call self.push_context(node) | |
endfunction | |
1 0.000008 function! s:VimLParser.parse_cmd_else() abort | |
if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF | |
throw s:Err('E581: :else without :if', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_IF | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ELSE) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let self.context[0].else = node | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_endif() abort | |
if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF && self.context[0].type !=# s:NODE_ELSE | |
throw s:Err('E580: :endif without :if', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_IF | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ENDIF) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endif = node | |
call self.pop_context() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_while() abort | |
let node = s:Node(s:NODE_WHILE) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.cond = self.parse_expr() | |
let node.endwhile = s:NIL | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000013 function! s:VimLParser.parse_cmd_endwhile() abort | |
if self.context[0].type !=# s:NODE_WHILE | |
throw s:Err('E588: :endwhile without :while', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_ENDWHILE) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endwhile = node | |
call self.pop_context() | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_for() abort | |
let node = s:Node(s:NODE_FOR) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.left = s:NIL | |
let node.right = s:NIL | |
let node.endfor = s:NIL | |
let lhs = self.parse_letlhs() | |
let node.left = lhs.left | |
let node.list = lhs.list | |
let node.rest = lhs.rest | |
call self.reader.skip_white() | |
let epos = self.reader.getpos() | |
if self.reader.read_alpha() !=# 'in' | |
throw s:Err('Missing "in" after :for', epos) | |
endif | |
let node.right = self.parse_expr() | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_endfor() abort | |
if self.context[0].type !=# s:NODE_FOR | |
throw s:Err('E588: :endfor without :for', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_ENDFOR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endfor = node | |
call self.pop_context() | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_continue() abort | |
if self.find_context(s:NODE_WHILE) == -1 && self.find_context(s:NODE_FOR) == -1 | |
throw s:Err('E586: :continue without :while or :for', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_CONTINUE) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.add_node(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_break() abort | |
if self.find_context(s:NODE_WHILE) == -1 && self.find_context(s:NODE_FOR) == -1 | |
throw s:Err('E587: :break without :while or :for', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_BREAK) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.add_node(node) | |
endfunction | |
1 0.000012 function! s:VimLParser.parse_cmd_try() abort | |
let node = s:Node(s:NODE_TRY) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.catch = [] | |
let node.finally = s:NIL | |
let node.endtry = s:NIL | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_catch() abort | |
if self.context[0].type == s:NODE_FINALLY | |
throw s:Err('E604: :catch after :finally', self.ea.cmdpos) | |
elseif self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH | |
throw s:Err('E603: :catch without :try', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_TRY | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_CATCH) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.pattern = s:NIL | |
call self.reader.skip_white() | |
if !self.ends_excmds(self.reader.peek()) | |
let [node.pattern, _] = self.parse_pattern(self.reader.get()) | |
endif | |
call add(self.context[0].catch, node) | |
call self.push_context(node) | |
endfunction | |
1 0.000004 function! s:VimLParser.parse_cmd_finally() abort | |
if self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH | |
throw s:Err('E606: :finally without :try', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_TRY | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_FINALLY) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let self.context[0].finally = node | |
call self.push_context(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_endtry() abort | |
if self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH && self.context[0].type !=# s:NODE_FINALLY | |
throw s:Err('E602: :endtry without :try', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_TRY | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ENDTRY) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endtry = node | |
call self.pop_context() | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_throw() abort | |
let node = s:Node(s:NODE_THROW) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.left = self.parse_expr() | |
call self.add_node(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_echo() abort | |
let node = s:Node(s:NODE_ECHO) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_echon() abort | |
let node = s:Node(s:NODE_ECHON) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_echohl() abort | |
let node = s:Node(s:NODE_ECHOHL) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = '' | |
while !self.ends_excmds(self.reader.peek()) | |
let node.str .= self.reader.get() | |
endwhile | |
call self.add_node(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_echomsg() abort | |
let node = s:Node(s:NODE_ECHOMSG) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_echoerr() abort | |
let node = s:Node(s:NODE_ECHOERR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_execute() abort | |
let node = s:Node(s:NODE_EXECUTE) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_expr() abort | |
return s:ExprParser.new(self.reader).parse() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_exprlist() abort | |
let list = [] | |
while s:TRUE | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if c !=# '"' && self.ends_excmds(c) | |
break | |
endif | |
let node = self.parse_expr() | |
call add(list, node) | |
endwhile | |
return list | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_lvalue_func() abort | |
let p = s:LvalueParser.new(self.reader) | |
let node = p.parse() | |
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG | |
return node | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
endfunction | |
" FIXME: | |
1 0.000003 function! s:VimLParser.parse_lvalue() abort | |
let p = s:LvalueParser.new(self.reader) | |
let node = p.parse() | |
if node.type == s:NODE_IDENTIFIER | |
if !s:isvarname(node.value) | |
throw s:Err(printf('E461: Illegal variable name: %s', node.value), node.pos) | |
endif | |
endif | |
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_SLICE || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG | |
return node | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
endfunction | |
" TODO: merge with s:VimLParser.parse_lvalue() | |
1 0.000003 function! s:VimLParser.parse_constlvalue() abort | |
let p = s:LvalueParser.new(self.reader) | |
let node = p.parse() | |
if node.type == s:NODE_IDENTIFIER | |
if !s:isvarname(node.value) | |
throw s:Err(printf('E461: Illegal variable name: %s', node.value), node.pos) | |
endif | |
endif | |
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME | |
return node | |
elseif node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_SLICE || node.type == s:NODE_DOT | |
throw s:Err('E996: Cannot lock a list or dict', node.pos) | |
elseif node.type == s:NODE_OPTION | |
throw s:Err('E996: Cannot lock an option', node.pos) | |
elseif node.type == s:NODE_ENV | |
throw s:Err('E996: Cannot lock an environment variable', node.pos) | |
elseif node.type == s:NODE_REG | |
throw s:Err('E996: Cannot lock a register', node.pos) | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_lvaluelist() abort | |
let list = [] | |
let node = self.parse_expr() | |
call add(list, node) | |
while s:TRUE | |
call self.reader.skip_white() | |
if self.ends_excmds(self.reader.peek()) | |
break | |
endif | |
let node = self.parse_lvalue() | |
call add(list, node) | |
endwhile | |
return list | |
endfunction | |
" FIXME: | |
1 0.000003 function! s:VimLParser.parse_letlhs() abort | |
let lhs = {'left': s:NIL, 'list': s:NIL, 'rest': s:NIL} | |
let tokenizer = s:ExprTokenizer.new(self.reader) | |
if tokenizer.peek().type == s:TOKEN_SQOPEN | |
call tokenizer.get() | |
let lhs.list = [] | |
while s:TRUE | |
let node = self.parse_lvalue() | |
call add(lhs.list, node) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
elseif token.type == s:TOKEN_COMMA | |
continue | |
elseif token.type == s:TOKEN_SEMICOLON | |
let node = self.parse_lvalue() | |
let lhs.rest = node | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
endwhile | |
else | |
let lhs.left = self.parse_lvalue() | |
endif | |
return lhs | |
endfunction | |
" TODO: merge with s:VimLParser.parse_letlhs() ? | |
1 0.000003 function! s:VimLParser.parse_constlhs() abort | |
let lhs = {'left': s:NIL, 'list': s:NIL, 'rest': s:NIL} | |
let tokenizer = s:ExprTokenizer.new(self.reader) | |
if tokenizer.peek().type == s:TOKEN_SQOPEN | |
call tokenizer.get() | |
let lhs.list = [] | |
while s:TRUE | |
let node = self.parse_lvalue() | |
call add(lhs.list, node) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
elseif token.type == s:TOKEN_COMMA | |
continue | |
elseif token.type == s:TOKEN_SEMICOLON | |
let node = self.parse_lvalue() | |
let lhs.rest = node | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
endwhile | |
else | |
let lhs.left = self.parse_constlvalue() | |
endif | |
return lhs | |
endfunction | |
1 0.000003 function! s:VimLParser.ends_excmds(c) abort | |
return a:c ==# '' || a:c ==# '|' || a:c ==# '"' || a:c ==# '<EOF>' || a:c ==# '<EOL>' | |
endfunction | |
" FIXME: validate argument | |
1 0.000003 function! s:VimLParser.parse_wincmd() abort | |
let c = self.reader.getn(1) | |
if c ==# '' | |
throw s:Err('E471: Argument required', self.reader.getpos()) | |
elseif c ==# 'g' || c ==# "\x07" " <C-G> | |
let c2 = self.reader.getn(1) | |
if c2 ==# '' || s:iswhite(c2) | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
endif | |
endif | |
let end = self.reader.getpos() | |
call self.reader.skip_white() | |
if !self.ends_excmds(self.reader.peek()) | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
endif | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, end) | |
call self.add_node(node) | |
endfunction | |
" FIXME: validate argument | |
1 0.000003 function! s:VimLParser.parse_cmd_syntax() abort | |
let end = self.reader.getpos() | |
while s:TRUE | |
let end = self.reader.getpos() | |
let c = self.reader.peek() | |
if c ==# '/' || c ==# "'" || c ==# '"' | |
call self.reader.getn(1) | |
call self.parse_pattern(c) | |
elseif c ==# '=' | |
call self.reader.getn(1) | |
call self.parse_pattern(' ') | |
elseif self.ends_excmds(c) | |
break | |
endif | |
call self.reader.getn(1) | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, end) | |
call self.add_node(node) | |
endfunction | |
1 0.000025 let s:VimLParser.neovim_additional_commands = [ | |
\ {'name': 'rshada', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wshada', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}] | |
1 0.000050 let s:VimLParser.neovim_removed_commands = [ | |
\ {'name': 'Print', 'minlen':1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'fixdel', 'minlen':3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helpfind', 'minlen':5, 'flags': 'EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'open', 'minlen':1, 'flags': 'RANGE|BANG|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'shell', 'minlen':2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tearoff', 'minlen':2, 'flags': 'NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'gvim', 'minlen':2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}] | |
" To find new builtin_commands, run the below script. | |
" $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h | |
1 0.002518 let s:VimLParser.builtin_commands = [ | |
\ {'name': 'append', 'minlen': 1, 'flags': 'BANG|RANGE|ZEROR|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_append'}, | |
\ {'name': 'abbreviate', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'abclear', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'aboveleft', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'all', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'amenu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'anoremenu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'args', 'minlen': 2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argadd', 'minlen': 4, 'flags': 'BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argdelete', 'minlen': 4, 'flags': 'BANG|RANGE|NOTADR|FILES|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argedit', 'minlen': 4, 'flags': 'BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argdo', 'minlen': 5, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argglobal', 'minlen': 4, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'arglocal', 'minlen': 4, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argument', 'minlen': 4, 'flags': 'BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ascii', 'minlen': 2, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'autocmd', 'minlen': 2, 'flags': 'BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'augroup', 'minlen': 3, 'flags': 'BANG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'aunmenu', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'buffer', 'minlen': 1, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bNext', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ball', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'badd', 'minlen': 3, 'flags': 'NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bdelete', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'behave', 'minlen': 2, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'belowright', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bfirst', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'blast', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bmodified', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bnext', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'botright', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bprevious', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'brewind', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'break', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_break'}, | |
\ {'name': 'breakadd', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'breakdel', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'breaklist', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'browse', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bufdo', 'minlen': 5, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'buffers', 'minlen': 7, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bunload', 'minlen': 3, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bwipeout', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'change', 'minlen': 1, 'flags': 'BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cNext', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cNfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cabbrev', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cabclear', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'caddbuffer', 'minlen': 3, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'caddexpr', 'minlen': 5, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'caddfile', 'minlen': 5, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'call', 'minlen': 3, 'flags': 'RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_call'}, | |
\ {'name': 'catch', 'minlen': 3, 'flags': 'EXTRA|SBOXOK|CMDWIN', 'parser': 'parse_cmd_catch'}, | |
\ {'name': 'cbuffer', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cc', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cclose', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cd', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'center', 'minlen': 2, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cexpr', 'minlen': 3, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cfirst', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cgetbuffer', 'minlen': 5, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cgetexpr', 'minlen': 5, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cgetfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'changes', 'minlen': 7, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'chdir', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'checkpath', 'minlen': 3, 'flags': 'TRLBAR|BANG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'checktime', 'minlen': 6, 'flags': 'RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'clist', 'minlen': 2, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'clast', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'close', 'minlen': 3, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnext', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnewer', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnoremap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnoreabbrev', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'copy', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'colder', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'colorscheme', 'minlen': 4, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'command', 'minlen': 3, 'flags': 'EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'comclear', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'compiler', 'minlen': 4, 'flags': 'BANG|TRLBAR|WORD1|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'continue', 'minlen': 3, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_continue'}, | |
\ {'name': 'confirm', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'copen', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cpfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cquit', 'minlen': 2, 'flags': 'TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'crewind', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cscope', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cstag', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cunabbrev', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cwindow', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delete', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delmarks', 'minlen': 4, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'debug', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'debuggreedy', 'minlen': 6, 'flags': 'RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delcommand', 'minlen': 4, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delfunction', 'minlen': 4, 'flags': 'BANG|NEEDARG|WORD1|CMDWIN', 'parser': 'parse_cmd_delfunction'}, | |
\ {'name': 'diffupdate', 'minlen': 3, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffget', 'minlen': 5, 'flags': 'RANGE|EXTRA|TRLBAR|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffoff', 'minlen': 5, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffpatch', 'minlen': 5, 'flags': 'EXTRA|FILE1|TRLBAR|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffput', 'minlen': 6, 'flags': 'RANGE|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffsplit', 'minlen': 5, 'flags': 'EXTRA|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffthis', 'minlen': 5, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'digraphs', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'display', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'djump', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'dlist', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'doautocmd', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'doautoall', 'minlen': 7, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'drop', 'minlen': 2, 'flags': 'FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'dsearch', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'dsplit', 'minlen': 3, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'edit', 'minlen': 1, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'earlier', 'minlen': 2, 'flags': 'TRLBAR|EXTRA|NOSPC|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'echo', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echo'}, | |
\ {'name': 'echoerr', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echoerr'}, | |
\ {'name': 'echohl', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echohl'}, | |
\ {'name': 'echomsg', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echomsg'}, | |
\ {'name': 'echon', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echon'}, | |
\ {'name': 'else', 'minlen': 2, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_else'}, | |
\ {'name': 'elseif', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_elseif'}, | |
\ {'name': 'emenu', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'endif', 'minlen': 2, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endif'}, | |
\ {'name': 'endfor', 'minlen': 5, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endfor'}, | |
\ {'name': 'endfunction', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_endfunction'}, | |
\ {'name': 'endtry', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endtry'}, | |
\ {'name': 'endwhile', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endwhile'}, | |
\ {'name': 'enew', 'minlen': 3, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ex', 'minlen': 2, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'execute', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_execute'}, | |
\ {'name': 'exit', 'minlen': 3, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'exusage', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'file', 'minlen': 1, 'flags': 'RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'files', 'minlen': 5, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'filetype', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'find', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'finally', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_finally'}, | |
\ {'name': 'finish', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_finish'}, | |
\ {'name': 'first', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'fixdel', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'fold', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'foldclose', 'minlen': 5, 'flags': 'RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'folddoopen', 'minlen': 5, 'flags': 'RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'folddoclosed', 'minlen': 7, 'flags': 'RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'foldopen', 'minlen': 5, 'flags': 'RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'for', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_for'}, | |
\ {'name': 'function', 'minlen': 2, 'flags': 'EXTRA|BANG|CMDWIN', 'parser': 'parse_cmd_function'}, | |
\ {'name': 'global', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'goto', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'grep', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'grepadd', 'minlen': 5, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'gui', 'minlen': 2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'gvim', 'minlen': 2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'hardcopy', 'minlen': 2, 'flags': 'RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'help', 'minlen': 1, 'flags': 'BANG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helpfind', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helpgrep', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helptags', 'minlen': 5, 'flags': 'NEEDARG|FILES|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'highlight', 'minlen': 2, 'flags': 'BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'hide', 'minlen': 3, 'flags': 'BANG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'history', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'insert', 'minlen': 1, 'flags': 'BANG|RANGE|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_insert'}, | |
\ {'name': 'iabbrev', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iabclear', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'if', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_if'}, | |
\ {'name': 'ijump', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ilist', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'imap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'imapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'imenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'inoremap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'inoreabbrev', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'inoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'intro', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'isearch', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'isplit', 'minlen': 3, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iunabbrev', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'join', 'minlen': 1, 'flags': 'BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'jumps', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'k', 'minlen': 1, 'flags': 'RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keepalt', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keepmarks', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keepjumps', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keeppatterns', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lNext', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lNfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'list', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'laddexpr', 'minlen': 3, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'laddbuffer', 'minlen': 5, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'laddfile', 'minlen': 5, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'last', 'minlen': 2, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'language', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'later', 'minlen': 3, 'flags': 'TRLBAR|EXTRA|NOSPC|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lbuffer', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lcd', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lchdir', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lclose', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lcscope', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'left', 'minlen': 2, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'leftabove', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'let', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_let'}, | |
\ {'name': 'const', 'minlen': 4, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_const'}, | |
\ {'name': 'lexpr', 'minlen': 3, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lfirst', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgetbuffer', 'minlen': 5, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgetexpr', 'minlen': 5, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgetfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgrep', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgrepadd', 'minlen': 6, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lhelpgrep', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'll', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'llast', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'list', 'minlen': 3, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lmake', 'minlen': 4, 'flags': 'BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnext', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnewer', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'loadkeymap', 'minlen': 5, 'flags': 'CMDWIN', 'parser': 'parse_cmd_loadkeymap'}, | |
\ {'name': 'loadview', 'minlen': 2, 'flags': 'FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lockmarks', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lockvar', 'minlen': 5, 'flags': 'BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_lockvar'}, | |
\ {'name': 'lolder', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lopen', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lpfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lrewind', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ls', 'minlen': 2, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ltag', 'minlen': 2, 'flags': 'NOTADR|TRLBAR|BANG|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lua', 'minlen': 3, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_lua'}, | |
\ {'name': 'luado', 'minlen': 4, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'luafile', 'minlen': 4, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lvimgrep', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lvimgrepadd', 'minlen': 9, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lwindow', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'move', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mark', 'minlen': 2, 'flags': 'RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'make', 'minlen': 3, 'flags': 'BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'map', 'minlen': 3, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mapclear', 'minlen': 4, 'flags': 'EXTRA|BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'marks', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'match', 'minlen': 3, 'flags': 'RANGE|NOTADR|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'menu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'menutranslate', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'messages', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkexrc', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mksession', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkspell', 'minlen': 4, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkvimrc', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkview', 'minlen': 5, 'flags': 'BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mode', 'minlen': 3, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mzscheme', 'minlen': 2, 'flags': 'RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK', 'parser': 'parse_cmd_mzscheme'}, | |
\ {'name': 'mzfile', 'minlen': 3, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nbclose', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nbkey', 'minlen': 2, 'flags': 'EXTRA|NOTADR|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nbstart', 'minlen': 3, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'next', 'minlen': 1, 'flags': 'RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'new', 'minlen': 3, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noautocmd', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noremap', 'minlen': 2, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nohlsearch', 'minlen': 3, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noreabbrev', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noremenu', 'minlen': 6, 'flags': 'RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'normal', 'minlen': 4, 'flags': 'RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'number', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nunmap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'oldfiles', 'minlen': 2, 'flags': 'BANG|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'open', 'minlen': 1, 'flags': 'RANGE|BANG|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'omap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'omapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'omenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'only', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'onoremap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'onoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'options', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ounmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ounmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ownsyntax', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pclose', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pedit', 'minlen': 3, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'perl', 'minlen': 2, 'flags': 'RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_perl'}, | |
\ {'name': 'print', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'profdel', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'profile', 'minlen': 4, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'promptfind', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'promptrepl', 'minlen': 7, 'flags': 'EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'perldo', 'minlen': 5, 'flags': 'RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pop', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'popup', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ppop', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'preserve', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'previous', 'minlen': 4, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'psearch', 'minlen': 2, 'flags': 'BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptag', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptNext', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptfirst', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptjump', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptlast', 'minlen': 3, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptnext', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptprevious', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptrewind', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptselect', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'put', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pwd', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'py3', 'minlen': 3, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_python3'}, | |
\ {'name': 'python3', 'minlen': 7, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_python3'}, | |
\ {'name': 'py3file', 'minlen': 4, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'python', 'minlen': 2, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_python'}, | |
\ {'name': 'pyfile', 'minlen': 3, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pydo', 'minlen': 3, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'py3do', 'minlen': 4, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'quit', 'minlen': 1, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'quitall', 'minlen': 5, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'qall', 'minlen': 2, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'read', 'minlen': 1, 'flags': 'BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'recover', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redo', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redir', 'minlen': 4, 'flags': 'BANG|FILES|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redraw', 'minlen': 4, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redrawstatus', 'minlen': 7, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'registers', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'resize', 'minlen': 3, 'flags': 'RANGE|NOTADR|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'retab', 'minlen': 3, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'return', 'minlen': 4, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_return'}, | |
\ {'name': 'rewind', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'right', 'minlen': 2, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rightbelow', 'minlen': 6, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ruby', 'minlen': 3, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_ruby'}, | |
\ {'name': 'rubydo', 'minlen': 5, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rubyfile', 'minlen': 5, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rundo', 'minlen': 4, 'flags': 'NEEDARG|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'runtime', 'minlen': 2, 'flags': 'BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rviminfo', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'substitute', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sNext', 'minlen': 2, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sandbox', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sargument', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sall', 'minlen': 3, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'saveas', 'minlen': 3, 'flags': 'BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbuffer', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbNext', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sball', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbfirst', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sblast', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbmodified', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbnext', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbprevious', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbrewind', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'scriptnames', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'scriptencoding', 'minlen': 7, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'scscope', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'set', 'minlen': 2, 'flags': 'TRLBAR|EXTRA|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'setfiletype', 'minlen': 4, 'flags': 'TRLBAR|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'setglobal', 'minlen': 4, 'flags': 'TRLBAR|EXTRA|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'setlocal', 'minlen': 4, 'flags': 'TRLBAR|EXTRA|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sfind', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sfirst', 'minlen': 4, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'shell', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'simalt', 'minlen': 3, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sign', 'minlen': 3, 'flags': 'NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'silent', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sleep', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'slast', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smagic', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smap', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sniff', 'minlen': 3, 'flags': 'EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snomagic', 'minlen': 3, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snoremap', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sort', 'minlen': 3, 'flags': 'RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'source', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spelldump', 'minlen': 6, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellgood', 'minlen': 3, 'flags': 'BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellinfo', 'minlen': 6, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellrepall', 'minlen': 6, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellundo', 'minlen': 6, 'flags': 'BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellwrong', 'minlen': 6, 'flags': 'BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'split', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sprevious', 'minlen': 3, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'srewind', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stop', 'minlen': 2, 'flags': 'TRLBAR|BANG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stag', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'startinsert', 'minlen': 4, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'startgreplace', 'minlen': 6, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'startreplace', 'minlen': 6, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stopinsert', 'minlen': 5, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stjump', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stselect', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sunhide', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sunmap', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'suspend', 'minlen': 3, 'flags': 'TRLBAR|BANG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sview', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'swapname', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'syntax', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_syntax'}, | |
\ {'name': 'syntime', 'minlen': 5, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'syncbind', 'minlen': 4, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 't', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tNext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabNext', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabclose', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabdo', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabedit', 'minlen': 4, 'flags': 'BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabfind', 'minlen': 4, 'flags': 'BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabfirst', 'minlen': 6, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tablast', 'minlen': 4, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabmove', 'minlen': 4, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabnew', 'minlen': 6, 'flags': 'BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabnext', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabonly', 'minlen': 4, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabprevious', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabrewind', 'minlen': 4, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabs', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tab', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tag', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tags', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tcl', 'minlen': 2, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_tcl'}, | |
\ {'name': 'tcldo', 'minlen': 4, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tclfile', 'minlen': 4, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tearoff', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tfirst', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'throw', 'minlen': 2, 'flags': 'EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_throw'}, | |
\ {'name': 'tjump', 'minlen': 2, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tlast', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tmenu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tnext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'topleft', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'trewind', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'try', 'minlen': 3, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_try'}, | |
\ {'name': 'tselect', 'minlen': 2, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tunmenu', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'undo', 'minlen': 1, 'flags': 'RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'undojoin', 'minlen': 5, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'undolist', 'minlen': 5, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unabbreviate', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unhide', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unlet', 'minlen': 3, 'flags': 'BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_unlet'}, | |
\ {'name': 'unlockvar', 'minlen': 4, 'flags': 'BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_unlockvar'}, | |
\ {'name': 'unmap', 'minlen': 3, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unmenu', 'minlen': 4, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unsilent', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'update', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vglobal', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|DFLALL|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'version', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'verbose', 'minlen': 4, 'flags': 'NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vertical', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vimgrep', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vimgrepadd', 'minlen': 8, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'visual', 'minlen': 2, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'viusage', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'view', 'minlen': 3, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vnew', 'minlen': 3, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vsplit', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'windo', 'minlen': 5, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'write', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wNext', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wall', 'minlen': 2, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'while', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_while'}, | |
\ {'name': 'winsize', 'minlen': 2, 'flags': 'EXTRA|NEEDARG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wincmd', 'minlen': 4, 'flags': 'NEEDARG|WORD1|RANGE|NOTADR', 'parser': 'parse_wincmd'}, | |
\ {'name': 'winpos', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wnext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wq', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wqall', 'minlen': 3, 'flags': 'BANG|FILE1|ARGOPT|DFLALL|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wsverb', 'minlen': 2, 'flags': 'EXTRA|NOTADR|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wundo', 'minlen': 2, 'flags': 'BANG|NEEDARG|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wviminfo', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xit', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xall', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'yank', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'z', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '!', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|FILES|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '#', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '&', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': '*', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '<', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': '=', 'minlen': 1, 'flags': 'RANGE|TRLBAR|DFLALL|EXFLAGS|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '>', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': '@', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'Next', 'minlen': 1, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'Print', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'X', 'minlen': 1, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': '~', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'cbottom', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 3, 'name': 'cdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 3, 'name': 'cfdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'chistory', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR|CMDWIN', 'minlen': 3, 'name': 'clearjumps', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'minlen': 4, 'name': 'filter', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'minlen': 5, 'name': 'helpclose', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'lbottom', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 2, 'name': 'ldo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 3, 'name': 'lfdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'lhistory', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'minlen': 3, 'name': 'llist', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'minlen': 3, 'name': 'noswapfile', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|FILE1|NEEDARG|TRLBAR|SBOXOK|CMDWIN', 'minlen': 2, 'name': 'packadd', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|TRLBAR|SBOXOK|CMDWIN', 'minlen': 5, 'name': 'packloadall', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR|CMDWIN|SBOXOK', 'minlen': 3, 'name': 'smile', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'minlen': 3, 'name': 'pyx', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'minlen': 4, 'name': 'pyxdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'minlen': 7, 'name': 'pythonx', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'minlen': 4, 'name': 'pyxfile', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|BANG|FILES|CMDWIN', 'minlen': 3, 'name': 'terminal', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'minlen': 3, 'name': 'tmap', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|CMDWIN', 'minlen': 5, 'name': 'tmapclear', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'minlen': 3, 'name': 'tnoremap', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'minlen': 5, 'name': 'tunmap', 'parser': 'parse_cmd_common'}, | |
\ | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 4, 'name': 'cabove', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'cafter', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'cbefore', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 4, 'name': 'cbelow', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN', 'minlen': 4, 'name': 'const', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'labove', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'lafter', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'lbefore', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 4, 'name': 'lbelow', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_TRLBAR|EX_CMDWIN', 'minlen': 7, 'name': 'redrawtabline', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_WORD1|EX_TRLBAR|EX_CMDWIN', 'minlen': 7, 'name': 'scriptversion', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_BANG|EX_FILE1|EX_TRLBAR|EX_CMDWIN', 'minlen': 2, 'name': 'tcd', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_BANG|EX_FILE1|EX_TRLBAR|EX_CMDWIN', 'minlen': 3, 'name': 'tchdir', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN', 'minlen': 3, 'name': 'tlmenu', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN', 'minlen': 3, 'name': 'tlnoremenu', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN', 'minlen': 3, 'name': 'tlunmenu', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_EXTRA|EX_TRLBAR|EX_CMDWIN', 'minlen': 2, 'name': 'xrestore', 'parser': 'parse_cmd_common'}, | |
\] | |
1 0.001357 let s:VimLParser.builtin_functions = [ | |
\ {'name': 'abs', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'acos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'add', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'and', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'append', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'appendbufline', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'argc', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'argidx', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'arglistid', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'argv', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'asin', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'assert_beeps', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'assert_equal', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_equalfile', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'assert_exception', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'assert_fails', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'assert_false', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'assert_inrange', 'min_argc': 3, 'max_argc': 4}, | |
\ {'name': 'assert_match', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_notequal', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_notmatch', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_report', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'assert_true', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'atan', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'atan2', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'balloon_gettext', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'balloon_show', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'balloon_split', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'browse', 'min_argc': 4, 'max_argc': 4}, | |
\ {'name': 'browsedir', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'bufadd', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufexists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buffer_exists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buffer_name', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buffer_number', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buflisted', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufload', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufloaded', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufname', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufnr', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'bufwinid', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufwinnr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'byte2line', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'byteidx', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'byteidxcomp', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'call', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ceil', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_canread', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_close', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_close_in', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_evalexpr', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_evalraw', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_getbufnr', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'ch_getjob', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_info', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_log', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_logfile', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_open', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_read', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_readblob', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_readraw', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_sendexpr', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_sendraw', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_setoptions', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'ch_status', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'changenr', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'char2nr', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'chdir', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'cindent', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'clearmatches', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'col', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'complete', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'complete_add', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'complete_check', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'complete_info', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'confirm', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'copy', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'cos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'cosh', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'count', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'cscope_connection', 'min_argc': 0, 'max_argc': 3}, | |
\ {'name': 'cursor', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'debugbreak', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'deepcopy', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'delete', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'deletebufline', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'did_filetype', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'diff_filler', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'diff_hlID', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'empty', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'environ', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'escape', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'eval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'eventhandler', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'executable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'execute', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'exepath', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'exists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'exp', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'expand', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'expandcmd', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'extend', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'feedkeys', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'file_readable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'filereadable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'filewritable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'filter', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'finddir', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'findfile', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'float2nr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'floor', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'fmod', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'fnameescape', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'fnamemodify', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'foldclosed', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foldclosedend', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foldlevel', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foldtext', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'foldtextresult', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foreground', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'funcref', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'function', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'garbagecollect', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'get', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'get_lazy', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getbufinfo', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getbufline', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getbufvar', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getchangelist', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getchar', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getcharmod', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcharsearch', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdline', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdpos', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdtype', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdwintype', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcompletion', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getcurpos', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcwd', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'getenv', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getfontname', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getfperm', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getfsize', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getftime', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getftype', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getjumplist', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'getline', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'getloclist', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'getmatches', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getpid', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getpos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getqflist', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getreg', 'min_argc': 0, 'max_argc': 3}, | |
\ {'name': 'getregtype', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'gettabinfo', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'gettabvar', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'gettabwinvar', 'min_argc': 3, 'max_argc': 4}, | |
\ {'name': 'gettagstack', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getwininfo', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getwinpos', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getwinposx', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getwinposy', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getwinvar', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'glob', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'glob2regpat', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'globpath', 'min_argc': 2, 'max_argc': 5}, | |
\ {'name': 'has', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'has_key', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'haslocaldir', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'hasmapto', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'highlightID', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'highlight_exists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'histadd', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'histdel', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'histget', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'histnr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'hlID', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'hlexists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'hostname', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'iconv', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'indent', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'index', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'input', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'inputdialog', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'inputlist', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'inputrestore', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'inputsave', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'inputsecret', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'insert', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'invert', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'isdirectory', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'isinf', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'islocked', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'isnan', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'items', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'job_getchannel', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'job_info', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'job_setoptions', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'job_start', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'job_status', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'job_stop', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'join', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'js_decode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'js_encode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'json_decode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'json_encode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'keys', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'last_buffer_nr', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'len', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'libcall', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'libcallnr', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'line', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'line2byte', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'lispindent', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'list2str', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'listener_add', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'listener_flush', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'listener_remove', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'localtime', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'log', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'log10', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'luaeval', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'map', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'maparg', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'mapcheck', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'match', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'matchadd', 'min_argc': 2, 'max_argc': 5}, | |
\ {'name': 'matchaddpos', 'min_argc': 2, 'max_argc': 5}, | |
\ {'name': 'matcharg', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'matchdelete', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'matchend', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'matchlist', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'matchstr', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'matchstrpos', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'max', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'min', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'mkdir', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'mode', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'mzeval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'nextnonblank', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'nr2char', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'or', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'pathshorten', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'perleval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'popup_atcursor', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_beval', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_clear', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'popup_close', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'popup_create', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_dialog', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_filter_menu', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_filter_yesno', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_getoptions', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'popup_getpos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'popup_hide', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'popup_locate', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_menu', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_move', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_notification', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_setoptions', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_settext', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'popup_show', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'pow', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'prevnonblank', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'printf', 'min_argc': 1, 'max_argc': 19}, | |
\ {'name': 'prompt_setcallback', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'prompt_setinterrupt', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'prompt_setprompt', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'prop_add', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'prop_clear', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'prop_list', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'prop_remove', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'prop_type_add', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'prop_type_change', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'prop_type_delete', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'prop_type_get', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'prop_type_list', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'pumvisible', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'py3eval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'pyeval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'pyxeval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'range', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'readdir', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'readfile', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'reg_executing', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'reg_recording', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'reltime', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'reltimefloat', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'reltimestr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'remote_expr', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'remote_foreground', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'remote_peek', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'remote_read', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'remote_send', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'remote_startserver', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'remove', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'rename', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'repeat', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'resolve', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'reverse', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'round', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'rubyeval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'screenattr', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'screenchar', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'screenchars', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'screencol', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'screenpos', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'screenrow', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'screenstring', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'search', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'searchdecl', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'searchpair', 'min_argc': 3, 'max_argc': 7}, | |
\ {'name': 'searchpairpos', 'min_argc': 3, 'max_argc': 7}, | |
\ {'name': 'searchpos', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'server2client', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'serverlist', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'setbufline', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'setbufvar', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'setcharsearch', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'setcmdpos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'setenv', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'setfperm', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'setline', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'setloclist', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'setmatches', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'setpos', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'setqflist', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'setreg', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'settabvar', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'settabwinvar', 'min_argc': 4, 'max_argc': 4}, | |
\ {'name': 'settagstack', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'setwinvar', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'sha256', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'shellescape', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'shiftwidth', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'sign_define', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'sign_getdefined', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'sign_getplaced', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'sign_jump', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'sign_place', 'min_argc': 4, 'max_argc': 5}, | |
\ {'name': 'sign_placelist', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'sign_undefine', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'sign_unplace', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'sign_unplacelist', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'simplify', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'sin', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'sinh', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'sort', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'sound_clear', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'sound_playevent', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'sound_playfile', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'sound_stop', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'soundfold', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'spellbadword', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'spellsuggest', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'split', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'sqrt', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'str2float', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'str2list', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'str2nr', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'strcharpart', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'strchars', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'strdisplaywidth', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'strftime', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'strgetchar', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'stridx', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'string', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'strlen', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'strpart', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'strridx', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'strtrans', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'strwidth', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'submatch', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'substitute', 'min_argc': 4, 'max_argc': 4}, | |
\ {'name': 'swapinfo', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'swapname', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'synID', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'synIDattr', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'synIDtrans', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'synconcealed', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'synstack', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'system', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'systemlist', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'tabpagebuflist', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'tabpagenr', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'tabpagewinnr', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'tagfiles', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'taglist', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'tan', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'tanh', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'tempname', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'term_dumpdiff', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'term_dumpload', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'term_dumpwrite', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'term_getaltscreen', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_getansicolors', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_getattr', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'term_getcursor', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_getjob', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_getline', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'term_getscrolled', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_getsize', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_getstatus', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_gettitle', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'term_gettty', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'term_list', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'term_scrape', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'term_sendkeys', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'term_setansicolors', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'term_setkill', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'term_setrestore', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'term_setsize', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'term_start', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'term_wait', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'test_alloc_fail', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'test_autochdir', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_feedinput', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'test_garbagecollect_now', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_garbagecollect_soon', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_getvalue', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'test_ignore_error', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'test_null_blob', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_null_channel', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_null_dict', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_null_job', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_null_list', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_null_partial', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_null_string', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'test_option_not_set', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'test_override', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'test_refcount', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'test_scrollbar', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'test_setmouse', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'test_settime', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'timer_info', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'timer_pause', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'timer_start', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'timer_stop', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'timer_stopall', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'tolower', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'toupper', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'tr', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'trim', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'trunc', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'type', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'undofile', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'undotree', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'uniq', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'values', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'virtcol', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'visualmode', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'wildmenumode', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'win_execute', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'win_findbuf', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'win_getid', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'win_gotoid', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'win_id2tabwin', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'win_id2win', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'win_screenpos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'winbufnr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'wincol', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'winheight', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'winlayout', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'winline', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'winnr', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'winrestcmd', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'winrestview', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'winsaveview', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'winwidth', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'wordcount', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'writefile', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'xor', 'min_argc': 2, 'max_argc': 2}, | |
\] | |
1 0.000004 let s:ExprTokenizer = {} | |
1 0.000004 function! s:ExprTokenizer.new(...) abort | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
endfunction | |
1 0.000003 function! s:ExprTokenizer.__init__(reader) abort | |
let self.reader = a:reader | |
let self.cache = {} | |
endfunction | |
1 0.000003 function! s:ExprTokenizer.token(type, value, pos) abort | |
return {'type': a:type, 'value': a:value, 'pos': a:pos} | |
endfunction | |
1 0.000002 function! s:ExprTokenizer.peek() abort | |
let pos = self.reader.tell() | |
let r = self.get() | |
call self.reader.seek_set(pos) | |
return r | |
endfunction | |
1 0.000002 function! s:ExprTokenizer.get() abort | |
" FIXME: remove dirty hack | |
if has_key(self.cache, self.reader.tell()) | |
let x = self.cache[self.reader.tell()] | |
call self.reader.seek_set(x[0]) | |
return x[1] | |
endif | |
let pos = self.reader.tell() | |
call self.reader.skip_white() | |
let r = self.get2() | |
let self.cache[pos] = [self.reader.tell(), r] | |
return r | |
endfunction | |
1 0.000002 function! s:ExprTokenizer.get2() abort | |
let r = self.reader | |
let pos = r.getpos() | |
let c = r.peek() | |
if c ==# '<EOF>' | |
return self.token(s:TOKEN_EOF, c, pos) | |
elseif c ==# '<EOL>' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_EOL, c, pos) | |
elseif s:iswhite(c) | |
let s = r.read_white() | |
return self.token(s:TOKEN_SPACE, s, pos) | |
elseif c ==# '0' && (r.p(1) ==# 'X' || r.p(1) ==# 'x') && s:isxdigit(r.p(2)) | |
let s = r.getn(3) | |
let s .= r.read_xdigit() | |
return self.token(s:TOKEN_NUMBER, s, pos) | |
elseif c ==# '0' && (r.p(1) ==# 'B' || r.p(1) ==# 'b') && (r.p(2) ==# '0' || r.p(2) ==# '1') | |
let s = r.getn(3) | |
let s .= r.read_bdigit() | |
return self.token(s:TOKEN_NUMBER, s, pos) | |
elseif c ==# '0' && (r.p(1) ==# 'Z' || r.p(1) ==# 'z') && r.p(2) !=# '.' | |
let s = r.getn(2) | |
let s .= r.read_blob() | |
return self.token(s:TOKEN_BLOB, s, pos) | |
elseif s:isdigit(c) | |
let s = r.read_digit() | |
if r.p(0) ==# '.' && s:isdigit(r.p(1)) | |
let s .= r.getn(1) | |
let s .= r.read_digit() | |
if (r.p(0) ==# 'E' || r.p(0) ==# 'e') && (s:isdigit(r.p(1)) || ((r.p(1) ==# '-' || r.p(1) ==# '+') && s:isdigit(r.p(2)))) | |
let s .= r.getn(2) | |
let s .= r.read_digit() | |
endif | |
endif | |
return self.token(s:TOKEN_NUMBER, s, pos) | |
elseif c ==# 'i' && r.p(1) ==# 's' && !s:isidc(r.p(2)) | |
if r.p(2) ==# '?' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_ISCI, 'is?', pos) | |
elseif r.p(2) ==# '#' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_ISCS, 'is#', pos) | |
else | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_IS, 'is', pos) | |
endif | |
elseif c ==# 'i' && r.p(1) ==# 's' && r.p(2) ==# 'n' && r.p(3) ==# 'o' && r.p(4) ==# 't' && !s:isidc(r.p(5)) | |
if r.p(5) ==# '?' | |
call r.seek_cur(6) | |
return self.token(s:TOKEN_ISNOTCI, 'isnot?', pos) | |
elseif r.p(5) ==# '#' | |
call r.seek_cur(6) | |
return self.token(s:TOKEN_ISNOTCS, 'isnot#', pos) | |
else | |
call r.seek_cur(5) | |
return self.token(s:TOKEN_ISNOT, 'isnot', pos) | |
endif | |
elseif s:isnamec1(c) | |
let s = r.read_name() | |
return self.token(s:TOKEN_IDENTIFIER, s, pos) | |
elseif c ==# '|' && r.p(1) ==# '|' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_OROR, '||', pos) | |
elseif c ==# '&' && r.p(1) ==# '&' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_ANDAND, '&&', pos) | |
elseif c ==# '=' && r.p(1) ==# '=' | |
if r.p(2) ==# '?' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_EQEQCI, '==?', pos) | |
elseif r.p(2) ==# '#' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_EQEQCS, '==#', pos) | |
else | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_EQEQ, '==', pos) | |
endif | |
elseif c ==# '!' && r.p(1) ==# '=' | |
if r.p(2) ==# '?' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_NEQCI, '!=?', pos) | |
elseif r.p(2) ==# '#' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_NEQCS, '!=#', pos) | |
else | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_NEQ, '!=', pos) | |
endif | |
elseif c ==# '>' && r.p(1) ==# '=' | |
if r.p(2) ==# '?' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_GTEQCI, '>=?', pos) | |
elseif r.p(2) ==# '#' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_GTEQCS, '>=#', pos) | |
else | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_GTEQ, '>=', pos) | |
endif | |
elseif c ==# '<' && r.p(1) ==# '=' | |
if r.p(2) ==# '?' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_LTEQCI, '<=?', pos) | |
elseif r.p(2) ==# '#' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_LTEQCS, '<=#', pos) | |
else | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_LTEQ, '<=', pos) | |
endif | |
elseif c ==# '=' && r.p(1) ==# '~' | |
if r.p(2) ==# '?' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_MATCHCI, '=~?', pos) | |
elseif r.p(2) ==# '#' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_MATCHCS, '=~#', pos) | |
else | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_MATCH, '=~', pos) | |
endif | |
elseif c ==# '!' && r.p(1) ==# '~' | |
if r.p(2) ==# '?' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_NOMATCHCI, '!~?', pos) | |
elseif r.p(2) ==# '#' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_NOMATCHCS, '!~#', pos) | |
else | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_NOMATCH, '!~', pos) | |
endif | |
elseif c ==# '>' | |
if r.p(1) ==# '?' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_GTCI, '>?', pos) | |
elseif r.p(1) ==# '#' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_GTCS, '>#', pos) | |
else | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_GT, '>', pos) | |
endif | |
elseif c ==# '<' | |
if r.p(1) ==# '?' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_LTCI, '<?', pos) | |
elseif r.p(1) ==# '#' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_LTCS, '<#', pos) | |
else | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_LT, '<', pos) | |
endif | |
elseif c ==# '+' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_PLUS, '+', pos) | |
elseif c ==# '-' | |
if r.p(1) ==# '>' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_ARROW, '->', pos) | |
else | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_MINUS, '-', pos) | |
endif | |
elseif c ==# '.' | |
if r.p(1) ==# '.' && r.p(2) ==# '.' | |
call r.seek_cur(3) | |
return self.token(s:TOKEN_DOTDOTDOT, '...', pos) | |
elseif r.p(1) ==# '.' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_DOTDOT, '..', pos) " TODO check scriptversion? | |
else | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_DOT, '.', pos) " TODO check scriptversion? | |
endif | |
elseif c ==# '*' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_STAR, '*', pos) | |
elseif c ==# '/' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_SLASH, '/', pos) | |
elseif c ==# '%' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_PERCENT, '%', pos) | |
elseif c ==# '!' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_NOT, '!', pos) | |
elseif c ==# '?' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_QUESTION, '?', pos) | |
elseif c ==# ':' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_COLON, ':', pos) | |
elseif c ==# '#' | |
if r.p(1) ==# '{' | |
call r.seek_cur(2) | |
return self.token(s:TOKEN_LITCOPEN, '#{', pos) | |
else | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_SHARP, '#', pos) | |
endif | |
elseif c ==# '(' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_POPEN, '(', pos) | |
elseif c ==# ')' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_PCLOSE, ')', pos) | |
elseif c ==# '[' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_SQOPEN, '[', pos) | |
elseif c ==# ']' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_SQCLOSE, ']', pos) | |
elseif c ==# '{' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_COPEN, '{', pos) | |
elseif c ==# '}' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_CCLOSE, '}', pos) | |
elseif c ==# ',' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_COMMA, ',', pos) | |
elseif c ==# "'" | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_SQUOTE, "'", pos) | |
elseif c ==# '"' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_DQUOTE, '"', pos) | |
elseif c ==# '$' | |
let s = r.getn(1) | |
let s .= r.read_word() | |
return self.token(s:TOKEN_ENV, s, pos) | |
elseif c ==# '@' | |
" @<EOL> is treated as @" | |
return self.token(s:TOKEN_REG, r.getn(2), pos) | |
elseif c ==# '&' | |
let s = '' | |
if (r.p(1) ==# 'g' || r.p(1) ==# 'l') && r.p(2) ==# ':' | |
let s = r.getn(3) . r.read_word() | |
else | |
let s = r.getn(1) . r.read_word() | |
endif | |
return self.token(s:TOKEN_OPTION, s, pos) | |
elseif c ==# '=' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_EQ, '=', pos) | |
elseif c ==# '|' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_OR, '|', pos) | |
elseif c ==# ';' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_SEMICOLON, ';', pos) | |
elseif c ==# '`' | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_BACKTICK, '`', pos) | |
else | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
endif | |
endfunction | |
1 0.000003 function! s:ExprTokenizer.get_sstring() abort | |
call self.reader.skip_white() | |
let c = self.reader.p(0) | |
if c !=# "'" | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
endif | |
call self.reader.seek_cur(1) | |
let s = '' | |
while s:TRUE | |
let c = self.reader.p(0) | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('unexpected EOL', self.reader.getpos()) | |
elseif c ==# "'" | |
call self.reader.seek_cur(1) | |
if self.reader.p(0) ==# "'" | |
call self.reader.seek_cur(1) | |
let s .= "''" | |
else | |
break | |
endif | |
else | |
call self.reader.seek_cur(1) | |
let s .= c | |
endif | |
endwhile | |
return s | |
endfunction | |
1 0.000002 function! s:ExprTokenizer.get_dstring() abort | |
call self.reader.skip_white() | |
let c = self.reader.p(0) | |
if c !=# '"' | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
endif | |
call self.reader.seek_cur(1) | |
let s = '' | |
while s:TRUE | |
let c = self.reader.p(0) | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('unexpectd EOL', self.reader.getpos()) | |
elseif c ==# '"' | |
call self.reader.seek_cur(1) | |
break | |
elseif c ==# '\' | |
call self.reader.seek_cur(1) | |
let s .= c | |
let c = self.reader.p(0) | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('ExprTokenizer: unexpected EOL', self.reader.getpos()) | |
endif | |
call self.reader.seek_cur(1) | |
let s .= c | |
else | |
call self.reader.seek_cur(1) | |
let s .= c | |
endif | |
endwhile | |
return s | |
endfunction | |
1 0.000003 function! s:ExprTokenizer.get_dict_literal_key() abort | |
call self.reader.skip_white() | |
let r = self.reader | |
let c = r.peek() | |
if !s:isalnum(c) && c !=# '_' && c !=# '-' | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
endif | |
let s = c | |
call self.reader.seek_cur(1) | |
while s:TRUE | |
let c = self.reader.p(0) | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('unexpectd EOL', self.reader.getpos()) | |
endif | |
if !s:isalnum(c) && c !=# '_' && c !=# '-' | |
break | |
endif | |
call self.reader.seek_cur(1) | |
let s .= c | |
endwhile | |
return s | |
endfunction | |
1 0.000005 let s:ExprParser = {} | |
1 0.000001 function! s:ExprParser.new(...) abort | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
endfunction | |
1 0.000002 function! s:ExprParser.__init__(reader) abort | |
let self.reader = a:reader | |
let self.tokenizer = s:ExprTokenizer.new(a:reader) | |
endfunction | |
1 0.000002 function! s:ExprParser.parse() abort | |
return self.parse_expr1() | |
endfunction | |
" expr1: expr2 ? expr1 : expr1 | |
1 0.000001 function! s:ExprParser.parse_expr1() abort | |
let left = self.parse_expr2() | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_QUESTION | |
let node = s:Node(s:NODE_TERNARY) | |
let node.pos = token.pos | |
let node.cond = left | |
let node.left = self.parse_expr1() | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_COLON | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
let node.right = self.parse_expr1() | |
let left = node | |
else | |
call self.reader.seek_set(pos) | |
endif | |
return left | |
endfunction | |
" expr2: expr3 || expr3 .. | |
1 0.000002 function! s:ExprParser.parse_expr2() abort | |
let left = self.parse_expr3() | |
while s:TRUE | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_OROR | |
let node = s:Node(s:NODE_OR) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr3() | |
let left = node | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
return left | |
endfunction | |
" expr3: expr4 && expr4 | |
1 0.000002 function! s:ExprParser.parse_expr3() abort | |
let left = self.parse_expr4() | |
while s:TRUE | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_ANDAND | |
let node = s:Node(s:NODE_AND) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr4() | |
let left = node | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
return left | |
endfunction | |
" expr4: expr5 == expr5 | |
" expr5 != expr5 | |
" expr5 > expr5 | |
" expr5 >= expr5 | |
" expr5 < expr5 | |
" expr5 <= expr5 | |
" expr5 =~ expr5 | |
" expr5 !~ expr5 | |
" | |
" expr5 ==? expr5 | |
" expr5 ==# expr5 | |
" etc. | |
" | |
" expr5 is expr5 | |
" expr5 isnot expr5 | |
1 0.000002 function! s:ExprParser.parse_expr4() abort | |
let left = self.parse_expr5() | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_EQEQ | |
let node = s:Node(s:NODE_EQUAL) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_EQEQCI | |
let node = s:Node(s:NODE_EQUALCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_EQEQCS | |
let node = s:Node(s:NODE_EQUALCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_NEQ | |
let node = s:Node(s:NODE_NEQUAL) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_NEQCI | |
let node = s:Node(s:NODE_NEQUALCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_NEQCS | |
let node = s:Node(s:NODE_NEQUALCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_GT | |
let node = s:Node(s:NODE_GREATER) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_GTCI | |
let node = s:Node(s:NODE_GREATERCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_GTCS | |
let node = s:Node(s:NODE_GREATERCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_GTEQ | |
let node = s:Node(s:NODE_GEQUAL) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_GTEQCI | |
let node = s:Node(s:NODE_GEQUALCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_GTEQCS | |
let node = s:Node(s:NODE_GEQUALCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_LT | |
let node = s:Node(s:NODE_SMALLER) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_LTCI | |
let node = s:Node(s:NODE_SMALLERCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_LTCS | |
let node = s:Node(s:NODE_SMALLERCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_LTEQ | |
let node = s:Node(s:NODE_SEQUAL) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_LTEQCI | |
let node = s:Node(s:NODE_SEQUALCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_LTEQCS | |
let node = s:Node(s:NODE_SEQUALCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_MATCH | |
let node = s:Node(s:NODE_MATCH) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_MATCHCI | |
let node = s:Node(s:NODE_MATCHCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_MATCHCS | |
let node = s:Node(s:NODE_MATCHCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_NOMATCH | |
let node = s:Node(s:NODE_NOMATCH) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_NOMATCHCI | |
let node = s:Node(s:NODE_NOMATCHCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_NOMATCHCS | |
let node = s:Node(s:NODE_NOMATCHCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_IS | |
let node = s:Node(s:NODE_IS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_ISCI | |
let node = s:Node(s:NODE_ISCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_ISCS | |
let node = s:Node(s:NODE_ISCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_ISNOT | |
let node = s:Node(s:NODE_ISNOT) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_ISNOTCI | |
let node = s:Node(s:NODE_ISNOTCI) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
elseif token.type == s:TOKEN_ISNOTCS | |
let node = s:Node(s:NODE_ISNOTCS) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr5() | |
let left = node | |
else | |
call self.reader.seek_set(pos) | |
endif | |
return left | |
endfunction | |
" expr5: expr6 + expr6 .. | |
" expr6 - expr6 .. | |
" expr6 . expr6 .. | |
" expr6 .. expr6 .. | |
1 0.000002 function! s:ExprParser.parse_expr5() abort | |
let left = self.parse_expr6() | |
while s:TRUE | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_PLUS | |
let node = s:Node(s:NODE_ADD) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr6() | |
let left = node | |
elseif token.type == s:TOKEN_MINUS | |
let node = s:Node(s:NODE_SUBTRACT) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr6() | |
let left = node | |
elseif token.type == s:TOKEN_DOTDOT " TODO check scriptversion? | |
let node = s:Node(s:NODE_CONCAT) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr6() | |
let left = node | |
elseif token.type == s:TOKEN_DOT " TODO check scriptversion? | |
let node = s:Node(s:NODE_CONCAT) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr6() | |
let left = node | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
return left | |
endfunction | |
" expr6: expr7 * expr7 .. | |
" expr7 / expr7 .. | |
" expr7 % expr7 .. | |
1 0.000002 function! s:ExprParser.parse_expr6() abort | |
let left = self.parse_expr7() | |
while s:TRUE | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_STAR | |
let node = s:Node(s:NODE_MULTIPLY) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr7() | |
let left = node | |
elseif token.type == s:TOKEN_SLASH | |
let node = s:Node(s:NODE_DIVIDE) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr7() | |
let left = node | |
elseif token.type == s:TOKEN_PERCENT | |
let node = s:Node(s:NODE_REMAINDER) | |
let node.pos = token.pos | |
let node.left = left | |
let node.right = self.parse_expr7() | |
let left = node | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
return left | |
endfunction | |
" expr7: ! expr7 | |
" - expr7 | |
" + expr7 | |
1 0.000002 function! s:ExprParser.parse_expr7() abort | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_NOT | |
let node = s:Node(s:NODE_NOT) | |
let node.pos = token.pos | |
let node.left = self.parse_expr7() | |
return node | |
elseif token.type == s:TOKEN_MINUS | |
let node = s:Node(s:NODE_MINUS) | |
let node.pos = token.pos | |
let node.left = self.parse_expr7() | |
return node | |
elseif token.type == s:TOKEN_PLUS | |
let node = s:Node(s:NODE_PLUS) | |
let node.pos = token.pos | |
let node.left = self.parse_expr7() | |
return node | |
else | |
call self.reader.seek_set(pos) | |
let node = self.parse_expr8() | |
return node | |
endif | |
endfunction | |
" expr8: expr8[expr1] | |
" expr8[expr1 : expr1] | |
" expr8.name | |
" expr8(expr1, ...) | |
1 0.000002 function! s:ExprParser.parse_expr8() abort | |
let left = self.parse_expr9() | |
while s:TRUE | |
let pos = self.reader.tell() | |
let c = self.reader.peek() | |
let token = self.tokenizer.get() | |
if !s:iswhite(c) && token.type == s:TOKEN_SQOPEN | |
let npos = token.pos | |
if self.tokenizer.peek().type == s:TOKEN_COLON | |
call self.tokenizer.get() | |
let node = s:Node(s:NODE_SLICE) | |
let node.pos = npos | |
let node.left = left | |
let node.rlist = [s:NIL, s:NIL] | |
let token = self.tokenizer.peek() | |
if token.type !=# s:TOKEN_SQCLOSE | |
let node.rlist[1] = self.parse_expr1() | |
endif | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
let left = node | |
else | |
let right = self.parse_expr1() | |
if self.tokenizer.peek().type == s:TOKEN_COLON | |
call self.tokenizer.get() | |
let node = s:Node(s:NODE_SLICE) | |
let node.pos = npos | |
let node.left = left | |
let node.rlist = [right, s:NIL] | |
let token = self.tokenizer.peek() | |
if token.type !=# s:TOKEN_SQCLOSE | |
let node.rlist[1] = self.parse_expr1() | |
endif | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
let left = node | |
else | |
let node = s:Node(s:NODE_SUBSCRIPT) | |
let node.pos = npos | |
let node.left = left | |
let node.right = right | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
let left = node | |
endif | |
endif | |
unlet node | |
elseif token.type == s:TOKEN_POPEN | |
let node = s:Node(s:NODE_CALL) | |
let node.pos = token.pos | |
let node.left = left | |
let node.rlist = [] | |
if self.tokenizer.peek().type == s:TOKEN_PCLOSE | |
call self.tokenizer.get() | |
else | |
while s:TRUE | |
call add(node.rlist, self.parse_expr1()) | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_COMMA | |
" XXX: Vim allows foo(a, b, ). Lint should warn it. | |
if self.tokenizer.peek().type == s:TOKEN_PCLOSE | |
call self.tokenizer.get() | |
break | |
endif | |
elseif token.type == s:TOKEN_PCLOSE | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
endwhile | |
endif | |
if len(node.rlist) > s:MAX_FUNC_ARGS | |
" TODO: funcname E740: Too many arguments for function: %s | |
throw s:Err('E740: Too many arguments for function', node.pos) | |
endif | |
let left = node | |
unlet node | |
elseif !s:iswhite(c) && token.type == s:TOKEN_DOT " TODO check scriptversion? | |
let node = self.parse_dot(token, left) | |
if node is# s:NIL | |
call self.reader.seek_set(pos) | |
break | |
endif | |
let left = node | |
unlet node | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
return left | |
endfunction | |
" expr9: number | |
" "string" | |
" 'string' | |
" [expr1, ...] | |
" {expr1: expr1, ...} | |
" #{literal_key1: expr1, ...} | |
" {args -> expr1} | |
" &option | |
" (expr1) | |
" variable | |
" var{ria}ble | |
" $VAR | |
" @r | |
" function(expr1, ...) | |
" func{ti}on(expr1, ...) | |
1 0.000002 function! s:ExprParser.parse_expr9() abort | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
let node = s:Node(-1) | |
if token.type == s:TOKEN_NUMBER | |
let node = s:Node(s:NODE_NUMBER) | |
let node.pos = token.pos | |
let node.value = token.value | |
elseif token.type == s:TOKEN_BLOB | |
let node = s:Node(s:NODE_BLOB) | |
let node.pos = token.pos | |
let node.value = token.value | |
elseif token.type == s:TOKEN_DQUOTE | |
call self.reader.seek_set(pos) | |
let node = s:Node(s:NODE_STRING) | |
let node.pos = token.pos | |
let node.value = '"' . self.tokenizer.get_dstring() . '"' | |
elseif token.type == s:TOKEN_SQUOTE | |
call self.reader.seek_set(pos) | |
let node = s:Node(s:NODE_STRING) | |
let node.pos = token.pos | |
let node.value = "'" . self.tokenizer.get_sstring() . "'" | |
elseif token.type == s:TOKEN_SQOPEN | |
let node = s:Node(s:NODE_LIST) | |
let node.pos = token.pos | |
let node.value = [] | |
let token = self.tokenizer.peek() | |
if token.type == s:TOKEN_SQCLOSE | |
call self.tokenizer.get() | |
else | |
while s:TRUE | |
call add(node.value, self.parse_expr1()) | |
let token = self.tokenizer.peek() | |
if token.type == s:TOKEN_COMMA | |
call self.tokenizer.get() | |
if self.tokenizer.peek().type == s:TOKEN_SQCLOSE | |
call self.tokenizer.get() | |
break | |
endif | |
elseif token.type == s:TOKEN_SQCLOSE | |
call self.tokenizer.get() | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
endwhile | |
endif | |
elseif token.type == s:TOKEN_COPEN || token.type == s:TOKEN_LITCOPEN | |
let is_litdict = token.type == s:TOKEN_LITCOPEN | |
let savepos = self.reader.tell() | |
let nodepos = token.pos | |
let token = self.tokenizer.get() | |
let lambda = token.type == s:TOKEN_ARROW | |
if !lambda && !(token.type == s:TOKEN_SQUOTE || token.type == s:TOKEN_DQUOTE) | |
" if the token type is stirng, we cannot peek next token and we can | |
" assume it's not lambda. | |
let token2 = self.tokenizer.peek() | |
let lambda = token2.type == s:TOKEN_ARROW || token2.type == s:TOKEN_COMMA | |
endif | |
" fallback to dict or {expr} if true | |
let fallback = s:FALSE | |
if lambda | |
" lambda {token,...} {->...} {token->...} | |
let node = s:Node(s:NODE_LAMBDA) | |
let node.pos = nodepos | |
let node.rlist = [] | |
let named = {} | |
while s:TRUE | |
if token.type == s:TOKEN_ARROW | |
break | |
elseif token.type == s:TOKEN_IDENTIFIER | |
if !s:isargname(token.value) | |
throw s:Err(printf('E125: Illegal argument: %s', token.value), token.pos) | |
elseif has_key(named, token.value) | |
throw s:Err(printf('E853: Duplicate argument name: %s', token.value), token.pos) | |
endif | |
let named[token.value] = 1 | |
let varnode = s:Node(s:NODE_IDENTIFIER) | |
let varnode.pos = token.pos | |
let varnode.value = token.value | |
" XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475 | |
if s:iswhite(self.reader.p(0)) && self.tokenizer.peek().type == s:TOKEN_COMMA | |
throw s:Err('E475: Invalid argument: White space is not allowed before comma', self.reader.getpos()) | |
endif | |
let token = self.tokenizer.get() | |
call add(node.rlist, varnode) | |
if token.type == s:TOKEN_COMMA | |
" XXX: Vim allows last comma. {a, b, -> ...} => OK | |
let token = self.tokenizer.peek() | |
if token.type == s:TOKEN_ARROW | |
call self.tokenizer.get() | |
break | |
endif | |
elseif token.type == s:TOKEN_ARROW | |
break | |
else | |
throw s:Err(printf('unexpected token: %s, type: %d', token.value, token.type), token.pos) | |
endif | |
elseif token.type == s:TOKEN_DOTDOTDOT | |
let varnode = s:Node(s:NODE_IDENTIFIER) | |
let varnode.pos = token.pos | |
let varnode.value = token.value | |
call add(node.rlist, varnode) | |
let token = self.tokenizer.peek() | |
if token.type == s:TOKEN_ARROW | |
call self.tokenizer.get() | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
else | |
let fallback = s:TRUE | |
break | |
endif | |
let token = self.tokenizer.get() | |
endwhile | |
if !fallback | |
let node.left = self.parse_expr1() | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_CCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
return node | |
endif | |
endif | |
" dict | |
let node = s:Node(s:NODE_DICT) | |
let node.pos = nodepos | |
let node.value = [] | |
call self.reader.seek_set(savepos) | |
let token = self.tokenizer.peek() | |
if token.type == s:TOKEN_CCLOSE | |
call self.tokenizer.get() | |
return node | |
endif | |
while 1 | |
let key = is_litdict ? self.parse_dict_literal_key() : self.parse_expr1() | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_CCLOSE | |
if !empty(node.value) | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
break | |
endif | |
if token.type !=# s:TOKEN_COLON | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
let val = self.parse_expr1() | |
call add(node.value, [key, val]) | |
let token = self.tokenizer.get() | |
if token.type == s:TOKEN_COMMA | |
if self.tokenizer.peek().type == s:TOKEN_CCLOSE | |
call self.tokenizer.get() | |
break | |
endif | |
elseif token.type == s:TOKEN_CCLOSE | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
endwhile | |
return node | |
elseif token.type == s:TOKEN_POPEN | |
let node = self.parse_expr1() | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_PCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
elseif token.type == s:TOKEN_OPTION | |
let node = s:Node(s:NODE_OPTION) | |
let node.pos = token.pos | |
let node.value = token.value | |
elseif token.type == s:TOKEN_IDENTIFIER | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
elseif s:FALSE && (token.type == s:TOKEN_COLON || token.type == s:TOKEN_SHARP) | |
" XXX: no parse error but invalid expression | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
elseif token.type == s:TOKEN_LT && self.reader.peekn(4) ==? 'SID>' | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
elseif token.type == s:TOKEN_IS || token.type == s:TOKEN_ISCS || token.type == s:TOKEN_ISNOT || token.type == s:TOKEN_ISNOTCS | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
elseif token.type == s:TOKEN_ENV | |
let node = s:Node(s:NODE_ENV) | |
let node.pos = token.pos | |
let node.value = token.value | |
elseif token.type == s:TOKEN_REG | |
let node = s:Node(s:NODE_REG) | |
let node.pos = token.pos | |
let node.value = token.value | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
return node | |
endfunction | |
1 0.000002 function! s:ExprParser.parse_dict_literal_key() abort | |
let node = s:Node(s:NODE_STRING) | |
let node.pos = self.reader.tell() | |
let node.value = "'" . self.tokenizer.get_dict_literal_key() . "'" | |
return node | |
endfunction | |
" SUBSCRIPT or CONCAT | |
" dict "." [0-9A-Za-z_]+ => (subscript dict key) | |
" str "." expr6 => (concat str expr6) | |
1 0.000003 function! s:ExprParser.parse_dot(token, left) abort | |
if a:left.type !=# s:NODE_IDENTIFIER && a:left.type !=# s:NODE_CURLYNAME && a:left.type !=# s:NODE_DICT && a:left.type !=# s:NODE_SUBSCRIPT && a:left.type !=# s:NODE_CALL && a:left.type !=# s:NODE_DOT | |
return s:NIL | |
endif | |
if !s:iswordc(self.reader.p(0)) | |
return s:NIL | |
endif | |
let pos = self.reader.getpos() | |
let name = self.reader.read_word() | |
if s:isnamec(self.reader.p(0)) | |
" XXX: foo is str => ok, foo is obj => invalid expression | |
" foo.s:bar or foo.bar#baz | |
return s:NIL | |
endif | |
let node = s:Node(s:NODE_DOT) | |
let node.pos = a:token.pos | |
let node.left = a:left | |
let node.right = s:Node(s:NODE_IDENTIFIER) | |
let node.right.pos = pos | |
let node.right.value = name | |
return node | |
endfunction | |
" CONCAT | |
" str ".." expr6 => (concat str expr6) | |
1 0.000002 function! s:ExprParser.parse_concat(token, left) abort | |
if a:left.type !=# s:NODE_IDENTIFIER && a:left.type !=# s:NODE_CURLYNAME && a:left.type !=# s:NODE_DICT && a:left.type !=# s:NODE_SUBSCRIPT && a:left.type !=# s:NODE_CALL && a:left.type !=# s:NODE_DOT | |
return s:NIL | |
endif | |
if !s:iswordc(self.reader.p(0)) | |
return s:NIL | |
endif | |
let pos = self.reader.getpos() | |
let name = self.reader.read_word() | |
if s:isnamec(self.reader.p(0)) | |
" XXX: foo is str => ok, foo is obj => invalid expression | |
" foo.s:bar or foo.bar#baz | |
return s:NIL | |
endif | |
let node = s:Node(s:NODE_CONCAT) | |
let node.pos = a:token.pos | |
let node.left = a:left | |
let node.right = s:Node(s:NODE_IDENTIFIER) | |
let node.right.pos = pos | |
let node.right.value = name | |
return node | |
endfunction | |
1 0.000002 function! s:ExprParser.parse_identifier() abort | |
call self.reader.skip_white() | |
let npos = self.reader.getpos() | |
let curly_parts = self.parse_curly_parts() | |
if len(curly_parts) == 1 && curly_parts[0].type == s:NODE_CURLYNAMEPART | |
let node = s:Node(s:NODE_IDENTIFIER) | |
let node.pos = npos | |
let node.value = curly_parts[0].value | |
return node | |
else | |
let node = s:Node(s:NODE_CURLYNAME) | |
let node.pos = npos | |
let node.value = curly_parts | |
return node | |
endif | |
endfunction | |
1 0.000002 function! s:ExprParser.parse_curly_parts() abort | |
let curly_parts = [] | |
let c = self.reader.peek() | |
let pos = self.reader.getpos() | |
if c ==# '<' && self.reader.peekn(5) ==? '<SID>' | |
let name = self.reader.getn(5) | |
let node = s:Node(s:NODE_CURLYNAMEPART) | |
let node.curly = s:FALSE " Keep backword compatibility for the curly attribute | |
let node.pos = pos | |
let node.value = name | |
call add(curly_parts, node) | |
endif | |
while s:TRUE | |
let c = self.reader.peek() | |
if s:isnamec(c) | |
let pos = self.reader.getpos() | |
let name = self.reader.read_name() | |
let node = s:Node(s:NODE_CURLYNAMEPART) | |
let node.curly = s:FALSE " Keep backword compatibility for the curly attribute | |
let node.pos = pos | |
let node.value = name | |
call add(curly_parts, node) | |
elseif c ==# '{' | |
call self.reader.get() | |
let pos = self.reader.getpos() | |
let node = s:Node(s:NODE_CURLYNAMEEXPR) | |
let node.curly = s:TRUE " Keep backword compatibility for the curly attribute | |
let node.pos = pos | |
let node.value = self.parse_expr1() | |
call add(curly_parts, node) | |
call self.reader.skip_white() | |
let c = self.reader.p(0) | |
if c !=# '}' | |
throw s:Err(printf('unexpected token: %s', c), self.reader.getpos()) | |
endif | |
call self.reader.seek_cur(1) | |
else | |
break | |
endif | |
endwhile | |
return curly_parts | |
endfunction | |
1 0.000014 let s:LvalueParser = copy(s:ExprParser) | |
1 0.000002 function! s:LvalueParser.parse() abort | |
return self.parse_lv8() | |
endfunction | |
" expr8: expr8[expr1] | |
" expr8[expr1 : expr1] | |
" expr8.name | |
1 0.000002 function! s:LvalueParser.parse_lv8() abort | |
let left = self.parse_lv9() | |
while s:TRUE | |
let pos = self.reader.tell() | |
let c = self.reader.peek() | |
let token = self.tokenizer.get() | |
if !s:iswhite(c) && token.type == s:TOKEN_SQOPEN | |
let npos = token.pos | |
let node = s:Node(-1) | |
if self.tokenizer.peek().type == s:TOKEN_COLON | |
call self.tokenizer.get() | |
let node = s:Node(s:NODE_SLICE) | |
let node.pos = npos | |
let node.left = left | |
let node.rlist = [s:NIL, s:NIL] | |
let token = self.tokenizer.peek() | |
if token.type !=# s:TOKEN_SQCLOSE | |
let node.rlist[1] = self.parse_expr1() | |
endif | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
else | |
let right = self.parse_expr1() | |
if self.tokenizer.peek().type == s:TOKEN_COLON | |
call self.tokenizer.get() | |
let node = s:Node(s:NODE_SLICE) | |
let node.pos = npos | |
let node.left = left | |
let node.rlist = [right, s:NIL] | |
let token = self.tokenizer.peek() | |
if token.type !=# s:TOKEN_SQCLOSE | |
let node.rlist[1] = self.parse_expr1() | |
endif | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
else | |
let node = s:Node(s:NODE_SUBSCRIPT) | |
let node.pos = npos | |
let node.left = left | |
let node.right = right | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
endif | |
endif | |
let left = node | |
unlet node | |
elseif !s:iswhite(c) && token.type == s:TOKEN_DOT | |
let node = self.parse_dot(token, left) | |
if node is# s:NIL | |
call self.reader.seek_set(pos) | |
break | |
endif | |
let left = node | |
unlet node | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
return left | |
endfunction | |
" expr9: &option | |
" variable | |
" var{ria}ble | |
" $VAR | |
" @r | |
1 0.000002 function! s:LvalueParser.parse_lv9() abort | |
let pos = self.reader.tell() | |
let token = self.tokenizer.get() | |
let node = s:Node(-1) | |
if token.type == s:TOKEN_COPEN | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
elseif token.type == s:TOKEN_OPTION | |
let node = s:Node(s:NODE_OPTION) | |
let node.pos = token.pos | |
let node.value = token.value | |
elseif token.type == s:TOKEN_IDENTIFIER | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
elseif token.type == s:TOKEN_LT && self.reader.peekn(4) ==? 'SID>' | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
elseif token.type == s:TOKEN_ENV | |
let node = s:Node(s:NODE_ENV) | |
let node.pos = token.pos | |
let node.value = token.value | |
elseif token.type == s:TOKEN_REG | |
let node = s:Node(s:NODE_REG) | |
let node.pos = token.pos | |
let node.pos = token.pos | |
let node.value = token.value | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
return node | |
endfunction | |
1 0.000003 let s:StringReader = {} | |
1 0.000002 function! s:StringReader.new(...) abort | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
endfunction | |
1 0.000002 function! s:StringReader.__init__(lines) abort | |
let self.buf = [] | |
let self.pos = [] | |
let lnum = 0 | |
let offset = 0 | |
while lnum < len(a:lines) | |
let col = 0 | |
for c in split(a:lines[lnum], '\zs') | |
call add(self.buf, c) | |
call add(self.pos, [lnum + 1, col + 1, offset]) | |
let col += len(c) | |
let offset += len(c) | |
endfor | |
while lnum + 1 < len(a:lines) && a:lines[lnum + 1] =~# '^\s*\\' | |
let skip = s:TRUE | |
let col = 0 | |
for c in split(a:lines[lnum + 1], '\zs') | |
if skip | |
if c ==# '\' | |
let skip = s:FALSE | |
endif | |
else | |
call add(self.buf, c) | |
call add(self.pos, [lnum + 2, col + 1, offset]) | |
endif | |
let col += len(c) | |
let offset += len(c) | |
endfor | |
let lnum += 1 | |
let offset += 1 | |
endwhile | |
call add(self.buf, '<EOL>') | |
call add(self.pos, [lnum + 1, col + 1, offset]) | |
let lnum += 1 | |
let offset += 1 | |
endwhile | |
" for <EOF> | |
call add(self.pos, [lnum + 1, 0, offset]) | |
let self.i = 0 | |
endfunction | |
1 0.000002 function! s:StringReader.eof() abort | |
return self.i >= len(self.buf) | |
endfunction | |
1 0.000002 function! s:StringReader.tell() abort | |
return self.i | |
endfunction | |
1 0.000002 function! s:StringReader.seek_set(i) abort | |
let self.i = a:i | |
endfunction | |
1 0.000002 function! s:StringReader.seek_cur(i) abort | |
let self.i = self.i + a:i | |
endfunction | |
1 0.000002 function! s:StringReader.seek_end(i) abort | |
let self.i = len(self.buf) + a:i | |
endfunction | |
1 0.000002 function! s:StringReader.p(i) abort | |
if self.i >= len(self.buf) | |
return '<EOF>' | |
endif | |
return self.buf[self.i + a:i] | |
endfunction | |
1 0.000002 function! s:StringReader.peek() abort | |
if self.i >= len(self.buf) | |
return '<EOF>' | |
endif | |
return self.buf[self.i] | |
endfunction | |
1 0.000007 function! s:StringReader.get() abort | |
if self.i >= len(self.buf) | |
return '<EOF>' | |
endif | |
let self.i += 1 | |
return self.buf[self.i - 1] | |
endfunction | |
1 0.000002 function! s:StringReader.peekn(n) abort | |
let pos = self.tell() | |
let r = self.getn(a:n) | |
call self.seek_set(pos) | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.getn(n) abort | |
let r = '' | |
let j = 0 | |
while self.i < len(self.buf) && (a:n < 0 || j < a:n) | |
let c = self.buf[self.i] | |
if c ==# '<EOL>' | |
break | |
endif | |
let r .= c | |
let self.i += 1 | |
let j += 1 | |
endwhile | |
return r | |
endfunction | |
1 0.000001 function! s:StringReader.peekline() abort | |
return self.peekn(-1) | |
endfunction | |
1 0.000002 function! s:StringReader.readline() abort | |
let r = self.getn(-1) | |
call self.get() | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.getstr(begin, end) abort | |
let r = '' | |
for i in range(a:begin.i, a:end.i - 1) | |
if i >= len(self.buf) | |
break | |
endif | |
let c = self.buf[i] | |
if c ==# '<EOL>' | |
let c = "\n" | |
endif | |
let r .= c | |
endfor | |
return r | |
endfunction | |
1 0.000004 function! s:StringReader.getpos() abort | |
let [lnum, col, offset] = self.pos[self.i] | |
return {'i': self.i, 'lnum': lnum, 'col': col, 'offset': offset} | |
endfunction | |
1 0.000002 function! s:StringReader.setpos(pos) abort | |
let self.i = a:pos.i | |
endfunction | |
1 0.000008 function! s:StringReader.read_alpha() abort | |
let r = '' | |
while s:isalpha(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.read_alnum() abort | |
let r = '' | |
while s:isalnum(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000001 function! s:StringReader.read_digit() abort | |
let r = '' | |
while s:isdigit(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.read_odigit() abort | |
let r = '' | |
while s:isodigit(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000007 function! s:StringReader.read_blob() abort | |
let r = '' | |
while 1 | |
let s = self.peekn(2) | |
if s =~# '^[0-9A-Fa-f][0-9A-Fa-f]$' | |
let r .= self.getn(2) | |
elseif s =~# '^\.[0-9A-Fa-f]$' | |
let r .= self.getn(1) | |
elseif s =~# '^[0-9A-Fa-f][^0-9A-Fa-f]$' | |
throw s:Err('E973: Blob literal should have an even number of hex characters:' . s, self.getpos()) | |
else | |
break | |
endif | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.read_xdigit() abort | |
let r = '' | |
while s:isxdigit(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000001 function! s:StringReader.read_bdigit() abort | |
let r = '' | |
while self.peekn(1) ==# '0' || self.peekn(1) ==# '1' | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.read_integer() abort | |
let r = '' | |
let c = self.peekn(1) | |
if c ==# '-' || c ==# '+' | |
let r = self.getn(1) | |
endif | |
return r . self.read_digit() | |
endfunction | |
1 0.000002 function! s:StringReader.read_word() abort | |
let r = '' | |
while s:iswordc(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.read_white() abort | |
let r = '' | |
while s:iswhite(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000001 function! s:StringReader.read_nonwhite() abort | |
let r = '' | |
while !s:iswhite(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.read_name() abort | |
let r = '' | |
while s:isnamec(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
endfunction | |
1 0.000002 function! s:StringReader.skip_white() abort | |
while s:iswhite(self.peekn(1)) | |
call self.seek_cur(1) | |
endwhile | |
endfunction | |
1 0.000002 function! s:StringReader.skip_white_and_colon() abort | |
while s:TRUE | |
let c = self.peekn(1) | |
if !s:iswhite(c) && c !=# ':' | |
break | |
endif | |
call self.seek_cur(1) | |
endwhile | |
endfunction | |
1 0.000013 let s:Compiler = {} | |
1 0.000001 function! s:Compiler.new(...) abort | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
endfunction | |
1 0.000002 function! s:Compiler.__init__() abort | |
let self.indent = [''] | |
let self.lines = [] | |
endfunction | |
1 0.000002 function! s:Compiler.out(...) abort | |
if len(a:000) == 1 | |
if a:000[0][0] ==# ')' | |
let self.lines[-1] .= a:000[0] | |
else | |
call add(self.lines, self.indent[0] . a:000[0]) | |
endif | |
else | |
call add(self.lines, self.indent[0] . call('printf', a:000)) | |
endif | |
endfunction | |
1 0.000002 function! s:Compiler.incindent(s) abort | |
call insert(self.indent, self.indent[0] . a:s) | |
endfunction | |
1 0.000002 function! s:Compiler.decindent() abort | |
call remove(self.indent, 0) | |
endfunction | |
1 0.000002 function! s:Compiler.compile(node) abort | |
if a:node.type == s:NODE_TOPLEVEL | |
return self.compile_toplevel(a:node) | |
elseif a:node.type == s:NODE_COMMENT | |
call self.compile_comment(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_EXCMD | |
call self.compile_excmd(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_FUNCTION | |
call self.compile_function(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_DELFUNCTION | |
call self.compile_delfunction(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_RETURN | |
call self.compile_return(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_EXCALL | |
call self.compile_excall(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_LET | |
call self.compile_let(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_CONST | |
call self.compile_const(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_UNLET | |
call self.compile_unlet(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_LOCKVAR | |
call self.compile_lockvar(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_UNLOCKVAR | |
call self.compile_unlockvar(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_IF | |
call self.compile_if(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_WHILE | |
call self.compile_while(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_FOR | |
call self.compile_for(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_CONTINUE | |
call self.compile_continue(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_BREAK | |
call self.compile_break(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_TRY | |
call self.compile_try(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_THROW | |
call self.compile_throw(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_ECHO | |
call self.compile_echo(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_ECHON | |
call self.compile_echon(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_ECHOHL | |
call self.compile_echohl(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_ECHOMSG | |
call self.compile_echomsg(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_ECHOERR | |
call self.compile_echoerr(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_EXECUTE | |
call self.compile_execute(a:node) | |
return s:NIL | |
elseif a:node.type == s:NODE_TERNARY | |
return self.compile_ternary(a:node) | |
elseif a:node.type == s:NODE_OR | |
return self.compile_or(a:node) | |
elseif a:node.type == s:NODE_AND | |
return self.compile_and(a:node) | |
elseif a:node.type == s:NODE_EQUAL | |
return self.compile_equal(a:node) | |
elseif a:node.type == s:NODE_EQUALCI | |
return self.compile_equalci(a:node) | |
elseif a:node.type == s:NODE_EQUALCS | |
return self.compile_equalcs(a:node) | |
elseif a:node.type == s:NODE_NEQUAL | |
return self.compile_nequal(a:node) | |
elseif a:node.type == s:NODE_NEQUALCI | |
return self.compile_nequalci(a:node) | |
elseif a:node.type == s:NODE_NEQUALCS | |
return self.compile_nequalcs(a:node) | |
elseif a:node.type == s:NODE_GREATER | |
return self.compile_greater(a:node) | |
elseif a:node.type == s:NODE_GREATERCI | |
return self.compile_greaterci(a:node) | |
elseif a:node.type == s:NODE_GREATERCS | |
return self.compile_greatercs(a:node) | |
elseif a:node.type == s:NODE_GEQUAL | |
return self.compile_gequal(a:node) | |
elseif a:node.type == s:NODE_GEQUALCI | |
return self.compile_gequalci(a:node) | |
elseif a:node.type == s:NODE_GEQUALCS | |
return self.compile_gequalcs(a:node) | |
elseif a:node.type == s:NODE_SMALLER | |
return self.compile_smaller(a:node) | |
elseif a:node.type == s:NODE_SMALLERCI | |
return self.compile_smallerci(a:node) | |
elseif a:node.type == s:NODE_SMALLERCS | |
return self.compile_smallercs(a:node) | |
elseif a:node.type == s:NODE_SEQUAL | |
return self.compile_sequal(a:node) | |
elseif a:node.type == s:NODE_SEQUALCI | |
return self.compile_sequalci(a:node) | |
elseif a:node.type == s:NODE_SEQUALCS | |
return self.compile_sequalcs(a:node) | |
elseif a:node.type == s:NODE_MATCH | |
return self.compile_match(a:node) | |
elseif a:node.type == s:NODE_MATCHCI | |
return self.compile_matchci(a:node) | |
elseif a:node.type == s:NODE_MATCHCS | |
return self.compile_matchcs(a:node) | |
elseif a:node.type == s:NODE_NOMATCH | |
return self.compile_nomatch(a:node) | |
elseif a:node.type == s:NODE_NOMATCHCI | |
return self.compile_nomatchci(a:node) | |
elseif a:node.type == s:NODE_NOMATCHCS | |
return self.compile_nomatchcs(a:node) | |
elseif a:node.type == s:NODE_IS | |
return self.compile_is(a:node) | |
elseif a:node.type == s:NODE_ISCI | |
return self.compile_isci(a:node) | |
elseif a:node.type == s:NODE_ISCS | |
return self.compile_iscs(a:node) | |
elseif a:node.type == s:NODE_ISNOT | |
return self.compile_isnot(a:node) | |
elseif a:node.type == s:NODE_ISNOTCI | |
return self.compile_isnotci(a:node) | |
elseif a:node.type == s:NODE_ISNOTCS | |
return self.compile_isnotcs(a:node) | |
elseif a:node.type == s:NODE_ADD | |
return self.compile_add(a:node) | |
elseif a:node.type == s:NODE_SUBTRACT | |
return self.compile_subtract(a:node) | |
elseif a:node.type == s:NODE_CONCAT | |
return self.compile_concat(a:node) | |
elseif a:node.type == s:NODE_MULTIPLY | |
return self.compile_multiply(a:node) | |
elseif a:node.type == s:NODE_DIVIDE | |
return self.compile_divide(a:node) | |
elseif a:node.type == s:NODE_REMAINDER | |
return self.compile_remainder(a:node) | |
elseif a:node.type == s:NODE_NOT | |
return self.compile_not(a:node) | |
elseif a:node.type == s:NODE_PLUS | |
return self.compile_plus(a:node) | |
elseif a:node.type == s:NODE_MINUS | |
return self.compile_minus(a:node) | |
elseif a:node.type == s:NODE_SUBSCRIPT | |
return self.compile_subscript(a:node) | |
elseif a:node.type == s:NODE_SLICE | |
return self.compile_slice(a:node) | |
elseif a:node.type == s:NODE_DOT | |
return self.compile_dot(a:node) | |
elseif a:node.type == s:NODE_CALL | |
return self.compile_call(a:node) | |
elseif a:node.type == s:NODE_NUMBER | |
return self.compile_number(a:node) | |
elseif a:node.type == s:NODE_BLOB | |
return self.compile_blob(a:node) | |
elseif a:node.type == s:NODE_STRING | |
return self.compile_string(a:node) | |
elseif a:node.type == s:NODE_LIST | |
return self.compile_list(a:node) | |
elseif a:node.type == s:NODE_DICT | |
return self.compile_dict(a:node) | |
elseif a:node.type == s:NODE_OPTION | |
return self.compile_option(a:node) | |
elseif a:node.type == s:NODE_IDENTIFIER | |
return self.compile_identifier(a:node) | |
elseif a:node.type == s:NODE_CURLYNAME | |
return self.compile_curlyname(a:node) | |
elseif a:node.type == s:NODE_ENV | |
return self.compile_env(a:node) | |
elseif a:node.type == s:NODE_REG | |
return self.compile_reg(a:node) | |
elseif a:node.type == s:NODE_CURLYNAMEPART | |
return self.compile_curlynamepart(a:node) | |
elseif a:node.type == s:NODE_CURLYNAMEEXPR | |
return self.compile_curlynameexpr(a:node) | |
elseif a:node.type == s:NODE_LAMBDA | |
return self.compile_lambda(a:node) | |
else | |
throw printf('Compiler: unknown node: %s', string(a:node)) | |
endif | |
return s:NIL | |
endfunction | |
1 0.000002 function! s:Compiler.compile_body(body) abort | |
for node in a:body | |
call self.compile(node) | |
endfor | |
endfunction | |
1 0.000002 function! s:Compiler.compile_toplevel(node) abort | |
call self.compile_body(a:node.body) | |
return self.lines | |
endfunction | |
1 0.000003 function! s:Compiler.compile_comment(node) abort | |
call self.out(';%s', a:node.str) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_excmd(node) abort | |
call self.out('(excmd "%s")', escape(a:node.str, '\"')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_function(node) abort | |
let left = self.compile(a:node.left) | |
let rlist = map(a:node.rlist, 'self.compile(v:val)') | |
if !empty(rlist) && rlist[-1] ==# '...' | |
let rlist[-1] = '. ...' | |
endif | |
if empty(rlist) | |
call self.out('(function (%s)', left) | |
else | |
call self.out('(function (%s %s)', left, join(rlist, ' ')) | |
endif | |
call self.incindent(' ') | |
call self.compile_body(a:node.body) | |
call self.out(')') | |
call self.decindent() | |
endfunction | |
1 0.000002 function! s:Compiler.compile_delfunction(node) abort | |
call self.out('(delfunction %s)', self.compile(a:node.left)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_return(node) abort | |
if a:node.left is# s:NIL | |
call self.out('(return)') | |
else | |
call self.out('(return %s)', self.compile(a:node.left)) | |
endif | |
endfunction | |
1 0.000002 function! s:Compiler.compile_excall(node) abort | |
call self.out('(call %s)', self.compile(a:node.left)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_let(node) abort | |
let left = '' | |
if a:node.left isnot# s:NIL | |
let left = self.compile(a:node.left) | |
else | |
let left = join(map(a:node.list, 'self.compile(v:val)'), ' ') | |
if a:node.rest isnot# s:NIL | |
let left .= ' . ' . self.compile(a:node.rest) | |
endif | |
let left = '(' . left . ')' | |
endif | |
let right = self.compile(a:node.right) | |
call self.out('(let %s %s %s)', a:node.op, left, right) | |
endfunction | |
" TODO: merge with s:Compiler.compile_let() ? | |
1 0.000002 function! s:Compiler.compile_const(node) abort | |
let left = '' | |
if a:node.left isnot# s:NIL | |
let left = self.compile(a:node.left) | |
else | |
let left = join(map(a:node.list, 'self.compile(v:val)'), ' ') | |
if a:node.rest isnot# s:NIL | |
let left .= ' . ' . self.compile(a:node.rest) | |
endif | |
let left = '(' . left . ')' | |
endif | |
let right = self.compile(a:node.right) | |
call self.out('(const %s %s %s)', a:node.op, left, right) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_unlet(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
call self.out('(unlet %s)', join(list, ' ')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_lockvar(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
if a:node.depth is# s:NIL | |
call self.out('(lockvar %s)', join(list, ' ')) | |
else | |
call self.out('(lockvar %s %s)', a:node.depth, join(list, ' ')) | |
endif | |
endfunction | |
1 0.000002 function! s:Compiler.compile_unlockvar(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
if a:node.depth is# s:NIL | |
call self.out('(unlockvar %s)', join(list, ' ')) | |
else | |
call self.out('(unlockvar %s %s)', a:node.depth, join(list, ' ')) | |
endif | |
endfunction | |
1 0.000002 function! s:Compiler.compile_if(node) abort | |
call self.out('(if %s', self.compile(a:node.cond)) | |
call self.incindent(' ') | |
call self.compile_body(a:node.body) | |
call self.decindent() | |
for enode in a:node.elseif | |
call self.out(' elseif %s', self.compile(enode.cond)) | |
call self.incindent(' ') | |
call self.compile_body(enode.body) | |
call self.decindent() | |
endfor | |
if a:node.else isnot# s:NIL | |
call self.out(' else') | |
call self.incindent(' ') | |
call self.compile_body(a:node.else.body) | |
call self.decindent() | |
endif | |
call self.incindent(' ') | |
call self.out(')') | |
call self.decindent() | |
endfunction | |
1 0.000002 function! s:Compiler.compile_while(node) abort | |
call self.out('(while %s', self.compile(a:node.cond)) | |
call self.incindent(' ') | |
call self.compile_body(a:node.body) | |
call self.out(')') | |
call self.decindent() | |
endfunction | |
1 0.000002 function! s:Compiler.compile_for(node) abort | |
let left = '' | |
if a:node.left isnot# s:NIL | |
let left = self.compile(a:node.left) | |
else | |
let left = join(map(a:node.list, 'self.compile(v:val)'), ' ') | |
if a:node.rest isnot# s:NIL | |
let left .= ' . ' . self.compile(a:node.rest) | |
endif | |
let left = '(' . left . ')' | |
endif | |
let right = self.compile(a:node.right) | |
call self.out('(for %s %s', left, right) | |
call self.incindent(' ') | |
call self.compile_body(a:node.body) | |
call self.out(')') | |
call self.decindent() | |
endfunction | |
1 0.000002 function! s:Compiler.compile_continue(node) abort | |
call self.out('(continue)') | |
endfunction | |
1 0.000002 function! s:Compiler.compile_break(node) abort | |
call self.out('(break)') | |
endfunction | |
1 0.000002 function! s:Compiler.compile_try(node) abort | |
call self.out('(try') | |
call self.incindent(' ') | |
call self.compile_body(a:node.body) | |
for cnode in a:node.catch | |
if cnode.pattern isnot# s:NIL | |
call self.decindent() | |
call self.out(' catch /%s/', cnode.pattern) | |
call self.incindent(' ') | |
call self.compile_body(cnode.body) | |
else | |
call self.decindent() | |
call self.out(' catch') | |
call self.incindent(' ') | |
call self.compile_body(cnode.body) | |
endif | |
endfor | |
if a:node.finally isnot# s:NIL | |
call self.decindent() | |
call self.out(' finally') | |
call self.incindent(' ') | |
call self.compile_body(a:node.finally.body) | |
endif | |
call self.out(')') | |
call self.decindent() | |
endfunction | |
1 0.000008 function! s:Compiler.compile_throw(node) abort | |
call self.out('(throw %s)', self.compile(a:node.left)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_echo(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
call self.out('(echo %s)', join(list, ' ')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_echon(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
call self.out('(echon %s)', join(list, ' ')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_echohl(node) abort | |
call self.out('(echohl "%s")', escape(a:node.str, '\"')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_echomsg(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
call self.out('(echomsg %s)', join(list, ' ')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_echoerr(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
call self.out('(echoerr %s)', join(list, ' ')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_execute(node) abort | |
let list = map(a:node.list, 'self.compile(v:val)') | |
call self.out('(execute %s)', join(list, ' ')) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_ternary(node) abort | |
return printf('(?: %s %s %s)', self.compile(a:node.cond), self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_or(node) abort | |
return printf('(|| %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_and(node) abort | |
return printf('(&& %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_equal(node) abort | |
return printf('(== %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_equalci(node) abort | |
return printf('(==? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_equalcs(node) abort | |
return printf('(==# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000001 function! s:Compiler.compile_nequal(node) abort | |
return printf('(!= %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_nequalci(node) abort | |
return printf('(!=? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_nequalcs(node) abort | |
return printf('(!=# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_greater(node) abort | |
return printf('(> %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_greaterci(node) abort | |
return printf('(>? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_greatercs(node) abort | |
return printf('(># %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_gequal(node) abort | |
return printf('(>= %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_gequalci(node) abort | |
return printf('(>=? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_gequalcs(node) abort | |
return printf('(>=# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_smaller(node) abort | |
return printf('(< %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_smallerci(node) abort | |
return printf('(<? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000001 function! s:Compiler.compile_smallercs(node) abort | |
return printf('(<# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_sequal(node) abort | |
return printf('(<= %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000001 function! s:Compiler.compile_sequalci(node) abort | |
return printf('(<=? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_sequalcs(node) abort | |
return printf('(<=# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_match(node) abort | |
return printf('(=~ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000001 function! s:Compiler.compile_matchci(node) abort | |
return printf('(=~? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_matchcs(node) abort | |
return printf('(=~# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000004 function! s:Compiler.compile_nomatch(node) abort | |
return printf('(!~ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_nomatchci(node) abort | |
return printf('(!~? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_nomatchcs(node) abort | |
return printf('(!~# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_is(node) abort | |
return printf('(is %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_isci(node) abort | |
return printf('(is? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_iscs(node) abort | |
return printf('(is# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_isnot(node) abort | |
return printf('(isnot %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000001 function! s:Compiler.compile_isnotci(node) abort | |
return printf('(isnot? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_isnotcs(node) abort | |
return printf('(isnot# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_add(node) abort | |
return printf('(+ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_subtract(node) abort | |
return printf('(- %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_concat(node) abort | |
return printf('(concat %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_multiply(node) abort | |
return printf('(* %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000001 function! s:Compiler.compile_divide(node) abort | |
return printf('(/ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_remainder(node) abort | |
return printf('(%% %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000001 function! s:Compiler.compile_not(node) abort | |
return printf('(! %s)', self.compile(a:node.left)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_plus(node) abort | |
return printf('(+ %s)', self.compile(a:node.left)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_minus(node) abort | |
return printf('(- %s)', self.compile(a:node.left)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_subscript(node) abort | |
return printf('(subscript %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_slice(node) abort | |
let r0 = a:node.rlist[0] is# s:NIL ? 'nil' : self.compile(a:node.rlist[0]) | |
let r1 = a:node.rlist[1] is# s:NIL ? 'nil' : self.compile(a:node.rlist[1]) | |
return printf('(slice %s %s %s)', self.compile(a:node.left), r0, r1) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_dot(node) abort | |
return printf('(dot %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
endfunction | |
1 0.000002 function! s:Compiler.compile_call(node) abort | |
let rlist = map(a:node.rlist, 'self.compile(v:val)') | |
if empty(rlist) | |
return printf('(%s)', self.compile(a:node.left)) | |
else | |
return printf('(%s %s)', self.compile(a:node.left), join(rlist, ' ')) | |
endif | |
endfunction | |
1 0.000007 function! s:Compiler.compile_number(node) abort | |
return a:node.value | |
endfunction | |
1 0.000002 function! s:Compiler.compile_blob(node) abort | |
return a:node.value | |
endfunction | |
1 0.000002 function! s:Compiler.compile_string(node) abort | |
return a:node.value | |
endfunction | |
1 0.000001 function! s:Compiler.compile_list(node) abort | |
let value = map(a:node.value, 'self.compile(v:val)') | |
if empty(value) | |
return '(list)' | |
else | |
return printf('(list %s)', join(value, ' ')) | |
endif | |
endfunction | |
1 0.000001 function! s:Compiler.compile_dict(node) abort | |
let value = map(a:node.value, '"(" . self.compile(v:val[0]) . " " . self.compile(v:val[1]) . ")"') | |
if empty(value) | |
return '(dict)' | |
else | |
return printf('(dict %s)', join(value, ' ')) | |
endif | |
endfunction | |
1 0.000002 function! s:Compiler.compile_option(node) abort | |
return a:node.value | |
endfunction | |
1 0.000002 function! s:Compiler.compile_identifier(node) abort | |
return a:node.value | |
endfunction | |
1 0.000002 function! s:Compiler.compile_curlyname(node) abort | |
return join(map(a:node.value, 'self.compile(v:val)'), '') | |
endfunction | |
1 0.000002 function! s:Compiler.compile_env(node) abort | |
return a:node.value | |
endfunction | |
1 0.000001 function! s:Compiler.compile_reg(node) abort | |
return a:node.value | |
endfunction | |
1 0.000002 function! s:Compiler.compile_curlynamepart(node) abort | |
return a:node.value | |
endfunction | |
1 0.000002 function! s:Compiler.compile_curlynameexpr(node) abort | |
return '{' . self.compile(a:node.value) . '}' | |
endfunction | |
1 0.000002 function! s:Compiler.compile_lambda(node) abort | |
let rlist = map(a:node.rlist, 'self.compile(v:val)') | |
return printf('(lambda (%s) %s)', join(rlist, ' '), self.compile(a:node.left)) | |
endfunction | |
" TODO: under construction | |
1 0.000017 let s:RegexpParser = {} | |
1 0.000004 let s:RegexpParser.RE_VERY_NOMAGIC = 1 | |
1 0.000003 let s:RegexpParser.RE_NOMAGIC = 2 | |
1 0.000002 let s:RegexpParser.RE_MAGIC = 3 | |
1 0.000002 let s:RegexpParser.RE_VERY_MAGIC = 4 | |
1 0.000001 function! s:RegexpParser.new(...) abort | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
endfunction | |
1 0.000003 function! s:RegexpParser.__init__(reader, cmd, delim) abort | |
let self.reader = a:reader | |
let self.cmd = a:cmd | |
let self.delim = a:delim | |
let self.reg_magic = self.RE_MAGIC | |
endfunction | |
1 0.000002 function! s:RegexpParser.isend(c) abort | |
return a:c ==# '<EOF>' || a:c ==# '<EOL>' || a:c ==# self.delim | |
endfunction | |
1 0.000002 function! s:RegexpParser.parse_regexp() abort | |
let prevtoken = '' | |
let ntoken = '' | |
let ret = [] | |
if self.reader.peekn(4) ==# '\%#=' | |
let epos = self.reader.getpos() | |
let token = self.reader.getn(5) | |
if token !=# '\%#=0' && token !=# '\%#=1' && token !=# '\%#=2' | |
throw s:Err('E864: \%#= can only be followed by 0, 1, or 2', epos) | |
endif | |
call add(ret, token) | |
endif | |
while !self.isend(self.reader.peek()) | |
let prevtoken = ntoken | |
let [token, ntoken] = self.get_token() | |
if ntoken ==# '\m' | |
let self.reg_magic = self.RE_MAGIC | |
elseif ntoken ==# '\M' | |
let self.reg_magic = self.RE_NOMAGIC | |
elseif ntoken ==# '\v' | |
let self.reg_magic = self.RE_VERY_MAGIC | |
elseif ntoken ==# '\V' | |
let self.reg_magic = self.RE_VERY_NOMAGIC | |
elseif ntoken ==# '\*' | |
" '*' is not magic as the very first character. | |
if prevtoken ==# '' || prevtoken ==# '\^' || prevtoken ==# '\&' || prevtoken ==# '\|' || prevtoken ==# '\(' | |
let ntoken = '*' | |
endif | |
elseif ntoken ==# '\^' | |
" '^' is only magic as the very first character. | |
if self.reg_magic !=# self.RE_VERY_MAGIC && prevtoken !=# '' && prevtoken !=# '\&' && prevtoken !=# '\|' && prevtoken !=# '\n' && prevtoken !=# '\(' && prevtoken !=# '\%(' | |
let ntoken = '^' | |
endif | |
elseif ntoken ==# '\$' | |
" '$' is only magic as the very last character | |
let pos = self.reader.tell() | |
if self.reg_magic !=# self.RE_VERY_MAGIC | |
while !self.isend(self.reader.peek()) | |
let [t, n] = self.get_token() | |
" XXX: Vim doesn't check \v and \V? | |
if n ==# '\c' || n ==# '\C' || n ==# '\m' || n ==# '\M' || n ==# '\Z' | |
continue | |
endif | |
if n !=# '\|' && n !=# '\&' && n !=# '\n' && n !=# '\)' | |
let ntoken = '$' | |
endif | |
break | |
endwhile | |
endif | |
call self.reader.seek_set(pos) | |
elseif ntoken ==# '\?' | |
" '?' is literal in '?' command. | |
if self.cmd ==# '?' | |
let ntoken = '?' | |
endif | |
endif | |
call add(ret, ntoken) | |
endwhile | |
return ret | |
endfunction | |
" @return [actual_token, normalized_token] | |
1 0.000002 function! s:RegexpParser.get_token() abort | |
if self.reg_magic == self.RE_VERY_MAGIC | |
return self.get_token_very_magic() | |
elseif self.reg_magic == self.RE_MAGIC | |
return self.get_token_magic() | |
elseif self.reg_magic == self.RE_NOMAGIC | |
return self.get_token_nomagic() | |
elseif self.reg_magic == self.RE_VERY_NOMAGIC | |
return self.get_token_very_nomagic() | |
endif | |
endfunction | |
1 0.000003 function! s:RegexpParser.get_token_very_magic() abort | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
return self.get_token_backslash_common() | |
elseif c ==# '*' | |
return ['*', '\*'] | |
elseif c ==# '+' | |
return ['+', '\+'] | |
elseif c ==# '=' | |
return ['=', '\='] | |
elseif c ==# '?' | |
return ['?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('{') | |
elseif c ==# '@' | |
return self.get_token_at('@') | |
elseif c ==# '^' | |
return ['^', '\^'] | |
elseif c ==# '$' | |
return ['$', '\$'] | |
elseif c ==# '.' | |
return ['.', '\.'] | |
elseif c ==# '<' | |
return ['<', '\<'] | |
elseif c ==# '>' | |
return ['>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('%') | |
elseif c ==# '[' | |
return self.get_token_sq('[') | |
elseif c ==# '~' | |
return ['~', '\~'] | |
elseif c ==# '|' | |
return ['|', '\|'] | |
elseif c ==# '&' | |
return ['&', '\&'] | |
elseif c ==# '(' | |
return ['(', '\('] | |
elseif c ==# ')' | |
return [')', '\)'] | |
endif | |
return [c, c] | |
endfunction | |
1 0.000002 function! s:RegexpParser.get_token_magic() abort | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# '+' | |
return ['\+', '\+'] | |
elseif c ==# '=' | |
return ['\=', '\='] | |
elseif c ==# '?' | |
return ['\?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('\{') | |
elseif c ==# '@' | |
return self.get_token_at('\@') | |
elseif c ==# '<' | |
return ['\<', '\<'] | |
elseif c ==# '>' | |
return ['\>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('\%') | |
elseif c ==# '|' | |
return ['\|', '\|'] | |
elseif c ==# '&' | |
return ['\&', '\&'] | |
elseif c ==# '(' | |
return ['\(', '\('] | |
elseif c ==# ')' | |
return ['\)', '\)'] | |
endif | |
call self.reader.seek_set(pos) | |
return self.get_token_backslash_common() | |
elseif c ==# '*' | |
return ['*', '\*'] | |
elseif c ==# '^' | |
return ['^', '\^'] | |
elseif c ==# '$' | |
return ['$', '\$'] | |
elseif c ==# '.' | |
return ['.', '\.'] | |
elseif c ==# '[' | |
return self.get_token_sq('[') | |
elseif c ==# '~' | |
return ['~', '\~'] | |
endif | |
return [c, c] | |
endfunction | |
1 0.000002 function! s:RegexpParser.get_token_nomagic() abort | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# '*' | |
return ['\*', '\*'] | |
elseif c ==# '+' | |
return ['\+', '\+'] | |
elseif c ==# '=' | |
return ['\=', '\='] | |
elseif c ==# '?' | |
return ['\?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('\{') | |
elseif c ==# '@' | |
return self.get_token_at('\@') | |
elseif c ==# '.' | |
return ['\.', '\.'] | |
elseif c ==# '<' | |
return ['\<', '\<'] | |
elseif c ==# '>' | |
return ['\>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('\%') | |
elseif c ==# '~' | |
return ['\~', '\^'] | |
elseif c ==# '[' | |
return self.get_token_sq('\[') | |
elseif c ==# '|' | |
return ['\|', '\|'] | |
elseif c ==# '&' | |
return ['\&', '\&'] | |
elseif c ==# '(' | |
return ['\(', '\('] | |
elseif c ==# ')' | |
return ['\)', '\)'] | |
endif | |
call self.reader.seek_set(pos) | |
return self.get_token_backslash_common() | |
elseif c ==# '^' | |
return ['^', '\^'] | |
elseif c ==# '$' | |
return ['$', '\$'] | |
endif | |
return [c, c] | |
endfunction | |
1 0.000002 function! s:RegexpParser.get_token_very_nomagic() abort | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# '*' | |
return ['\*', '\*'] | |
elseif c ==# '+' | |
return ['\+', '\+'] | |
elseif c ==# '=' | |
return ['\=', '\='] | |
elseif c ==# '?' | |
return ['\?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('\{') | |
elseif c ==# '@' | |
return self.get_token_at('\@') | |
elseif c ==# '^' | |
return ['\^', '\^'] | |
elseif c ==# '$' | |
return ['\$', '\$'] | |
elseif c ==# '<' | |
return ['\<', '\<'] | |
elseif c ==# '>' | |
return ['\>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('\%') | |
elseif c ==# '~' | |
return ['\~', '\~'] | |
elseif c ==# '[' | |
return self.get_token_sq('\[') | |
elseif c ==# '|' | |
return ['\|', '\|'] | |
elseif c ==# '&' | |
return ['\&', '\&'] | |
elseif c ==# '(' | |
return ['\(', '\('] | |
elseif c ==# ')' | |
return ['\)', '\)'] | |
endif | |
call self.reader.seek_set(pos) | |
return self.get_token_backslash_common() | |
endif | |
return [c, c] | |
endfunction | |
1 0.000002 function! s:RegexpParser.get_token_backslash_common() abort | |
let cclass = 'iIkKfFpPsSdDxXoOwWhHaAlLuU' | |
let c = self.reader.get() | |
if c ==# '\' | |
return ['\\', '\\'] | |
elseif stridx(cclass, c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif c ==# '_' | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if stridx(cclass, c) !=# -1 | |
return ['\_' . c, '\_ . c'] | |
elseif c ==# '^' | |
return ['\_^', '\_^'] | |
elseif c ==# '$' | |
return ['\_$', '\_$'] | |
elseif c ==# '.' | |
return ['\_.', '\_.'] | |
elseif c ==# '[' | |
return self.get_token_sq('\_[') | |
endif | |
throw s:Err('E63: invalid use of \_', epos) | |
elseif stridx('etrb', c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif stridx('123456789', c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif c ==# 'z' | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if stridx('123456789', c) !=# -1 | |
return ['\z' . c, '\z' . c] | |
elseif c ==# 's' | |
return ['\zs', '\zs'] | |
elseif c ==# 'e' | |
return ['\ze', '\ze'] | |
elseif c ==# '(' | |
return ['\z(', '\z('] | |
endif | |
throw s:Err('E68: Invalid character after \z', epos) | |
elseif stridx('cCmMvVZ', c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif c ==# '%' | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if c ==# 'd' | |
let r = self.getdecchrs() | |
if r !=# '' | |
return ['\%d' . r, '\%d' . r] | |
endif | |
elseif c ==# 'o' | |
let r = self.getoctchrs() | |
if r !=# '' | |
return ['\%o' . r, '\%o' . r] | |
endif | |
elseif c ==# 'x' | |
let r = self.gethexchrs(2) | |
if r !=# '' | |
return ['\%x' . r, '\%x' . r] | |
endif | |
elseif c ==# 'u' | |
let r = self.gethexchrs(4) | |
if r !=# '' | |
return ['\%u' . r, '\%u' . r] | |
endif | |
elseif c ==# 'U' | |
let r = self.gethexchrs(8) | |
if r !=# '' | |
return ['\%U' . r, '\%U' . r] | |
endif | |
endif | |
throw s:Err('E678: Invalid character after \%[dxouU]', epos) | |
endif | |
return ['\' . c, c] | |
endfunction | |
" \{} | |
1 0.000002 function! s:RegexpParser.get_token_brace(pre) abort | |
let r = '' | |
let minus = '' | |
let comma = '' | |
let n = '' | |
let m = '' | |
if self.reader.p(0) ==# '-' | |
let minus = self.reader.get() | |
let r .= minus | |
endif | |
if s:isdigit(self.reader.p(0)) | |
let n = self.reader.read_digit() | |
let r .= n | |
endif | |
if self.reader.p(0) ==# ',' | |
let comma = self.rader.get() | |
let r .= comma | |
endif | |
if s:isdigit(self.reader.p(0)) | |
let m = self.reader.read_digit() | |
let r .= m | |
endif | |
if self.reader.p(0) ==# '\' | |
let r .= self.reader.get() | |
endif | |
if self.reader.p(0) !=# '}' | |
throw s:Err('E554: Syntax error in \{...}', self.reader.getpos()) | |
endif | |
call self.reader.get() | |
return [a:pre . r, '\{' . minus . n . comma . m . '}'] | |
endfunction | |
" \[] | |
1 0.000003 function! s:RegexpParser.get_token_sq(pre) abort | |
let start = self.reader.tell() | |
let r = '' | |
" Complement of range | |
if self.reader.p(0) ==# '^' | |
let r .= self.reader.get() | |
endif | |
" At the start ']' and '-' mean the literal character. | |
if self.reader.p(0) ==# ']' || self.reader.p(0) ==# '-' | |
let r .= self.reader.get() | |
endif | |
while s:TRUE | |
let startc = 0 | |
let c = self.reader.p(0) | |
if self.isend(c) | |
" If there is no matching ']', we assume the '[' is a normal character. | |
call self.reader.seek_set(start) | |
return [a:pre, '['] | |
elseif c ==# ']' | |
call self.reader.seek_cur(1) | |
return [a:pre . r . ']', '\[' . r . ']'] | |
elseif c ==# '[' | |
let e = self.get_token_sq_char_class() | |
if e ==# '' | |
let e = self.get_token_sq_equi_class() | |
if e ==# '' | |
let e = self.get_token_sq_coll_element() | |
if e ==# '' | |
let [e, startc] = self.get_token_sq_c() | |
endif | |
endif | |
endif | |
let r .= e | |
else | |
let [e, startc] = self.get_token_sq_c() | |
let r .= e | |
endif | |
if startc !=# 0 && self.reader.p(0) ==# '-' && !self.isend(self.reader.p(1)) && !(self.reader.p(1) ==# '\' && self.reader.p(2) ==# 'n') | |
call self.reader.seek_cur(1) | |
let r .= '-' | |
let c = self.reader.p(0) | |
if c ==# '[' | |
let e = self.get_token_sq_coll_element() | |
if e !=# '' | |
let endc = char2nr(e[2]) | |
else | |
let [e, endc] = self.get_token_sq_c() | |
endif | |
let r .= e | |
else | |
let [e, endc] = self.get_token_sq_c() | |
let r .= e | |
endif | |
if startc > endc || endc > startc + 256 | |
throw s:Err('E16: Invalid range', self.reader.getpos()) | |
endif | |
endif | |
endwhile | |
endfunction | |
" [c] | |
1 0.000002 function! s:RegexpParser.get_token_sq_c() abort | |
let c = self.reader.p(0) | |
if c ==# '\' | |
call self.reader.seek_cur(1) | |
let c = self.reader.p(0) | |
if c ==# 'n' | |
call self.reader.seek_cur(1) | |
return ['\n', 0] | |
elseif c ==# 'r' | |
call self.reader.seek_cur(1) | |
return ['\r', 13] | |
elseif c ==# 't' | |
call self.reader.seek_cur(1) | |
return ['\t', 9] | |
elseif c ==# 'e' | |
call self.reader.seek_cur(1) | |
return ['\e', 27] | |
elseif c ==# 'b' | |
call self.reader.seek_cur(1) | |
return ['\b', 8] | |
elseif stridx(']^-\', c) !=# -1 | |
call self.reader.seek_cur(1) | |
return ['\' . c, char2nr(c)] | |
elseif stridx('doxuU', c) !=# -1 | |
let [c, n] = self.get_token_sq_coll_char() | |
return [c, n] | |
else | |
return ['\', char2nr('\')] | |
endif | |
elseif c ==# '-' | |
call self.reader.seek_cur(1) | |
return ['-', char2nr('-')] | |
else | |
call self.reader.seek_cur(1) | |
return [c, char2nr(c)] | |
endif | |
endfunction | |
" [\d123] | |
1 0.000002 function! s:RegexpParser.get_token_sq_coll_char() abort | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# 'd' | |
let r = self.getdecchrs() | |
let n = str2nr(r, 10) | |
elseif c ==# 'o' | |
let r = self.getoctchrs() | |
let n = str2nr(r, 8) | |
elseif c ==# 'x' | |
let r = self.gethexchrs(2) | |
let n = str2nr(r, 16) | |
elseif c ==# 'u' | |
let r = self.gethexchrs(4) | |
let n = str2nr(r, 16) | |
elseif c ==# 'U' | |
let r = self.gethexchrs(8) | |
let n = str2nr(r, 16) | |
else | |
let r = '' | |
endif | |
if r ==# '' | |
call self.reader.seek_set(pos) | |
return '\' | |
endif | |
return ['\' . c . r, n] | |
endfunction | |
" [[.a.]] | |
1 0.000003 function! s:RegexpParser.get_token_sq_coll_element() abort | |
if self.reader.p(0) ==# '[' && self.reader.p(1) ==# '.' && !self.isend(self.reader.p(2)) && self.reader.p(3) ==# '.' && self.reader.p(4) ==# ']' | |
return self.reader.getn(5) | |
endif | |
return '' | |
endfunction | |
" [[=a=]] | |
1 0.000002 function! s:RegexpParser.get_token_sq_equi_class() abort | |
if self.reader.p(0) ==# '[' && self.reader.p(1) ==# '=' && !self.isend(self.reader.p(2)) && self.reader.p(3) ==# '=' && self.reader.p(4) ==# ']' | |
return self.reader.getn(5) | |
endif | |
return '' | |
endfunction | |
" [[:alpha:]] | |
1 0.000002 function! s:RegexpParser.get_token_sq_char_class() abort | |
let class_names = ['alnum', 'alpha', 'blank', 'cntrl', 'digit', 'graph', 'lower', 'print', 'punct', 'space', 'upper', 'xdigit', 'tab', 'return', 'backspace', 'escape'] | |
let pos = self.reader.tell() | |
if self.reader.p(0) ==# '[' && self.reader.p(1) ==# ':' | |
call self.reader.seek_cur(2) | |
let r = self.reader.read_alpha() | |
if self.reader.p(0) ==# ':' && self.reader.p(1) ==# ']' | |
call self.reader.seek_cur(2) | |
for name in class_names | |
if r ==# name | |
return '[:' . name . ':]' | |
endif | |
endfor | |
endif | |
endif | |
call self.reader.seek_set(pos) | |
return '' | |
endfunction | |
" \@... | |
1 0.000002 function! s:RegexpParser.get_token_at(pre) abort | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if c ==# '>' | |
return [a:pre . '>', '\@>'] | |
elseif c ==# '=' | |
return [a:pre . '=', '\@='] | |
elseif c ==# '!' | |
return [a:pre . '!', '\@!'] | |
elseif c ==# '<' | |
let c = self.reader.get() | |
if c ==# '=' | |
return [a:pre . '<=', '\@<='] | |
elseif c ==# '!' | |
return [a:pre . '<!', '\@<!'] | |
endif | |
endif | |
throw s:Err('E64: @ follows nothing', epos) | |
endfunction | |
" \%... | |
1 0.000002 function! s:RegexpParser.get_token_percent(pre) abort | |
let c = self.reader.get() | |
if c ==# '^' | |
return [a:pre . '^', '\%^'] | |
elseif c ==# '$' | |
return [a:pre . '$', '\%$'] | |
elseif c ==# 'V' | |
return [a:pre . 'V', '\%V'] | |
elseif c ==# '#' | |
return [a:pre . '#', '\%#'] | |
elseif c ==# '[' | |
return self.get_token_percent_sq(a:pre . '[') | |
elseif c ==# '(' | |
return [a:pre . '(', '\%('] | |
else | |
return self.get_token_mlcv(a:pre) | |
endif | |
endfunction | |
" \%[] | |
1 0.000002 function! s:RegexpParser.get_token_percent_sq(pre) abort | |
let r = '' | |
while s:TRUE | |
let c = self.reader.peek() | |
if self.isend(c) | |
throw s:Err('E69: Missing ] after \%[', self.reader.getpos()) | |
elseif c ==# ']' | |
if r ==# '' | |
throw s:Err('E70: Empty \%[', self.reader.getpos()) | |
endif | |
call self.reader.seek_cur(1) | |
break | |
endif | |
call self.reader.seek_cur(1) | |
let r .= c | |
endwhile | |
return [a:pre . r . ']', '\%[' . r . ']'] | |
endfunction | |
" \%'m \%l \%c \%v | |
1 0.000002 function! s:RegexpParser.get_token_mlvc(pre) abort | |
let r = '' | |
let cmp = '' | |
if self.reader.p(0) ==# '<' || self.reader.p(0) ==# '>' | |
let cmp = self.reader.get() | |
let r .= cmp | |
endif | |
if self.reader.p(0) ==# "'" | |
let r .= self.reader.get() | |
let c = self.reader.p(0) | |
if self.isend(c) | |
" FIXME: Should be error? Vim allow this. | |
let c = '' | |
else | |
let c = self.reader.get() | |
endif | |
return [a:pre . r . c, '\%' . cmp . "'" . c] | |
elseif s:isdigit(self.reader.p(0)) | |
let d = self.reader.read_digit() | |
let r .= d | |
let c = self.reader.p(0) | |
if c ==# 'l' | |
call self.reader.get() | |
return [a:pre . r . 'l', '\%' . cmp . d . 'l'] | |
elseif c ==# 'c' | |
call self.reader.get() | |
return [a:pre . r . 'c', '\%' . cmp . d . 'c'] | |
elseif c ==# 'v' | |
call self.reader.get() | |
return [a:pre . r . 'v', '\%' . cmp . d . 'v'] | |
endif | |
endif | |
throw s:Err('E71: Invalid character after %', self.reader.getpos()) | |
endfunction | |
1 0.000002 function! s:RegexpParser.getdecchrs() abort | |
return self.reader.read_digit() | |
endfunction | |
1 0.000002 function! s:RegexpParser.getoctchrs() abort | |
return self.reader.read_odigit() | |
endfunction | |
1 0.000002 function! s:RegexpParser.gethexchrs(n) abort | |
let r = '' | |
for i in range(a:n) | |
let c = self.reader.peek() | |
if !s:isxdigit(c) | |
break | |
endif | |
let r .= self.reader.get() | |
endfor | |
return r | |
endfunction | |
FUNCTION 196_compile_equalcs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5189 | |
Called 1 time | |
Total time: 0.000558 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000558 0.000009 return printf('(==# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 50_parse_cmd_perl() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1286 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_lua() | |
FUNCTION 199_compile_nequalcs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5201 | |
Called 1 time | |
Total time: 0.000565 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000565 0.000008 return printf('(!=# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 215_compile_nomatch() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5265 | |
Called 1 time | |
Total time: 0.000549 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000549 0.000007 return printf('(!~ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 17___init__() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 428 | |
Called 50 times | |
Total time: 0.000882 | |
Self time: 0.000882 | |
count total (s) self (s) | |
50 0.000176 if len(a:000) > 0 | |
50 0.000215 let self.neovim = a:000[0] | |
else | |
let self.neovim = 0 | |
50 0.000050 endif | |
50 0.000202 let self.find_command_cache = {} | |
FUNCTION vimlparser#test() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 14 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
try | |
if a:0 > 0 | |
let l:neovim = a:1 | |
else | |
let l:neovim = 0 | |
endif | |
let i = type(a:input) == 1 && filereadable(a:input) ? readfile(a:input) : split(a:input, "\n") | |
let r = s:StringReader.new(i) | |
let p = s:VimLParser.new(l:neovim) | |
let c = s:Compiler.new() | |
echo join(c.compile(p.parse(r)), "\n") | |
catch | |
echoerr substitute(v:throwpoint, '\.\.\zs\d\+', '\=s:numtoname(submatch(0))', 'g') . "\n" . v:exception | |
endtry | |
FUNCTION 193_compile_and() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5177 | |
Called 1 time | |
Total time: 0.000557 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000557 0.000008 return printf('(&& %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 37_parse_argcmd() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1033 | |
Called 1 time | |
Total time: 0.000067 | |
Self time: 0.000015 | |
count total (s) self (s) | |
1 0.000057 0.000005 if self.reader.peekn(1) ==# '+' | |
call self.reader.getn(1) | |
if self.reader.peekn(1) ==# ' ' | |
let self.ea.do_ecmd_cmd = '$' | |
else | |
let self.ea.do_ecmd_cmd = self.read_cmdarg() | |
endif | |
1 0.000000 endif | |
FUNCTION 79_parse_cmd_finally() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1778 | |
Called 1 time | |
Total time: 0.000041 | |
Self time: 0.000033 | |
count total (s) self (s) | |
1 0.000005 if self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH | |
throw s:Err('E606: :finally without :try', self.ea.cmdpos) | |
1 0.000000 endif | |
1 0.000002 if self.context[0].type !=# s:NODE_TRY | |
1 0.000006 0.000003 call self.pop_context() | |
1 0.000001 endif | |
1 0.000007 0.000005 let node = s:Node(s:NODE_FINALLY) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.body = [] | |
1 0.000001 let node.ea = self.ea | |
1 0.000002 let self.context[0].finally = node | |
1 0.000007 0.000004 call self.push_context(node) | |
FUNCTION 201_compile_greaterci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5209 | |
Called 1 time | |
Total time: 0.000555 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000555 0.000008 return printf('(>? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 112_parse_expr2() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3547 | |
Called 343 times | |
Total time: 1.210702 | |
Self time: 0.008636 | |
count total (s) self (s) | |
343 1.133647 0.441070 let left = self.parse_expr3() | |
338 0.000439 while s:TRUE | |
338 0.001643 0.001169 let pos = self.reader.tell() | |
338 0.008180 0.001272 let token = self.tokenizer.get() | |
338 0.000595 if token.type == s:TOKEN_OROR | |
1 0.000007 0.000004 let node = s:Node(s:NODE_OR) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.002072 0.000004 let node.right = self.parse_expr3() | |
1 0.000002 let left = node | |
337 0.000236 else | |
337 0.001828 0.001212 call self.reader.seek_set(pos) | |
337 0.000270 break | |
1 0.000000 endif | |
338 0.000531 endwhile | |
337 0.000360 return left | |
FUNCTION 265_get_token_sq_equi_class() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5966 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if self.reader.p(0) ==# '[' && self.reader.p(1) ==# '=' && !self.isend(self.reader.p(2)) && self.reader.p(3) ==# '=' && self.reader.p(4) ==# ']' | |
return self.reader.getn(5) | |
endif | |
return '' | |
FUNCTION 271_getdecchrs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 6090 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return self.reader.read_digit() | |
FUNCTION 136_peek() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4521 | |
Called 3620 times | |
Total time: 0.025242 | |
Self time: 0.025242 | |
count total (s) self (s) | |
3620 0.009164 if self.i >= len(self.buf) | |
28 0.000031 return '<EOF>' | |
3592 0.002541 endif | |
3592 0.007446 return self.buf[self.i] | |
FUNCTION 135_p() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4514 | |
Called 1568 times | |
Total time: 0.011256 | |
Self time: 0.011256 | |
count total (s) self (s) | |
1568 0.003743 if self.i >= len(self.buf) | |
return '<EOF>' | |
1568 0.001065 endif | |
1568 0.004007 return self.buf[self.i + a:i] | |
FUNCTION <SNR>45_isvarname() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 258 | |
Called 46 times | |
Total time: 0.000756 | |
Self time: 0.000756 | |
count total (s) self (s) | |
46 0.000736 return a:s =~# '^[vgslabwt]:$\|^\([vgslabwt]:\)\?[A-Za-z_][0-9A-Za-z_#]*$' | |
FUNCTION 126_parse_lv8() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4340 | |
Called 85 times | |
Total time: 0.187667 | |
Self time: 0.011473 | |
count total (s) self (s) | |
85 0.102854 0.000343 let left = self.parse_lv9() | |
95 0.000128 while s:TRUE | |
95 0.000575 0.000430 let pos = self.reader.tell() | |
95 0.001002 0.000340 let c = self.reader.peek() | |
95 0.048497 0.000385 let token = self.tokenizer.get() | |
95 0.001067 0.000497 if !s:iswhite(c) && token.type == s:TOKEN_SQOPEN | |
6 0.000013 let npos = token.pos | |
6 0.000053 0.000036 let node = s:Node(-1) | |
6 0.003550 0.000027 if self.tokenizer.peek().type == s:TOKEN_COLON | |
call self.tokenizer.get() | |
let node = s:Node(s:NODE_SLICE) | |
let node.pos = npos | |
let node.left = left | |
let node.rlist = [s:NIL, s:NIL] | |
let token = self.tokenizer.peek() | |
if token.type !=# s:TOKEN_SQCLOSE | |
let node.rlist[1] = self.parse_expr1() | |
endif | |
let token = self.tokenizer.get() | |
if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
6 0.000004 else | |
6 0.016227 0.000026 let right = self.parse_expr1() | |
6 0.000223 0.000026 if self.tokenizer.peek().type == s:TOKEN_COLON | |
1 0.000021 0.000003 call self.tokenizer.get() | |
1 0.000008 0.000005 let node = s:Node(s:NODE_SLICE) | |
1 0.000002 let node.pos = npos | |
1 0.000001 let node.left = left | |
1 0.000002 let node.rlist = [right, s:NIL] | |
1 0.000395 0.000004 let token = self.tokenizer.peek() | |
1 0.000002 if token.type !=# s:TOKEN_SQCLOSE | |
1 0.001603 0.000005 let node.rlist[1] = self.parse_expr1() | |
1 0.000001 endif | |
1 0.000021 0.000003 let token = self.tokenizer.get() | |
1 0.000002 if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
1 0.000001 endif | |
5 0.000004 else | |
5 0.000037 0.000023 let node = s:Node(s:NODE_SUBSCRIPT) | |
5 0.000009 let node.pos = npos | |
5 0.000008 let node.left = left | |
5 0.000009 let node.right = right | |
5 0.000112 0.000017 let token = self.tokenizer.get() | |
5 0.000010 if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
5 0.000005 endif | |
6 0.000004 endif | |
6 0.000004 endif | |
6 0.000010 let left = node | |
6 0.000008 unlet node | |
89 0.000912 0.000447 elseif !s:iswhite(c) && token.type == s:TOKEN_DOT | |
4 0.001495 0.000021 let node = self.parse_dot(token, left) | |
4 0.000006 if node is# s:NIL | |
call self.reader.seek_set(pos) | |
break | |
4 0.000003 endif | |
4 0.000005 let left = node | |
4 0.000004 unlet node | |
85 0.000065 else | |
85 0.000561 0.000381 call self.reader.seek_set(pos) | |
85 0.000071 break | |
10 0.000005 endif | |
95 0.000443 endwhile | |
85 0.000101 return left | |
FUNCTION 105_get_sstring() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3424 | |
Called 17 times | |
Total time: 0.004071 | |
Self time: 0.001959 | |
count total (s) self (s) | |
17 0.001344 0.000054 call self.reader.skip_white() | |
17 0.000215 0.000077 let c = self.reader.p(0) | |
17 0.000026 if c !=# "'" | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
17 0.000014 endif | |
17 0.000091 0.000051 call self.reader.seek_cur(1) | |
17 0.000021 let s = '' | |
60 0.000061 while s:TRUE | |
60 0.000594 0.000202 let c = self.reader.p(0) | |
60 0.000120 if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('unexpected EOL', self.reader.getpos()) | |
60 0.000083 elseif c ==# "'" | |
17 0.000085 0.000047 call self.reader.seek_cur(1) | |
17 0.000164 0.000056 if self.reader.p(0) ==# "'" | |
call self.reader.seek_cur(1) | |
let s .= "''" | |
17 0.000013 else | |
17 0.000008 break | |
endif | |
43 0.000024 else | |
43 0.000236 0.000130 call self.reader.seek_cur(1) | |
43 0.000081 let s .= c | |
43 0.000030 endif | |
60 0.000065 endwhile | |
17 0.000016 return s | |
FUNCTION 210_compile_sequalci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5245 | |
Called 1 time | |
Total time: 0.000557 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000556 0.000007 return printf('(<=? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 117_parse_expr7() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3869 | |
Called 395 times | |
Total time: 1.020268 | |
Self time: 0.014066 | |
count total (s) self (s) | |
395 0.002119 0.001477 let pos = self.reader.tell() | |
395 0.191433 0.034980 let token = self.tokenizer.get() | |
394 0.000791 if token.type == s:TOKEN_NOT | |
1 0.000006 0.000003 let node = s:Node(s:NODE_NOT) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = self.parse_expr7() | |
1 0.000001 return node | |
393 0.000754 elseif token.type == s:TOKEN_MINUS | |
let node = s:Node(s:NODE_MINUS) | |
let node.pos = token.pos | |
let node.left = self.parse_expr7() | |
return node | |
393 0.000641 elseif token.type == s:TOKEN_PLUS | |
let node = s:Node(s:NODE_PLUS) | |
let node.pos = token.pos | |
let node.left = self.parse_expr7() | |
return node | |
393 0.000278 else | |
393 0.002134 0.001401 call self.reader.seek_set(pos) | |
393 0.787198 0.373219 let node = self.parse_expr8() | |
388 0.000447 return node | |
endif | |
FUNCTION 247_compile_curlynamepart() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5410 | |
Called 14 times | |
Total time: 0.000026 | |
Self time: 0.000026 | |
count total (s) self (s) | |
14 0.000021 return a:node.value | |
FUNCTION 67_parse_cmd_if() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1611 | |
Called 4 times | |
Total time: 0.009501 | |
Self time: 0.000124 | |
count total (s) self (s) | |
4 0.000029 0.000019 let node = s:Node(s:NODE_IF) | |
4 0.000010 let node.pos = self.ea.cmdpos | |
4 0.000008 let node.body = [] | |
4 0.000007 let node.ea = self.ea | |
4 0.009353 0.000017 let node.cond = self.parse_expr() | |
4 0.000009 let node.elseif = [] | |
4 0.000008 let node.else = s:NIL | |
4 0.000006 let node.endif = s:NIL | |
4 0.000033 0.000015 call self.add_node(node) | |
4 0.000028 0.000015 call self.push_context(node) | |
FUNCTION 86_parse_cmd_echoerr() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1850 | |
Called 1 time | |
Total time: 0.002430 | |
Self time: 0.000017 | |
count total (s) self (s) | |
1 0.000008 0.000006 let node = s:Node(s:NODE_ECHOERR) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.002411 0.000004 let node.list = self.parse_exprlist() | |
1 0.000007 0.000003 call self.add_node(node) | |
FUNCTION 155_read_nonwhite() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4682 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
while !s:iswhite(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
FUNCTION 229_compile_remainder() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5321 | |
Called 1 time | |
Total time: 0.000565 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000565 0.000008 return printf('(%% %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 134_seek_end() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4510 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let self.i = len(self.buf) + a:i | |
FUNCTION 24_check_missing_endtry() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 473 | |
Called 48 times | |
Total time: 0.000444 | |
Self time: 0.000444 | |
count total (s) self (s) | |
48 0.000243 if self.context[0].type == s:NODE_TRY || self.context[0].type == s:NODE_CATCH || self.context[0].type == s:NODE_FINALLY | |
throw s:Err(printf('E600: Missing :endtry: %s', a:ends), a:pos) | |
48 0.000031 endif | |
FUNCTION 164_compile() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4747 | |
Called 762 times | |
Total time: 0.585751 | |
Self time: 0.142650 | |
count total (s) self (s) | |
762 0.001345 if a:node.type == s:NODE_TOPLEVEL | |
28 0.000357 0.000342 return self.compile_toplevel(a:node) | |
734 0.001133 elseif a:node.type == s:NODE_COMMENT | |
7 0.000197 0.000025 call self.compile_comment(a:node) | |
7 0.000010 return s:NIL | |
727 0.001056 elseif a:node.type == s:NODE_EXCMD | |
16 0.000460 0.000062 call self.compile_excmd(a:node) | |
16 0.000022 return s:NIL | |
711 0.001114 elseif a:node.type == s:NODE_FUNCTION | |
6 0.000043 call self.compile_function(a:node) | |
6 0.000007 return s:NIL | |
705 0.001191 elseif a:node.type == s:NODE_DELFUNCTION | |
3 0.000032 call self.compile_delfunction(a:node) | |
3 0.000005 return s:NIL | |
702 0.001044 elseif a:node.type == s:NODE_RETURN | |
2 0.000024 call self.compile_return(a:node) | |
2 0.000003 return s:NIL | |
700 0.001050 elseif a:node.type == s:NODE_EXCALL | |
6 0.000038 call self.compile_excall(a:node) | |
6 0.000006 return s:NIL | |
694 0.000955 elseif a:node.type == s:NODE_LET | |
17 0.000201 call self.compile_let(a:node) | |
17 0.000019 return s:NIL | |
677 0.000963 elseif a:node.type == s:NODE_CONST | |
3 0.000033 call self.compile_const(a:node) | |
3 0.000003 return s:NIL | |
674 0.001007 elseif a:node.type == s:NODE_UNLET | |
1 0.000007 call self.compile_unlet(a:node) | |
1 0.000001 return s:NIL | |
673 0.001070 elseif a:node.type == s:NODE_LOCKVAR | |
2 0.000015 call self.compile_lockvar(a:node) | |
2 0.000002 return s:NIL | |
671 0.001068 elseif a:node.type == s:NODE_UNLOCKVAR | |
2 0.000014 call self.compile_unlockvar(a:node) | |
2 0.000002 return s:NIL | |
669 0.000905 elseif a:node.type == s:NODE_IF | |
4 0.000027 call self.compile_if(a:node) | |
4 0.000005 return s:NIL | |
665 0.000931 elseif a:node.type == s:NODE_WHILE | |
1 0.000006 call self.compile_while(a:node) | |
1 0.000001 return s:NIL | |
664 0.000928 elseif a:node.type == s:NODE_FOR | |
1 0.000013 call self.compile_for(a:node) | |
1 0.000001 return s:NIL | |
663 0.001011 elseif a:node.type == s:NODE_CONTINUE | |
1 0.000023 0.000004 call self.compile_continue(a:node) | |
1 0.000001 return s:NIL | |
662 0.000991 elseif a:node.type == s:NODE_BREAK | |
1 0.000022 0.000003 call self.compile_break(a:node) | |
1 0.000001 return s:NIL | |
661 0.000882 elseif a:node.type == s:NODE_TRY | |
1 0.000038 call self.compile_try(a:node) | |
1 0.000002 return s:NIL | |
660 0.000927 elseif a:node.type == s:NODE_THROW | |
1 0.000007 call self.compile_throw(a:node) | |
1 0.000001 return s:NIL | |
659 0.000925 elseif a:node.type == s:NODE_ECHO | |
125 0.001045 call self.compile_echo(a:node) | |
125 0.000147 return s:NIL | |
534 0.000754 elseif a:node.type == s:NODE_ECHON | |
1 0.000007 call self.compile_echon(a:node) | |
1 0.000001 return s:NIL | |
533 0.000804 elseif a:node.type == s:NODE_ECHOHL | |
1 0.000025 0.000003 call self.compile_echohl(a:node) | |
1 0.000001 return s:NIL | |
532 0.000884 elseif a:node.type == s:NODE_ECHOMSG | |
1 0.000009 call self.compile_echomsg(a:node) | |
1 0.000001 return s:NIL | |
531 0.000800 elseif a:node.type == s:NODE_ECHOERR | |
1 0.000008 call self.compile_echoerr(a:node) | |
1 0.000001 return s:NIL | |
530 0.000805 elseif a:node.type == s:NODE_EXECUTE | |
1 0.000007 call self.compile_execute(a:node) | |
1 0.000002 return s:NIL | |
529 0.000754 elseif a:node.type == s:NODE_TERNARY | |
1 0.000007 return self.compile_ternary(a:node) | |
528 0.000683 elseif a:node.type == s:NODE_OR | |
1 0.000006 return self.compile_or(a:node) | |
527 0.000698 elseif a:node.type == s:NODE_AND | |
1 0.000006 return self.compile_and(a:node) | |
526 0.000741 elseif a:node.type == s:NODE_EQUAL | |
1 0.000006 return self.compile_equal(a:node) | |
525 0.000764 elseif a:node.type == s:NODE_EQUALCI | |
1 0.000006 return self.compile_equalci(a:node) | |
524 0.000760 elseif a:node.type == s:NODE_EQUALCS | |
1 0.000020 return self.compile_equalcs(a:node) | |
523 0.000729 elseif a:node.type == s:NODE_NEQUAL | |
1 0.000006 return self.compile_nequal(a:node) | |
522 0.000774 elseif a:node.type == s:NODE_NEQUALCI | |
1 0.000006 return self.compile_nequalci(a:node) | |
521 0.000774 elseif a:node.type == s:NODE_NEQUALCS | |
1 0.000006 return self.compile_nequalcs(a:node) | |
520 0.000737 elseif a:node.type == s:NODE_GREATER | |
1 0.000005 return self.compile_greater(a:node) | |
519 0.000778 elseif a:node.type == s:NODE_GREATERCI | |
1 0.000006 return self.compile_greaterci(a:node) | |
518 0.000773 elseif a:node.type == s:NODE_GREATERCS | |
1 0.000007 return self.compile_greatercs(a:node) | |
517 0.000703 elseif a:node.type == s:NODE_GEQUAL | |
2 0.000012 return self.compile_gequal(a:node) | |
515 0.000760 elseif a:node.type == s:NODE_GEQUALCI | |
1 0.000007 return self.compile_gequalci(a:node) | |
514 0.000741 elseif a:node.type == s:NODE_GEQUALCS | |
1 0.000006 return self.compile_gequalcs(a:node) | |
513 0.000728 elseif a:node.type == s:NODE_SMALLER | |
1 0.000005 return self.compile_smaller(a:node) | |
512 0.000751 elseif a:node.type == s:NODE_SMALLERCI | |
1 0.000006 return self.compile_smallerci(a:node) | |
511 0.000782 elseif a:node.type == s:NODE_SMALLERCS | |
1 0.000006 return self.compile_smallercs(a:node) | |
510 0.000708 elseif a:node.type == s:NODE_SEQUAL | |
1 0.000006 return self.compile_sequal(a:node) | |
509 0.000760 elseif a:node.type == s:NODE_SEQUALCI | |
1 0.000006 return self.compile_sequalci(a:node) | |
508 0.000743 elseif a:node.type == s:NODE_SEQUALCS | |
1 0.000006 return self.compile_sequalcs(a:node) | |
507 0.000657 elseif a:node.type == s:NODE_MATCH | |
1 0.000006 return self.compile_match(a:node) | |
506 0.000753 elseif a:node.type == s:NODE_MATCHCI | |
1 0.000006 return self.compile_matchci(a:node) | |
505 0.000731 elseif a:node.type == s:NODE_MATCHCS | |
1 0.000006 return self.compile_matchcs(a:node) | |
504 0.000736 elseif a:node.type == s:NODE_NOMATCH | |
1 0.000006 return self.compile_nomatch(a:node) | |
503 0.000754 elseif a:node.type == s:NODE_NOMATCHCI | |
1 0.000006 return self.compile_nomatchci(a:node) | |
502 0.000765 elseif a:node.type == s:NODE_NOMATCHCS | |
1 0.000006 return self.compile_nomatchcs(a:node) | |
501 0.000644 elseif a:node.type == s:NODE_IS | |
1 0.000006 return self.compile_is(a:node) | |
500 0.000691 elseif a:node.type == s:NODE_ISCI | |
1 0.000007 return self.compile_isci(a:node) | |
499 0.000692 elseif a:node.type == s:NODE_ISCS | |
1 0.000007 return self.compile_iscs(a:node) | |
498 0.000665 elseif a:node.type == s:NODE_ISNOT | |
1 0.000006 return self.compile_isnot(a:node) | |
497 0.000725 elseif a:node.type == s:NODE_ISNOTCI | |
1 0.000006 return self.compile_isnotci(a:node) | |
496 0.000729 elseif a:node.type == s:NODE_ISNOTCS | |
1 0.000006 return self.compile_isnotcs(a:node) | |
495 0.000649 elseif a:node.type == s:NODE_ADD | |
4 0.000026 return self.compile_add(a:node) | |
491 0.000741 elseif a:node.type == s:NODE_SUBTRACT | |
1 0.000006 return self.compile_subtract(a:node) | |
490 0.000668 elseif a:node.type == s:NODE_CONCAT | |
8 0.000050 return self.compile_concat(a:node) | |
482 0.000709 elseif a:node.type == s:NODE_MULTIPLY | |
2 0.000064 return self.compile_multiply(a:node) | |
480 0.000727 elseif a:node.type == s:NODE_DIVIDE | |
1 0.000007 return self.compile_divide(a:node) | |
479 0.000712 elseif a:node.type == s:NODE_REMAINDER | |
1 0.000007 return self.compile_remainder(a:node) | |
478 0.000645 elseif a:node.type == s:NODE_NOT | |
1 0.000006 return self.compile_not(a:node) | |
477 0.000649 elseif a:node.type == s:NODE_PLUS | |
return self.compile_plus(a:node) | |
477 0.000639 elseif a:node.type == s:NODE_MINUS | |
return self.compile_minus(a:node) | |
477 0.000711 elseif a:node.type == s:NODE_SUBSCRIPT | |
5 0.000037 return self.compile_subscript(a:node) | |
472 0.000642 elseif a:node.type == s:NODE_SLICE | |
5 0.000053 return self.compile_slice(a:node) | |
467 0.000761 elseif a:node.type == s:NODE_DOT | |
14 0.000091 return self.compile_dot(a:node) | |
453 0.000605 elseif a:node.type == s:NODE_CALL | |
11 0.000145 return self.compile_call(a:node) | |
442 0.000643 elseif a:node.type == s:NODE_NUMBER | |
91 0.000479 0.000326 return self.compile_number(a:node) | |
351 0.000472 elseif a:node.type == s:NODE_BLOB | |
9 0.000061 0.000044 return self.compile_blob(a:node) | |
342 0.000481 elseif a:node.type == s:NODE_STRING | |
44 0.000253 0.000179 return self.compile_string(a:node) | |
298 0.000463 elseif a:node.type == s:NODE_LIST | |
12 0.000092 0.000086 return self.compile_list(a:node) | |
286 0.000376 elseif a:node.type == s:NODE_DICT | |
23 0.000226 0.000173 return self.compile_dict(a:node) | |
263 0.000372 elseif a:node.type == s:NODE_OPTION | |
return self.compile_option(a:node) | |
263 0.000425 elseif a:node.type == s:NODE_IDENTIFIER | |
219 0.001192 0.000829 return self.compile_identifier(a:node) | |
44 0.000067 elseif a:node.type == s:NODE_CURLYNAME | |
12 0.000089 return self.compile_curlyname(a:node) | |
32 0.000044 elseif a:node.type == s:NODE_ENV | |
return self.compile_env(a:node) | |
32 0.000042 elseif a:node.type == s:NODE_REG | |
return self.compile_reg(a:node) | |
32 0.000055 elseif a:node.type == s:NODE_CURLYNAMEPART | |
14 0.000076 0.000050 return self.compile_curlynamepart(a:node) | |
18 0.000030 elseif a:node.type == s:NODE_CURLYNAMEEXPR | |
12 0.000069 return self.compile_curlynameexpr(a:node) | |
6 0.000011 elseif a:node.type == s:NODE_LAMBDA | |
6 0.000048 return self.compile_lambda(a:node) | |
else | |
throw printf('Compiler: unknown node: %s', string(a:node)) | |
endif | |
return s:NIL | |
FUNCTION 222_compile_isnotci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5293 | |
Called 1 time | |
Total time: 0.000553 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000553 0.000007 return printf('(isnot? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION <SNR>45_iswordc() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 234 | |
Called 97 times | |
Total time: 0.000565 | |
Self time: 0.000565 | |
count total (s) self (s) | |
97 0.000517 return a:c =~# '^[0-9A-Za-z_]$' | |
FUNCTION 141_readline() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4562 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = self.getn(-1) | |
call self.get() | |
return r | |
FUNCTION 266_get_token_sq_char_class() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5974 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let class_names = ['alnum', 'alpha', 'blank', 'cntrl', 'digit', 'graph', 'lower', 'print', 'punct', 'space', 'upper', 'xdigit', 'tab', 'return', 'backspace', 'escape'] | |
let pos = self.reader.tell() | |
if self.reader.p(0) ==# '[' && self.reader.p(1) ==# ':' | |
call self.reader.seek_cur(2) | |
let r = self.reader.read_alpha() | |
if self.reader.p(0) ==# ':' && self.reader.p(1) ==# ']' | |
call self.reader.seek_cur(2) | |
for name in class_names | |
if r ==# name | |
return '[:' . name . ':]' | |
endif | |
endfor | |
endif | |
endif | |
call self.reader.seek_set(pos) | |
return '' | |
FUNCTION 191_compile_ternary() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5169 | |
Called 1 time | |
Total time: 0.000825 | |
Self time: 0.000010 | |
count total (s) self (s) | |
1 0.000825 0.000010 return printf('(?: %s %s %s)', self.compile(a:node.cond), self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 188_compile_echomsg() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5154 | |
Called 1 time | |
Total time: 0.000296 | |
Self time: 0.000014 | |
count total (s) self (s) | |
1 0.000273 0.000008 let list = map(a:node.list, 'self.compile(v:val)') | |
1 0.000023 0.000006 call self.out('(echomsg %s)', join(list, ' ')) | |
FUNCTION 54_parse_cmd_tcl() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1302 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_lua() | |
FUNCTION 49_parse_cmd_mzscheme() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1282 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_lua() | |
FUNCTION 123_parse_identifier() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4271 | |
Called 244 times | |
Total time: 0.175793 | |
Self time: 0.007108 | |
count total (s) self (s) | |
244 0.020472 0.000834 call self.reader.skip_white() | |
244 0.003215 0.001084 let npos = self.reader.getpos() | |
244 0.114910 0.011053 let curly_parts = self.parse_curly_parts() | |
244 0.001118 if len(curly_parts) == 1 && curly_parts[0].type == s:NODE_CURLYNAMEPART | |
227 0.001668 0.001074 let node = s:Node(s:NODE_IDENTIFIER) | |
227 0.000425 let node.pos = npos | |
227 0.000604 let node.value = curly_parts[0].value | |
227 0.000260 return node | |
17 0.000008 else | |
17 0.000115 0.000069 let node = s:Node(s:NODE_CURLYNAME) | |
17 0.000033 let node.pos = npos | |
17 0.000032 let node.value = curly_parts | |
17 0.000017 return node | |
endif | |
FUNCTION 101_token() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3138 | |
Called 1225 times | |
Total time: 0.005463 | |
Self time: 0.005463 | |
count total (s) self (s) | |
1225 0.004949 return {'type': a:type, 'value': a:value, 'pos': a:pos} | |
FUNCTION 52_parse_cmd_python3() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1294 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_lua() | |
FUNCTION 207_compile_smallerci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5233 | |
Called 1 time | |
Total time: 0.000551 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000551 0.000007 return printf('(<? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 21_add_node() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 457 | |
Called 235 times | |
Total time: 0.001009 | |
Self time: 0.001009 | |
count total (s) self (s) | |
235 0.000936 call add(self.context[0].body, a:node) | |
FUNCTION 197_compile_nequal() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5193 | |
Called 1 time | |
Total time: 0.000558 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000558 0.000008 return printf('(!= %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 128_new() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4447 | |
Called 50 times | |
Total time: 0.121010 | |
Self time: 0.003287 | |
count total (s) self (s) | |
50 0.002199 let obj = copy(self) | |
50 0.118565 0.000842 call call(obj.__init__, a:000, obj) | |
50 0.000116 return obj | |
FUNCTION 107_get_dict_literal_key() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3484 | |
Called 9 times | |
Total time: 0.002416 | |
Self time: 0.001003 | |
count total (s) self (s) | |
9 0.000776 0.000029 call self.reader.skip_white() | |
9 0.000016 let r = self.reader | |
9 0.000106 0.000041 let c = r.peek() | |
9 0.000110 0.000046 if !s:isalnum(c) && c !=# '_' && c !=# '-' | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
9 0.000007 endif | |
9 0.000015 let s = c | |
9 0.000054 0.000030 call self.reader.seek_cur(1) | |
34 0.000038 while s:TRUE | |
34 0.000351 0.000115 let c = self.reader.p(0) | |
34 0.000070 if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('unexpectd EOL', self.reader.getpos()) | |
34 0.000022 endif | |
34 0.000354 0.000148 if !s:isalnum(c) && c !=# '_' && c !=# '-' | |
9 0.000009 break | |
25 0.000015 endif | |
25 0.000169 0.000098 call self.reader.seek_cur(1) | |
25 0.000046 let s .= c | |
34 0.000038 endwhile | |
9 0.000010 return s | |
FUNCTION 220_compile_iscs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5285 | |
Called 1 time | |
Total time: 0.000557 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000557 0.000009 return printf('(is# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION <SNR>45_isodigit() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 226 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return a:c =~# '^[0-7]$' | |
FUNCTION 74_parse_cmd_endfor() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1713 | |
Called 1 time | |
Total time: 0.000027 | |
Self time: 0.000021 | |
count total (s) self (s) | |
1 0.000003 if self.context[0].type !=# s:NODE_FOR | |
throw s:Err('E588: :endfor without :for', self.ea.cmdpos) | |
1 0.000000 endif | |
1 0.000007 0.000005 let node = s:Node(s:NODE_ENDFOR) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.000003 let self.context[0].endfor = node | |
1 0.000006 0.000002 call self.pop_context() | |
FUNCTION 43_separate_nextcmd() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1125 | |
Called 4 times | |
Total time: 0.012256 | |
Self time: 0.002910 | |
count total (s) self (s) | |
4 0.000021 if self.ea.cmd.name ==# 'vimgrep' || self.ea.cmd.name ==# 'vimgrepadd' || self.ea.cmd.name ==# 'lvimgrep' || self.ea.cmd.name ==# 'lvimgrepadd' | |
1 0.000770 0.000004 call self.skip_vimgrep_pat() | |
4 0.000003 endif | |
4 0.000006 let pc = '' | |
4 0.000057 0.000020 let end = self.reader.getpos() | |
4 0.000007 let nospend = end | |
34 0.000042 while s:TRUE | |
34 0.000454 0.000144 let end = self.reader.getpos() | |
34 0.000356 0.000143 if !s:iswhite(pc) | |
31 0.000077 let nospend = end | |
34 0.000027 endif | |
34 0.000434 0.000163 let c = self.reader.peek() | |
34 0.000083 if c ==# '<EOF>' || c ==# '<EOL>' | |
3 0.000003 break | |
31 0.000066 elseif c ==# "\x16" " <C-V> | |
call self.reader.get() | |
let end = self.reader.getpos() | |
let nospend = self.reader.getpos() | |
let c = self.reader.peek() | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
break | |
endif | |
call self.reader.get() | |
31 0.002341 0.000202 elseif self.reader.peekn(2) ==# '`=' && self.ea.cmd.flags =~# '\<\(XFILE\|FILES\|FILE1\)\>' | |
1 0.000053 0.000006 call self.reader.getn(2) | |
1 0.005206 0.000006 call self.parse_expr() | |
1 0.000057 0.000005 let c = self.reader.peekn(1) | |
1 0.000001 if c !=# '`' | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
1 0.000001 endif | |
1 0.000032 0.000004 call self.reader.getn(1) | |
30 0.000289 elseif c ==# '|' || c ==# "\n" || (c ==# '"' && self.ea.cmd.flags !~# '\<NOTRLCOM\>' && ((self.ea.cmd.name !=# '@' && self.ea.cmd.name !=# '*') || self.reader.getpos() !=# self.ea.argpos) && (self.ea.cmd.name !=# 'redir' || self.reader.getpos().i !=# self.ea.argpos.i + 1 || pc !=# '@')) | |
1 0.000003 let has_cpo_bar = s:FALSE " &cpoptions =~ 'b' | |
1 0.000002 if (!has_cpo_bar || self.ea.cmd.flags !~# '\<USECTRLV\>') && pc ==# '\' | |
call self.reader.get() | |
1 0.000001 else | |
1 0.000001 break | |
endif | |
29 0.000022 else | |
29 0.000385 0.000102 call self.reader.get() | |
30 0.000023 endif | |
30 0.000046 let pc = c | |
34 0.000036 endwhile | |
4 0.000047 if self.ea.cmd.flags !~# '\<NOTRLCOM\>' | |
2 0.000004 let end = nospend | |
4 0.000003 endif | |
4 0.000004 return end | |
FUNCTION 29_parse_command_modifiers() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 536 | |
Called 279 times | |
Total time: 0.300146 | |
Self time: 0.057949 | |
count total (s) self (s) | |
279 0.000517 let modifiers = [] | |
313 0.000446 while s:TRUE | |
313 0.001728 0.001241 let pos = self.reader.tell() | |
313 0.000368 let d = '' | |
313 0.019130 0.002156 if s:isdigit(self.reader.peekn(1)) | |
let d = self.reader.read_digit() | |
call self.reader.skip_white() | |
313 0.000213 endif | |
313 0.174743 0.001494 let k = self.reader.read_alpha() | |
313 0.015379 0.001709 let c = self.reader.peekn(1) | |
313 0.038332 0.001178 call self.reader.skip_white() | |
313 0.001481 if stridx('aboveleft', k) == 0 && len(k) >= 3 " abo\%[veleft] | |
2 0.000009 call add(modifiers, {'name': 'aboveleft'}) | |
311 0.001111 elseif stridx('belowright', k) == 0 && len(k) >= 3 " bel\%[owright] | |
2 0.000008 call add(modifiers, {'name': 'belowright'}) | |
309 0.000956 elseif stridx('browse', k) == 0 && len(k) >= 3 " bro\%[wse] | |
2 0.000008 call add(modifiers, {'name': 'browse'}) | |
307 0.000938 elseif stridx('botright', k) == 0 && len(k) >= 2 " bo\%[tright] | |
2 0.000007 call add(modifiers, {'name': 'botright'}) | |
305 0.000907 elseif stridx('confirm', k) == 0 && len(k) >= 4 " conf\%[irm] | |
2 0.000006 call add(modifiers, {'name': 'confirm'}) | |
303 0.000988 elseif stridx('keepmarks', k) == 0 && len(k) >= 3 " kee\%[pmarks] | |
2 0.000007 call add(modifiers, {'name': 'keepmarks'}) | |
301 0.000848 elseif stridx('keepalt', k) == 0 && len(k) >= 5 " keepa\%[lt] | |
2 0.000007 call add(modifiers, {'name': 'keepalt'}) | |
299 0.000947 elseif stridx('keepjumps', k) == 0 && len(k) >= 5 " keepj\%[umps] | |
2 0.000007 call add(modifiers, {'name': 'keepjumps'}) | |
297 0.000891 elseif stridx('keeppatterns', k) == 0 && len(k) >= 5 " keepp\%[atterns] | |
2 0.000008 call add(modifiers, {'name': 'keeppatterns'}) | |
295 0.000837 elseif stridx('hide', k) == 0 && len(k) >= 3 " hid\%[e] | |
2 0.000018 0.000008 if self.ends_excmds(c) | |
break | |
2 0.000001 endif | |
2 0.000007 call add(modifiers, {'name': 'hide'}) | |
293 0.000898 elseif stridx('lockmarks', k) == 0 && len(k) >= 3 " loc\%[kmarks] | |
2 0.000007 call add(modifiers, {'name': 'lockmarks'}) | |
291 0.000822 elseif stridx('leftabove', k) == 0 && len(k) >= 5 " lefta\%[bove] | |
call add(modifiers, {'name': 'leftabove'}) | |
291 0.000808 elseif stridx('noautocmd', k) == 0 && len(k) >= 3 " noa\%[utocmd] | |
call add(modifiers, {'name': 'noautocmd'}) | |
291 0.000806 elseif stridx('noswapfile', k) == 0 && len(k) >= 3 " :nos\%[wapfile] | |
2 0.000008 call add(modifiers, {'name': 'noswapfile'}) | |
289 0.000808 elseif stridx('rightbelow', k) == 0 && len(k) >= 6 " rightb\%[elow] | |
call add(modifiers, {'name': 'rightbelow'}) | |
289 0.000795 elseif stridx('sandbox', k) == 0 && len(k) >= 3 " san\%[dbox] | |
call add(modifiers, {'name': 'sandbox'}) | |
289 0.000942 elseif stridx('silent', k) == 0 && len(k) >= 3 " sil\%[ent] | |
2 0.000003 if c ==# '!' | |
call self.reader.get() | |
call add(modifiers, {'name': 'silent', 'bang': 1}) | |
2 0.000002 else | |
2 0.000008 call add(modifiers, {'name': 'silent', 'bang': 0}) | |
2 0.000001 endif | |
287 0.000424 elseif k ==# 'tab' " tab | |
2 0.000002 if d !=# '' | |
call add(modifiers, {'name': 'tab', 'count': str2nr(d, 10)}) | |
2 0.000002 else | |
2 0.000007 call add(modifiers, {'name': 'tab'}) | |
2 0.000001 endif | |
285 0.000834 elseif stridx('topleft', k) == 0 && len(k) >= 2 " to\%[pleft] | |
2 0.000006 call add(modifiers, {'name': 'topleft'}) | |
283 0.000811 elseif stridx('unsilent', k) == 0 && len(k) >= 3 " uns\%[ilent] | |
call add(modifiers, {'name': 'unsilent'}) | |
283 0.000813 elseif stridx('vertical', k) == 0 && len(k) >= 4 " vert\%[ical] | |
2 0.000007 call add(modifiers, {'name': 'vertical'}) | |
281 0.000817 elseif stridx('verbose', k) == 0 && len(k) >= 4 " verb\%[ose] | |
2 0.000002 if d !=# '' | |
call add(modifiers, {'name': 'verbose', 'count': str2nr(d, 10)}) | |
2 0.000002 else | |
2 0.000008 call add(modifiers, {'name': 'verbose', 'count': 1}) | |
2 0.000001 endif | |
279 0.000181 else | |
279 0.001820 0.001167 call self.reader.seek_set(pos) | |
279 0.000226 break | |
34 0.000019 endif | |
313 0.001799 endwhile | |
279 0.000730 let self.ea.modifiers = modifiers | |
FUNCTION 146_read_alnum() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4600 | |
Called 1 time | |
Total time: 0.000084 | |
Self time: 0.000018 | |
count total (s) self (s) | |
1 0.000002 let r = '' | |
1 0.000077 0.000011 while s:isalnum(self.peekn(1)) | |
let r .= self.getn(1) | |
1 0.000001 endwhile | |
1 0.000001 return r | |
FUNCTION 232_compile_minus() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5333 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return printf('(- %s)', self.compile(a:node.left)) | |
FUNCTION 68_parse_cmd_elseif() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1624 | |
Called 1 time | |
Total time: 0.001715 | |
Self time: 0.000035 | |
count total (s) self (s) | |
1 0.000004 if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF | |
throw s:Err('E582: :elseif without :if', self.ea.cmdpos) | |
1 0.000001 endif | |
1 0.000002 if self.context[0].type !=# s:NODE_IF | |
call self.pop_context() | |
1 0.000000 endif | |
1 0.000007 0.000004 let node = s:Node(s:NODE_ELSEIF) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.body = [] | |
1 0.000002 let node.ea = self.ea | |
1 0.001678 0.000004 let node.cond = self.parse_expr() | |
1 0.000004 call add(self.context[0].elseif, node) | |
1 0.000007 0.000004 call self.push_context(node) | |
FUNCTION 256_get_token_magic() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5569 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# '+' | |
return ['\+', '\+'] | |
elseif c ==# '=' | |
return ['\=', '\='] | |
elseif c ==# '?' | |
return ['\?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('\{') | |
elseif c ==# '@' | |
return self.get_token_at('\@') | |
elseif c ==# '<' | |
return ['\<', '\<'] | |
elseif c ==# '>' | |
return ['\>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('\%') | |
elseif c ==# '|' | |
return ['\|', '\|'] | |
elseif c ==# '&' | |
return ['\&', '\&'] | |
elseif c ==# '(' | |
return ['\(', '\('] | |
elseif c ==# ')' | |
return ['\)', '\)'] | |
endif | |
call self.reader.seek_set(pos) | |
return self.get_token_backslash_common() | |
elseif c ==# '*' | |
return ['*', '\*'] | |
elseif c ==# '^' | |
return ['^', '\^'] | |
elseif c ==# '$' | |
return ['$', '\$'] | |
elseif c ==# '.' | |
return ['.', '\.'] | |
elseif c ==# '[' | |
return self.get_token_sq('[') | |
elseif c ==# '~' | |
return ['~', '\~'] | |
endif | |
return [c, c] | |
FUNCTION 93_parse_lvaluelist() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1932 | |
Called 5 times | |
Total time: 0.029677 | |
Self time: 0.000434 | |
count total (s) self (s) | |
5 0.000007 let list = [] | |
5 0.013147 0.000018 let node = self.parse_expr() | |
5 0.000014 call add(list, node) | |
15 0.000017 while s:TRUE | |
15 0.001574 0.000047 call self.reader.skip_white() | |
15 0.000255 0.000090 if self.ends_excmds(self.reader.peek()) | |
5 0.000004 break | |
10 0.000007 endif | |
10 0.014563 0.000141 let node = self.parse_lvalue() | |
10 0.000028 call add(list, node) | |
15 0.000015 endwhile | |
5 0.000005 return list | |
FUNCTION 165_compile_body() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4946 | |
Called 46 times | |
Total time: 0.173229 | |
Self time: 0.032075 | |
count total (s) self (s) | |
251 0.000315 for node in a:body | |
205 0.166725 0.007568 call self.compile(node) | |
251 0.000204 endfor | |
FUNCTION 159_new() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4716 | |
Called 50 times | |
Total time: 0.005237 | |
Self time: 0.004917 | |
count total (s) self (s) | |
50 0.004376 let obj = copy(self) | |
50 0.000736 0.000416 call call(obj.__init__, a:000, obj) | |
50 0.000078 return obj | |
FUNCTION 160___init__() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4722 | |
Called 50 times | |
Total time: 0.000320 | |
Self time: 0.000320 | |
count total (s) self (s) | |
50 0.000175 let self.indent = [''] | |
50 0.000110 let self.lines = [] | |
FUNCTION 180_compile_for() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5082 | |
Called 1 time | |
Total time: 0.002137 | |
Self time: 0.000049 | |
count total (s) self (s) | |
1 0.000002 let left = '' | |
1 0.000001 if a:node.left isnot# s:NIL | |
let left = self.compile(a:node.left) | |
1 0.000001 else | |
1 0.000565 0.000012 let left = join(map(a:node.list, 'self.compile(v:val)'), ' ') | |
1 0.000001 if a:node.rest isnot# s:NIL | |
1 0.000278 0.000004 let left .= ' . ' . self.compile(a:node.rest) | |
1 0.000001 endif | |
1 0.000002 let left = '(' . left . ')' | |
1 0.000001 endif | |
1 0.000277 0.000005 let right = self.compile(a:node.right) | |
1 0.000021 0.000004 call self.out('(for %s %s', left, right) | |
1 0.000007 0.000003 call self.incindent(' ') | |
1 0.000953 0.000004 call self.compile_body(a:node.body) | |
1 0.000019 0.000003 call self.out(')') | |
1 0.000005 0.000002 call self.decindent() | |
FUNCTION 106_get_dstring() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3452 | |
Called 31 times | |
Total time: 0.009374 | |
Self time: 0.005462 | |
count total (s) self (s) | |
31 0.002391 0.000096 call self.reader.skip_white() | |
31 0.000354 0.000126 let c = self.reader.p(0) | |
31 0.000045 if c !=# '"' | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
31 0.000016 endif | |
31 0.000168 0.000094 call self.reader.seek_cur(1) | |
31 0.000038 let s = '' | |
144 0.000149 while s:TRUE | |
144 0.001479 0.000516 let c = self.reader.p(0) | |
144 0.000278 if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('unexpectd EOL', self.reader.getpos()) | |
144 0.000180 elseif c ==# '"' | |
31 0.000157 0.000089 call self.reader.seek_cur(1) | |
31 0.000028 break | |
113 0.000127 elseif c ==# '\' | |
1 0.000005 0.000003 call self.reader.seek_cur(1) | |
1 0.000002 let s .= c | |
1 0.000010 0.000003 let c = self.reader.p(0) | |
1 0.000002 if c ==# '<EOF>' || c ==# '<EOL>' | |
throw s:Err('ExprTokenizer: unexpected EOL', self.reader.getpos()) | |
1 0.000001 endif | |
1 0.000005 0.000003 call self.reader.seek_cur(1) | |
1 0.000002 let s .= c | |
112 0.000063 else | |
112 0.000642 0.000369 call self.reader.seek_cur(1) | |
112 0.000206 let s .= c | |
113 0.000077 endif | |
144 0.000178 endwhile | |
31 0.000034 return s | |
FUNCTION 228_compile_divide() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5317 | |
Called 1 time | |
Total time: 0.000561 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000560 0.000008 return printf('(/ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 60_parse_cmd_return() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1459 | |
Called 2 times | |
Total time: 0.005079 | |
Self time: 0.000091 | |
count total (s) self (s) | |
2 0.000031 0.000012 if self.find_context(s:NODE_FUNCTION) == -1 | |
throw s:Err('E133: :return not inside a function', self.ea.cmdpos) | |
2 0.000002 endif | |
2 0.000017 0.000011 let node = s:Node(s:NODE_RETURN) | |
2 0.000006 let node.pos = self.ea.cmdpos | |
2 0.000004 let node.ea = self.ea | |
2 0.000004 let node.left = s:NIL | |
2 0.000162 0.000008 call self.reader.skip_white() | |
2 0.000025 0.000009 let c = self.reader.peek() | |
2 0.000013 0.000008 if c ==# '"' || !self.ends_excmds(c) | |
2 0.004787 0.000009 let node.left = self.parse_expr() | |
2 0.000002 endif | |
2 0.000019 0.000009 call self.add_node(node) | |
FUNCTION 129___init__() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4453 | |
Called 50 times | |
Total time: 0.117723 | |
Self time: 0.117723 | |
count total (s) self (s) | |
50 0.000233 let self.buf = [] | |
50 0.000138 let self.pos = [] | |
50 0.000127 let lnum = 0 | |
50 0.000096 let offset = 0 | |
366 0.001315 while lnum < len(a:lines) | |
316 0.000497 let col = 0 | |
5084 0.015379 for c in split(a:lines[lnum], '\zs') | |
4768 0.013658 call add(self.buf, c) | |
4768 0.022302 call add(self.pos, [lnum + 1, col + 1, offset]) | |
4768 0.012770 let col += len(c) | |
4768 0.012820 let offset += len(c) | |
5084 0.007485 endfor | |
325 0.003376 while lnum + 1 < len(a:lines) && a:lines[lnum + 1] =~# '^\s*\\' | |
9 0.000026 let skip = s:TRUE | |
9 0.000017 let col = 0 | |
224 0.000730 for c in split(a:lines[lnum + 1], '\zs') | |
215 0.000268 if skip | |
67 0.000113 if c ==# '\' | |
9 0.000018 let skip = s:FALSE | |
67 0.000058 endif | |
148 0.000130 else | |
148 0.000522 call add(self.buf, c) | |
148 0.000812 call add(self.pos, [lnum + 2, col + 1, offset]) | |
215 0.000201 endif | |
215 0.000605 let col += len(c) | |
215 0.000633 let offset += len(c) | |
224 0.000325 endfor | |
9 0.000013 let lnum += 1 | |
9 0.000017 let offset += 1 | |
325 0.000322 endwhile | |
316 0.001034 call add(self.buf, '<EOL>') | |
316 0.001539 call add(self.pos, [lnum + 1, col + 1, offset]) | |
316 0.000560 let lnum += 1 | |
316 0.000495 let offset += 1 | |
366 0.000563 endwhile | |
" for <EOF> | |
50 0.000252 call add(self.pos, [lnum + 1, 0, offset]) | |
50 0.000150 let self.i = 0 | |
FUNCTION 80_parse_cmd_endtry() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1793 | |
Called 1 time | |
Total time: 0.000039 | |
Self time: 0.000030 | |
count total (s) self (s) | |
1 0.000006 if self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH && self.context[0].type !=# s:NODE_FINALLY | |
throw s:Err('E602: :endtry without :try', self.ea.cmdpos) | |
1 0.000000 endif | |
1 0.000002 if self.context[0].type !=# s:NODE_TRY | |
1 0.000006 0.000003 call self.pop_context() | |
1 0.000001 endif | |
1 0.000007 0.000004 let node = s:Node(s:NODE_ENDTRY) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.000003 let self.context[0].endtry = node | |
1 0.000005 0.000002 call self.pop_context() | |
FUNCTION 58_parse_cmd_endfunction() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1435 | |
Called 20 times | |
Total time: 0.002032 | |
Self time: 0.000882 | |
count total (s) self (s) | |
20 0.000311 0.000095 call self.check_missing_endif('ENDFUNCTION', self.ea.cmdpos) | |
20 0.000268 0.000086 call self.check_missing_endtry('ENDFUNCTION', self.ea.cmdpos) | |
20 0.000216 0.000090 call self.check_missing_endwhile('ENDFUNCTION', self.ea.cmdpos) | |
20 0.000199 0.000074 call self.check_missing_endfor('ENDFUNCTION', self.ea.cmdpos) | |
20 0.000046 if self.context[0].type !=# s:NODE_FUNCTION | |
throw s:Err('E193: :endfunction not inside a function', self.ea.cmdpos) | |
20 0.000014 endif | |
20 0.000453 0.000076 call self.reader.getn(-1) | |
20 0.000145 0.000090 let node = s:Node(s:NODE_ENDFUNCTION) | |
20 0.000060 let node.pos = self.ea.cmdpos | |
20 0.000035 let node.ea = self.ea | |
20 0.000058 let self.context[0].endfunction = node | |
20 0.000135 0.000066 call self.pop_context() | |
FUNCTION 27_parse() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 491 | |
Called 50 times | |
Total time: 2.498462 | |
Self time: 0.005561 | |
count total (s) self (s) | |
50 0.000151 let self.reader = a:reader | |
50 0.000131 let self.context = [] | |
50 0.000730 0.000429 let toplevel = s:Node(s:NODE_TOPLEVEL) | |
50 0.000984 0.000355 let toplevel.pos = self.reader.getpos() | |
50 0.000117 let toplevel.body = [] | |
50 0.000544 0.000269 call self.push_context(toplevel) | |
316 0.003622 0.001386 while self.reader.peek() !=# '<EOF>' | |
288 2.924737 0.437559 call self.parse_one_cmd() | |
294 0.000268 endwhile | |
28 0.000702 0.000229 call self.check_missing_endfunction('TOPLEVEL', self.reader.getpos()) | |
28 0.000695 0.000202 call self.check_missing_endif('TOPLEVEL', self.reader.getpos()) | |
28 0.000653 0.000185 call self.check_missing_endtry('TOPLEVEL', self.reader.getpos()) | |
28 0.000549 0.000174 call self.check_missing_endwhile('TOPLEVEL', self.reader.getpos()) | |
28 0.000542 0.000172 call self.check_missing_endfor('TOPLEVEL', self.reader.getpos()) | |
28 0.000180 0.000077 call self.pop_context() | |
28 0.000044 return toplevel | |
FUNCTION 139_getn() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4543 | |
Called 20636 times | |
Total time: 0.611853 | |
Self time: 0.611853 | |
count total (s) self (s) | |
20636 0.025494 let r = '' | |
20636 0.022502 let j = 0 | |
41158 0.133465 while self.i < len(self.buf) && (a:n < 0 || j < a:n) | |
21566 0.052453 let c = self.buf[self.i] | |
21566 0.030224 if c ==# '<EOL>' | |
1044 0.000834 break | |
20522 0.012767 endif | |
20522 0.036636 let r .= c | |
20522 0.025932 let self.i += 1 | |
20522 0.021759 let j += 1 | |
41158 0.045519 endwhile | |
20636 0.022406 return r | |
FUNCTION 175_compile_unlet() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5029 | |
Called 1 time | |
Total time: 0.000862 | |
Self time: 0.000021 | |
count total (s) self (s) | |
1 0.000839 0.000015 let list = map(a:node.list, 'self.compile(v:val)') | |
1 0.000023 0.000006 call self.out('(unlet %s)', join(list, ' ')) | |
FUNCTION vimlparser#import() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 7 | |
Called 1 time | |
Total time: 0.000005 | |
Self time: 0.000005 | |
count total (s) self (s) | |
1 0.000002 return s: | |
FUNCTION 267_get_token_at() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5994 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if c ==# '>' | |
return [a:pre . '>', '\@>'] | |
elseif c ==# '=' | |
return [a:pre . '=', '\@='] | |
elseif c ==# '!' | |
return [a:pre . '!', '\@!'] | |
elseif c ==# '<' | |
let c = self.reader.get() | |
if c ==# '=' | |
return [a:pre . '<=', '\@<='] | |
elseif c ==# '!' | |
return [a:pre . '<!', '\@<!'] | |
endif | |
endif | |
throw s:Err('E64: @ follows nothing', epos) | |
FUNCTION <SNR>45_Node() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 412 | |
Called 1741 times | |
Total time: 0.004608 | |
Self time: 0.004608 | |
count total (s) self (s) | |
1741 0.004008 return {'type': a:type} | |
FUNCTION 192_compile_or() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5173 | |
Called 1 time | |
Total time: 0.000553 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000553 0.000008 return printf('(|| %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 244_compile_curlyname() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5398 | |
Called 12 times | |
Total time: 0.014688 | |
Self time: 0.000166 | |
count total (s) self (s) | |
12 0.011991 0.001333 return join(map(a:node.value, 'self.compile(v:val)'), '') | |
FUNCTION 161_out() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4727 | |
Called 223 times | |
Total time: 0.003945 | |
Self time: 0.003945 | |
count total (s) self (s) | |
223 0.000477 if len(a:000) == 1 | |
19 0.000046 if a:000[0][0] ==# ')' | |
13 0.000049 let self.lines[-1] .= a:000[0] | |
6 0.000004 else | |
6 0.000023 call add(self.lines, self.indent[0] . a:000[0]) | |
19 0.000016 endif | |
204 0.000134 else | |
204 0.001334 call add(self.lines, self.indent[0] . call('printf', a:000)) | |
223 0.000159 endif | |
FUNCTION 113_parse_expr3() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3567 | |
Called 344 times | |
Total time: 1.192212 | |
Self time: 0.008772 | |
count total (s) self (s) | |
344 1.118525 0.441020 let left = self.parse_expr4() | |
339 0.000475 while s:TRUE | |
339 0.001651 0.001154 let pos = self.reader.tell() | |
339 0.007900 0.001193 let token = self.tokenizer.get() | |
339 0.000607 if token.type == s:TOKEN_ANDAND | |
1 0.000007 0.000004 let node = s:Node(s:NODE_AND) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.002003 0.000003 let node.right = self.parse_expr4() | |
1 0.000002 let left = node | |
338 0.000269 else | |
338 0.001925 0.001334 call self.reader.seek_set(pos) | |
338 0.000269 break | |
1 0.000000 endif | |
339 0.000548 endwhile | |
338 0.000389 return left | |
FUNCTION 131_tell() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4498 | |
Called 30024 times | |
Total time: 0.046515 | |
Self time: 0.046515 | |
count total (s) self (s) | |
30024 0.036940 return self.i | |
FUNCTION 169_compile_function() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4965 | |
Called 6 times | |
Total time: 0.004531 | |
Self time: 0.000288 | |
count total (s) self (s) | |
6 0.001832 0.000031 let left = self.compile(a:node.left) | |
6 0.001467 0.000055 let rlist = map(a:node.rlist, 'self.compile(v:val)') | |
6 0.000023 if !empty(rlist) && rlist[-1] ==# '...' | |
1 0.000003 let rlist[-1] = '. ...' | |
6 0.000006 endif | |
6 0.000012 if empty(rlist) | |
3 0.000076 0.000015 call self.out('(function (%s)', left) | |
3 0.000002 else | |
3 0.000075 0.000020 call self.out('(function (%s %s)', left, join(rlist, ' ')) | |
6 0.000005 endif | |
6 0.000057 0.000026 call self.incindent(' ') | |
6 0.000781 0.000020 call self.compile_body(a:node.body) | |
6 0.000123 0.000021 call self.out(')') | |
6 0.000036 0.000016 call self.decindent() | |
FUNCTION 205_compile_gequalcs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5225 | |
Called 1 time | |
Total time: 0.000558 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000557 0.000007 return printf('(>=# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 203_compile_gequal() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5217 | |
Called 2 times | |
Total time: 0.001142 | |
Self time: 0.000015 | |
count total (s) self (s) | |
2 0.001141 0.000014 return printf('(>= %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 235_compile_dot() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5347 | |
Called 14 times | |
Total time: 0.010587 | |
Self time: 0.000094 | |
count total (s) self (s) | |
14 0.008016 0.000852 return printf('(dot %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 208_compile_smallercs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5237 | |
Called 1 time | |
Total time: 0.000552 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000551 0.000006 return printf('(<# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 110_parse() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3520 | |
Called 205 times | |
Total time: 0.933214 | |
Self time: 0.000897 | |
count total (s) self (s) | |
205 1.356109 0.423792 return self.parse_expr1() | |
FUNCTION 118_parse_expr8() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3898 | |
Called 393 times | |
Total time: 0.843865 | |
Self time: 0.134013 | |
count total (s) self (s) | |
393 0.608194 0.374519 let left = self.parse_expr9() | |
417 0.000567 while s:TRUE | |
417 0.002300 0.001620 let pos = self.reader.tell() | |
417 0.004388 0.001461 let c = self.reader.peek() | |
417 0.134710 0.001710 let token = self.tokenizer.get() | |
417 0.004882 0.002192 if !s:iswhite(c) && token.type == s:TOKEN_SQOPEN | |
6 0.000011 let npos = token.pos | |
6 0.002530 0.000031 if self.tokenizer.peek().type == s:TOKEN_COLON | |
2 0.000044 0.000006 call self.tokenizer.get() | |
2 0.000013 0.000007 let node = s:Node(s:NODE_SLICE) | |
2 0.000004 let node.pos = npos | |
2 0.000004 let node.left = left | |
2 0.000004 let node.rlist = [s:NIL, s:NIL] | |
2 0.000864 0.000009 let token = self.tokenizer.peek() | |
2 0.000004 if token.type !=# s:TOKEN_SQCLOSE | |
1 0.000074 let node.rlist[1] = self.parse_expr1() | |
2 0.000001 endif | |
2 0.000044 0.000007 let token = self.tokenizer.get() | |
2 0.000004 if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
2 0.000002 endif | |
2 0.000004 let left = node | |
4 0.000003 else | |
4 0.000307 let right = self.parse_expr1() | |
4 0.000152 0.000015 if self.tokenizer.peek().type == s:TOKEN_COLON | |
2 0.000042 0.000007 call self.tokenizer.get() | |
2 0.000013 0.000008 let node = s:Node(s:NODE_SLICE) | |
2 0.000004 let node.pos = npos | |
2 0.000003 let node.left = left | |
2 0.000005 let node.rlist = [right, s:NIL] | |
2 0.000864 0.000006 let token = self.tokenizer.peek() | |
2 0.000005 if token.type !=# s:TOKEN_SQCLOSE | |
1 0.000079 let node.rlist[1] = self.parse_expr1() | |
2 0.000002 endif | |
2 0.000044 0.000007 let token = self.tokenizer.get() | |
2 0.000003 if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
2 0.000001 endif | |
2 0.000002 let left = node | |
2 0.000002 else | |
2 0.000013 0.000009 let node = s:Node(s:NODE_SUBSCRIPT) | |
2 0.000004 let node.pos = npos | |
2 0.000003 let node.left = left | |
2 0.000003 let node.right = right | |
2 0.000042 0.000006 let token = self.tokenizer.get() | |
2 0.000003 if token.type !=# s:TOKEN_SQCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
2 0.000001 endif | |
2 0.000002 let left = node | |
4 0.000004 endif | |
6 0.000004 endif | |
6 0.000006 unlet node | |
411 0.000762 elseif token.type == s:TOKEN_POPEN | |
12 0.000104 0.000073 let node = s:Node(s:NODE_CALL) | |
12 0.000025 let node.pos = token.pos | |
12 0.000021 let node.left = left | |
12 0.000020 let node.rlist = [] | |
12 0.005844 0.000056 if self.tokenizer.peek().type == s:TOKEN_PCLOSE | |
7 0.000161 0.000022 call self.tokenizer.get() | |
5 0.000004 else | |
29 0.000032 while s:TRUE | |
29 0.002683 call add(node.rlist, self.parse_expr1()) | |
29 0.000701 0.000110 let token = self.tokenizer.get() | |
29 0.000058 if token.type == s:TOKEN_COMMA | |
" XXX: Vim allows foo(a, b, ). Lint should warn it. | |
26 0.014794 0.000152 if self.tokenizer.peek().type == s:TOKEN_PCLOSE | |
2 0.000048 0.000007 call self.tokenizer.get() | |
2 0.000002 break | |
24 0.000017 endif | |
3 0.000004 elseif token.type == s:TOKEN_PCLOSE | |
3 0.000002 break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
24 0.000015 endif | |
29 0.000022 endwhile | |
12 0.000011 endif | |
12 0.000034 if len(node.rlist) > s:MAX_FUNC_ARGS | |
" TODO: funcname E740: Too many arguments for function: %s | |
1 0.103997 0.103990 throw s:Err('E740: Too many arguments for function', node.pos) | |
11 0.000005 endif | |
11 0.000013 let left = node | |
11 0.000012 unlet node | |
399 0.004506 0.002118 elseif !s:iswhite(c) && token.type == s:TOKEN_DOT " TODO check scriptversion? | |
15 0.004907 0.000079 let node = self.parse_dot(token, left) | |
15 0.000023 if node is# s:NIL | |
4 0.000033 0.000026 call self.reader.seek_set(pos) | |
4 0.000004 break | |
11 0.000008 endif | |
11 0.000015 let left = node | |
11 0.000015 unlet node | |
384 0.000260 else | |
384 0.002309 0.001508 call self.reader.seek_set(pos) | |
384 0.000298 break | |
28 0.000017 endif | |
416 0.002734 endwhile | |
388 0.000431 return left | |
FUNCTION 270_get_token_mlvc() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 6055 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
let cmp = '' | |
if self.reader.p(0) ==# '<' || self.reader.p(0) ==# '>' | |
let cmp = self.reader.get() | |
let r .= cmp | |
endif | |
if self.reader.p(0) ==# "'" | |
let r .= self.reader.get() | |
let c = self.reader.p(0) | |
if self.isend(c) | |
" FIXME: Should be error? Vim allow this. | |
let c = '' | |
else | |
let c = self.reader.get() | |
endif | |
return [a:pre . r . c, '\%' . cmp . "'" . c] | |
elseif s:isdigit(self.reader.p(0)) | |
let d = self.reader.read_digit() | |
let r .= d | |
let c = self.reader.p(0) | |
if c ==# 'l' | |
call self.reader.get() | |
return [a:pre . r . 'l', '\%' . cmp . d . 'l'] | |
elseif c ==# 'c' | |
call self.reader.get() | |
return [a:pre . r . 'c', '\%' . cmp . d . 'c'] | |
elseif c ==# 'v' | |
call self.reader.get() | |
return [a:pre . r . 'v', '\%' . cmp . d . 'v'] | |
endif | |
endif | |
throw s:Err('E71: Invalid character after %', self.reader.getpos()) | |
FUNCTION 99_new() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3127 | |
Called 348 times | |
Total time: 0.006146 | |
Self time: 0.004572 | |
count total (s) self (s) | |
348 0.002063 let obj = copy(self) | |
348 0.003475 0.001901 call call(obj.__init__, a:000, obj) | |
348 0.000385 return obj | |
FUNCTION 91_parse_lvalue() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1894 | |
Called 49 times | |
Total time: 0.109216 | |
Self time: 0.001424 | |
count total (s) self (s) | |
49 0.002319 0.000271 let p = s:LvalueParser.new(self.reader) | |
49 0.105203 0.000208 let node = p.parse() | |
49 0.000102 if node.type == s:NODE_IDENTIFIER | |
45 0.000930 0.000187 if !s:isvarname(node.value) | |
1 0.072482 0.072476 throw s:Err(printf('E461: Illegal variable name: %s', node.value), node.pos) | |
44 0.000041 endif | |
48 0.000032 endif | |
48 0.000263 if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_SLICE || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG | |
48 0.000051 return node | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
FUNCTION 168_compile_excmd() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4961 | |
Called 16 times | |
Total time: 0.000398 | |
Self time: 0.000112 | |
count total (s) self (s) | |
16 0.000391 0.000105 call self.out('(excmd "%s")', escape(a:node.str, '\"')) | |
FUNCTION 48_parse_cmd_lua() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1245 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let lines = [] | |
call self.reader.skip_white() | |
if self.reader.peekn(2) ==# '<<' | |
call self.reader.getn(2) | |
call self.reader.skip_white() | |
let m = self.reader.readline() | |
if m ==# '' | |
let m = '.' | |
endif | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.getn(-1) | |
let lines = [cmdline] | |
call self.reader.get() | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.getn(-1) | |
call add(lines, line) | |
if line ==# m | |
break | |
endif | |
call self.reader.get() | |
endwhile | |
else | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.getn(-1) | |
let lines = [cmdline] | |
endif | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
FUNCTION 32_parse_command() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 729 | |
Called 279 times | |
Total time: 1.862481 | |
Self time: 0.044934 | |
count total (s) self (s) | |
279 0.019967 0.001174 call self.reader.skip_white_and_colon() | |
279 0.004062 0.001413 let self.ea.cmdpos = self.reader.getpos() | |
279 0.027232 0.002174 if self.reader.peekn(1) ==# '' || self.reader.peekn(1) ==# '"' | |
if !empty(self.ea.modifiers) || !empty(self.ea.range) | |
call self.parse_cmd_modifier_range() | |
endif | |
return | |
279 0.000193 endif | |
279 0.359675 0.001431 let self.ea.cmd = self.find_command() | |
279 0.000524 if self.ea.cmd is# s:NIL | |
1 0.000008 0.000005 call self.reader.setpos(self.ea.cmdpos) | |
1 0.023822 0.023659 throw s:Err(printf('E492: Not an editor command: %s', self.reader.peekline()), self.ea.cmdpos) | |
278 0.000208 endif | |
278 0.014827 0.002008 if self.reader.peekn(1) ==# '!' && self.ea.cmd.name !=# 'substitute' && self.ea.cmd.name !=# 'smagic' && self.ea.cmd.name !=# 'snomagic' | |
5 0.000180 0.000023 call self.reader.getn(1) | |
5 0.000012 let self.ea.forceit = s:TRUE | |
273 0.000213 else | |
273 0.000537 let self.ea.forceit = s:FALSE | |
278 0.000192 endif | |
278 0.002269 if self.ea.cmd.flags !~# '\<BANG\>' && self.ea.forceit && self.ea.cmd.flags !~# '\<USERCMD\>' | |
throw s:Err('E477: No ! allowed', self.ea.cmdpos) | |
278 0.000172 endif | |
278 0.000507 if self.ea.cmd.name !=# '!' | |
278 0.034256 0.001125 call self.reader.skip_white() | |
278 0.000196 endif | |
278 0.004131 0.001491 let self.ea.argpos = self.reader.getpos() | |
278 0.001681 if self.ea.cmd.flags =~# '\<ARGOPT\>' | |
1 0.000087 0.000005 call self.parse_argopt() | |
278 0.000196 endif | |
278 0.000777 if self.ea.cmd.name ==# 'write' || self.ea.cmd.name ==# 'update' | |
if self.reader.p(0) ==# '>' | |
if self.reader.p(1) !=# '>' | |
throw s:Err('E494: Use w or w>>', self.ea.cmdpos) | |
endif | |
call self.reader.seek_cur(2) | |
call self.reader.skip_white() | |
let self.ea.append = 1 | |
elseif self.reader.peekn(1) ==# '!' && self.ea.cmd.name ==# 'write' | |
call self.reader.getn(1) | |
let self.ea.usefilter = s:TRUE | |
endif | |
278 0.000175 endif | |
278 0.000499 if self.ea.cmd.name ==# 'read' | |
if self.ea.forceit | |
let self.ea.usefilter = s:TRUE | |
let self.ea.forceit = s:FALSE | |
elseif self.reader.peekn(1) ==# '!' | |
call self.reader.getn(1) | |
let self.ea.usefilter = s:TRUE | |
endif | |
278 0.000152 endif | |
278 0.000679 if self.ea.cmd.name ==# '<' || self.ea.cmd.name ==# '>' | |
let self.ea.amount = 1 | |
while self.reader.peekn(1) ==# self.ea.cmd.name | |
call self.reader.getn(1) | |
let self.ea.amount += 1 | |
endwhile | |
call self.reader.skip_white() | |
278 0.000174 endif | |
278 0.002134 if self.ea.cmd.flags =~# '\<EDITCMD\>' && !self.ea.usefilter | |
1 0.000071 0.000004 call self.parse_argcmd() | |
278 0.000177 endif | |
278 1.800750 0.437009 call self._parse_command(self.ea.cmd.parser) | |
FUNCTION 84_parse_cmd_echohl() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1831 | |
Called 1 time | |
Total time: 0.000170 | |
Self time: 0.000065 | |
count total (s) self (s) | |
1 0.000008 0.000006 let node = s:Node(s:NODE_ECHOHL) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.000002 let node.str = '' | |
6 0.000085 0.000023 while !self.ends_excmds(self.reader.peek()) | |
5 0.000055 0.000018 let node.str .= self.reader.get() | |
6 0.000004 endwhile | |
1 0.000007 0.000003 call self.add_node(node) | |
FUNCTION 88_parse_expr() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1866 | |
Called 205 times | |
Total time: 0.946120 | |
Self time: 0.004166 | |
count total (s) self (s) | |
205 1.368424 0.426470 return s:ExprParser.new(self.reader).parse() | |
FUNCTION 145_read_alpha() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4592 | |
Called 618 times | |
Total time: 0.327196 | |
Self time: 0.048025 | |
count total (s) self (s) | |
618 0.000783 let r = '' | |
3735 0.212125 0.023286 while s:isalpha(self.peekn(1)) | |
3117 0.106473 0.016141 let r .= self.getn(1) | |
3735 0.004333 endwhile | |
618 0.000712 return r | |
FUNCTION 163_decindent() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4743 | |
Called 22 times | |
Total time: 0.000069 | |
Self time: 0.000069 | |
count total (s) self (s) | |
22 0.000061 call remove(self.indent, 0) | |
FUNCTION 248_compile_curlynameexpr() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5414 | |
Called 12 times | |
Total time: 0.006590 | |
Self time: 0.000049 | |
count total (s) self (s) | |
12 0.005106 0.001809 return '{' . self.compile(a:node.value) . '}' | |
FUNCTION 138_peekn() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4536 | |
Called 15932 times | |
Total time: 0.732700 | |
Self time: 0.206241 | |
count total (s) self (s) | |
15932 0.083732 0.058194 let pos = self.tell() | |
15932 0.537906 0.066289 let r = self.getn(a:n) | |
15932 0.082303 0.052999 call self.seek_set(pos) | |
15932 0.016987 return r | |
FUNCTION 109___init__() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3515 | |
Called 290 times | |
Total time: 0.007486 | |
Self time: 0.002462 | |
count total (s) self (s) | |
290 0.000722 let self.reader = a:reader | |
290 0.006635 0.001611 let self.tokenizer = s:ExprTokenizer.new(a:reader) | |
FUNCTION 44_skip_vimgrep_pat() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1181 | |
Called 1 time | |
Total time: 0.000766 | |
Self time: 0.000049 | |
count total (s) self (s) | |
1 0.000069 0.000004 if self.reader.peekn(1) ==# '' | |
" pass | |
1 0.000065 0.000007 elseif s:isidc(self.reader.peekn(1)) | |
" :vimgrep pattern fname | |
call self.reader.read_nonwhite() | |
1 0.000001 else | |
" :vimgrep /pattern/[g][j] fname | |
1 0.000038 0.000005 let c = self.reader.getn(1) | |
1 0.000553 0.000008 let [_, endc] = self.parse_pattern(c) | |
1 0.000001 if c !=# endc | |
return | |
1 0.000001 endif | |
1 0.000024 0.000008 while self.reader.p(0) ==# 'g' || self.reader.p(0) ==# 'j' | |
call self.reader.getn(1) | |
1 0.000001 endwhile | |
1 0.000000 endif | |
FUNCTION <SNR>45_isxdigit() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 230 | |
Called 18 times | |
Total time: 0.000105 | |
Self time: 0.000105 | |
count total (s) self (s) | |
18 0.000095 return a:c =~# '^[0-9A-Fa-f]$' | |
FUNCTION 211_compile_sequalcs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5249 | |
Called 1 time | |
Total time: 0.000558 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000558 0.000009 return printf('(<=# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 212_compile_match() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5253 | |
Called 1 time | |
Total time: 0.000558 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000557 0.000008 return printf('(=~ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 98_parse_cmd_syntax() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 2043 | |
Called 7 times | |
Total time: 0.018349 | |
Self time: 0.003832 | |
count total (s) self (s) | |
7 0.000099 0.000039 let end = self.reader.getpos() | |
130 0.000119 while s:TRUE | |
130 0.001485 0.000521 let end = self.reader.getpos() | |
130 0.001238 0.000419 let c = self.reader.peek() | |
130 0.000296 if c ==# '/' || c ==# "'" || c ==# '"' | |
2 0.000060 0.000006 call self.reader.getn(1) | |
2 0.002816 0.000010 call self.parse_pattern(c) | |
128 0.000153 elseif c ==# '=' | |
5 0.000153 0.000016 call self.reader.getn(1) | |
5 0.002510 0.000023 call self.parse_pattern(' ') | |
123 0.000866 0.000392 elseif self.ends_excmds(c) | |
7 0.000006 break | |
123 0.000070 endif | |
123 0.003892 0.000426 call self.reader.getn(1) | |
130 0.000123 endwhile | |
7 0.000047 0.000030 let node = s:Node(s:NODE_EXCMD) | |
7 0.000018 let node.pos = self.ea.cmdpos | |
7 0.000014 let node.ea = self.ea | |
7 0.003241 0.000041 let node.str = self.reader.getstr(self.ea.linepos, end) | |
7 0.000058 0.000025 call self.add_node(node) | |
FUNCTION 89_parse_exprlist() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1870 | |
Called 144 times | |
Total time: 0.735355 | |
Self time: 0.006962 | |
count total (s) self (s) | |
144 0.000218 let list = [] | |
296 0.000369 while s:TRUE | |
296 0.018537 0.001016 call self.reader.skip_white() | |
296 0.003402 0.001261 let c = self.reader.peek() | |
296 0.002587 0.001341 if c !=# '"' && self.ends_excmds(c) | |
139 0.000117 break | |
157 0.000096 endif | |
157 1.697339 0.989854 let node = self.parse_expr() | |
152 0.000439 call add(list, node) | |
291 0.000339 endwhile | |
139 0.000134 return list | |
FUNCTION 227_compile_multiply() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5313 | |
Called 2 times | |
Total time: 0.001209 | |
Self time: 0.000022 | |
count total (s) self (s) | |
2 0.001208 0.000021 return printf('(* %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 184_compile_throw() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5136 | |
Called 1 time | |
Total time: 0.000283 | |
Self time: 0.000005 | |
count total (s) self (s) | |
1 0.000283 0.000005 call self.out('(throw %s)', self.compile(a:node.left)) | |
FUNCTION 76_parse_cmd_break() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1734 | |
Called 1 time | |
Total time: 0.000042 | |
Self time: 0.000028 | |
count total (s) self (s) | |
1 0.000014 0.000006 if self.find_context(s:NODE_WHILE) == -1 && self.find_context(s:NODE_FOR) == -1 | |
throw s:Err('E587: :break without :while or :for', self.ea.cmdpos) | |
1 0.000000 endif | |
1 0.000006 0.000004 let node = s:Node(s:NODE_BREAK) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.000013 0.000009 call self.add_node(node) | |
FUNCTION 174_compile_const() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5014 | |
Called 3 times | |
Total time: 0.004195 | |
Self time: 0.000097 | |
count total (s) self (s) | |
3 0.000003 let left = '' | |
3 0.000005 if a:node.left isnot# s:NIL | |
1 0.000276 0.000003 let left = self.compile(a:node.left) | |
2 0.000001 else | |
2 0.001113 0.000022 let left = join(map(a:node.list, 'self.compile(v:val)'), ' ') | |
2 0.000004 if a:node.rest isnot# s:NIL | |
1 0.000278 0.000005 let left .= ' . ' . self.compile(a:node.rest) | |
2 0.000002 endif | |
2 0.000004 let left = '(' . left . ')' | |
3 0.000000 endif | |
3 0.002423 0.000012 let right = self.compile(a:node.right) | |
3 0.000067 0.000017 call self.out('(const %s %s %s)', a:node.op, left, right) | |
FUNCTION 209_compile_sequal() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5241 | |
Called 1 time | |
Total time: 0.000557 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000557 0.000008 return printf('(<= %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 242_compile_option() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5390 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return a:node.value | |
FUNCTION 214_compile_matchcs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5261 | |
Called 1 time | |
Total time: 0.000557 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000557 0.000009 return printf('(=~# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 57_parse_cmd_function() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1318 | |
Called 26 times | |
Total time: 0.125737 | |
Self time: 0.008666 | |
count total (s) self (s) | |
26 0.000161 0.000112 let pos = self.reader.tell() | |
26 0.001875 0.000082 call self.reader.skip_white() | |
" :function | |
26 0.000476 0.000154 if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
26 0.000019 endif | |
" :function /pattern | |
26 0.001354 0.000117 if self.reader.peekn(1) ==# '/' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
26 0.000016 endif | |
26 0.058944 0.000426 let left = self.parse_lvalue_func() | |
26 0.001929 0.000098 call self.reader.skip_white() | |
26 0.000055 if left.type == s:NODE_IDENTIFIER | |
23 0.000047 let s = left.value | |
23 0.000207 let ss = split(s, '\zs') | |
23 0.000404 0.000255 if ss[0] !=# '<' && !s:isupper(ss[0]) && stridx(s, ':') == -1 && stridx(s, '#') == -1 | |
1 0.189851 0.189845 throw s:Err(printf('E128: Function name must start with a capital or contain a colon: %s', s), left.pos) | |
22 0.000018 endif | |
25 0.000016 endif | |
" :function {name} | |
25 0.001455 0.000142 if self.reader.peekn(1) !=# '(' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
25 0.000017 endif | |
" :function[!] {name}([arguments]) [range] [abort] [dict] [closure] | |
25 0.000236 0.000160 let node = s:Node(s:NODE_FUNCTION) | |
25 0.000066 let node.pos = self.ea.cmdpos | |
25 0.000045 let node.body = [] | |
25 0.000045 let node.ea = self.ea | |
25 0.000041 let node.left = left | |
25 0.000039 let node.rlist = [] | |
25 0.000105 let node.attr = {'range': 0, 'abort': 0, 'dict': 0, 'closure': 0} | |
25 0.000053 let node.endfunction = s:NIL | |
25 0.000879 0.000101 call self.reader.getn(1) | |
25 0.000610 0.000134 let tokenizer = s:ExprTokenizer.new(self.reader) | |
25 0.014577 0.000122 if tokenizer.peek().type == s:TOKEN_PCLOSE | |
8 0.000205 0.000030 call tokenizer.get() | |
17 0.000015 else | |
17 0.000029 let named = {} | |
34 0.000049 while s:TRUE | |
34 0.000263 0.000171 let varnode = s:Node(s:NODE_IDENTIFIER) | |
34 0.000993 0.000163 let token = tokenizer.get() | |
34 0.000080 if token.type == s:TOKEN_IDENTIFIER | |
33 0.000460 0.000227 if !s:isargname(token.value) || token.value ==# 'firstline' || token.value ==# 'lastline' | |
3 0.087656 0.087636 throw s:Err(printf('E125: Illegal argument: %s', token.value), token.pos) | |
30 0.000095 elseif has_key(named, token.value) | |
1 0.030277 0.030270 throw s:Err(printf('E853: Duplicate argument name: %s', token.value), token.pos) | |
29 0.000020 endif | |
29 0.000081 let named[token.value] = 1 | |
29 0.000068 let varnode.pos = token.pos | |
29 0.000061 let varnode.value = token.value | |
29 0.000087 call add(node.rlist, varnode) | |
" XXX: Vim doesn't skip white space before comma. F(a ,b) => E475 | |
29 0.003602 0.000320 if s:iswhite(self.reader.p(0)) && tokenizer.peek().type == s:TOKEN_COMMA | |
1 0.133389 0.133373 throw s:Err('E475: Invalid argument: White space is not allowed before comma', self.reader.getpos()) | |
28 0.000019 endif | |
28 0.013275 0.000127 let token = tokenizer.get() | |
28 0.000059 if token.type == s:TOKEN_COMMA | |
" XXX: Vim allows last comma. F(a, b, ) => OK | |
19 0.011821 0.000111 if tokenizer.peek().type == s:TOKEN_PCLOSE | |
2 0.000049 0.000006 call tokenizer.get() | |
2 0.000003 break | |
17 0.000013 endif | |
9 0.000016 elseif token.type == s:TOKEN_PCLOSE | |
9 0.000005 break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
17 0.000014 endif | |
1 0.000003 elseif token.type == s:TOKEN_DOTDOTDOT | |
1 0.000002 let varnode.pos = token.pos | |
1 0.000003 let varnode.value = token.value | |
1 0.000003 call add(node.rlist, varnode) | |
1 0.000591 0.000004 let token = tokenizer.get() | |
1 0.000003 if token.type == s:TOKEN_PCLOSE | |
1 0.000001 break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
17 0.000013 endif | |
29 0.000059 endwhile | |
20 0.000016 endif | |
25 0.000029 while s:TRUE | |
25 0.001893 0.000090 call self.reader.skip_white() | |
25 0.000361 0.000128 let epos = self.reader.getpos() | |
25 0.003878 0.000152 let key = self.reader.read_alpha() | |
25 0.000035 if key ==# '' | |
20 0.000015 break | |
5 0.000008 elseif key ==# 'range' | |
1 0.000002 let node.attr.range = s:TRUE | |
4 0.000004 elseif key ==# 'abort' | |
2 0.000003 let node.attr.abort = s:TRUE | |
2 0.000003 elseif key ==# 'dict' | |
1 0.000002 let node.attr.dict = s:TRUE | |
1 0.000002 elseif key ==# 'closure' | |
1 0.000002 let node.attr.closure = s:TRUE | |
else | |
throw s:Err(printf('unexpected token: %s', key), epos) | |
5 0.000005 endif | |
25 0.000043 endwhile | |
20 0.000172 0.000077 call self.add_node(node) | |
20 0.000138 0.000070 call self.push_context(node) | |
FUNCTION 166_compile_toplevel() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4952 | |
Called 28 times | |
Total time: 0.168629 | |
Self time: 0.000176 | |
count total (s) self (s) | |
28 0.168575 0.000122 call self.compile_body(a:node.body) | |
28 0.000043 return self.lines | |
FUNCTION 250_new() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5431 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
FUNCTION 120_parse_dict_literal_key() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4213 | |
Called 9 times | |
Total time: 0.002600 | |
Self time: 0.000155 | |
count total (s) self (s) | |
9 0.000058 0.000038 let node = s:Node(s:NODE_STRING) | |
9 0.000052 0.000043 let node.pos = self.reader.tell() | |
9 0.002472 0.000056 let node.value = "'" . self.tokenizer.get_dict_literal_key() . "'" | |
9 0.000010 return node | |
FUNCTION 70_parse_cmd_endif() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1655 | |
Called 4 times | |
Total time: 0.000161 | |
Self time: 0.000130 | |
count total (s) self (s) | |
4 0.000024 if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF && self.context[0].type !=# s:NODE_ELSE | |
throw s:Err('E580: :endif without :if', self.ea.cmdpos) | |
4 0.000004 endif | |
4 0.000009 if self.context[0].type !=# s:NODE_IF | |
1 0.000007 0.000003 call self.pop_context() | |
4 0.000002 endif | |
4 0.000037 0.000024 let node = s:Node(s:NODE_ENDIF) | |
4 0.000011 let node.pos = self.ea.cmdpos | |
4 0.000006 let node.ea = self.ea | |
4 0.000011 let self.context[0].endif = node | |
4 0.000027 0.000013 call self.pop_context() | |
FUNCTION 23_check_missing_endif() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 467 | |
Called 48 times | |
Total time: 0.000487 | |
Self time: 0.000487 | |
count total (s) self (s) | |
48 0.000276 if self.context[0].type == s:NODE_IF || self.context[0].type == s:NODE_ELSEIF || self.context[0].type == s:NODE_ELSE | |
throw s:Err(printf('E171: Missing :endif: %s', a:ends), a:pos) | |
48 0.000032 endif | |
FUNCTION 200_compile_greater() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5205 | |
Called 1 time | |
Total time: 0.000552 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000552 0.000008 return printf('(> %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION <SNR>45_isalpha() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 214 | |
Called 3735 times | |
Total time: 0.020987 | |
Self time: 0.020987 | |
count total (s) self (s) | |
3735 0.019666 return a:c =~# '^[A-Za-z]$' | |
FUNCTION 178_compile_if() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5052 | |
Called 4 times | |
Total time: 0.003200 | |
Self time: 0.000232 | |
count total (s) self (s) | |
4 0.001234 0.000029 call self.out('(if %s', self.compile(a:node.cond)) | |
4 0.000033 0.000014 call self.incindent(' ') | |
4 0.000571 0.000021 call self.compile_body(a:node.body) | |
4 0.000025 0.000013 call self.decindent() | |
5 0.000010 for enode in a:node.elseif | |
1 0.000278 0.000006 call self.out(' elseif %s', self.compile(enode.cond)) | |
1 0.000007 0.000003 call self.incindent(' ') | |
1 0.000387 0.000003 call self.compile_body(enode.body) | |
1 0.000005 0.000002 call self.decindent() | |
5 0.000004 endfor | |
4 0.000007 if a:node.else isnot# s:NIL | |
1 0.000019 0.000003 call self.out(' else') | |
1 0.000006 0.000002 call self.incindent(' ') | |
1 0.000397 0.000003 call self.compile_body(a:node.else.body) | |
1 0.000005 0.000002 call self.decindent() | |
4 0.000003 endif | |
4 0.000031 0.000013 call self.incindent(' ') | |
4 0.000084 0.000013 call self.out(')') | |
4 0.000031 0.000018 call self.decindent() | |
FUNCTION 35_parse_hashbang() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 983 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.reader.getn(-1) | |
FUNCTION 97_parse_wincmd() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 2020 | |
Called 1 time | |
Total time: 0.000410 | |
Self time: 0.000064 | |
count total (s) self (s) | |
1 0.000041 0.000006 let c = self.reader.getn(1) | |
1 0.000001 if c ==# '' | |
throw s:Err('E471: Argument required', self.reader.getpos()) | |
1 0.000003 elseif c ==# 'g' || c ==# "\x07" " <C-G> | |
let c2 = self.reader.getn(1) | |
if c2 ==# '' || s:iswhite(c2) | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
endif | |
1 0.000000 endif | |
1 0.000014 0.000004 let end = self.reader.getpos() | |
1 0.000152 0.000004 call self.reader.skip_white() | |
1 0.000018 0.000006 if !self.ends_excmds(self.reader.peek()) | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
1 0.000001 endif | |
1 0.000008 0.000005 let node = s:Node(s:NODE_EXCMD) | |
1 0.000003 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.000138 0.000006 let node.str = self.reader.getstr(self.ea.linepos, end) | |
1 0.000009 0.000003 call self.add_node(node) | |
FUNCTION 156_read_name() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4690 | |
Called 582 times | |
Total time: 0.129096 | |
Self time: 0.019653 | |
count total (s) self (s) | |
582 0.000757 let r = '' | |
1528 0.090555 0.009728 while s:isnamec(self.peekn(1)) | |
946 0.033740 0.005124 let r .= self.getn(1) | |
1528 0.001394 endwhile | |
582 0.000622 return r | |
FUNCTION 39_parse_comment() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1060 | |
Called 8 times | |
Total time: 0.002546 | |
Self time: 0.000287 | |
count total (s) self (s) | |
8 0.000124 0.000040 let npos = self.reader.getpos() | |
8 0.000114 0.000033 let c = self.reader.get() | |
8 0.000013 if c !=# '"' | |
throw s:Err(printf('unexpected character: %s', c), npos) | |
8 0.000005 endif | |
8 0.000063 0.000039 let node = s:Node(s:NODE_COMMENT) | |
8 0.000018 let node.pos = npos | |
8 0.002078 0.000049 let node.str = self.reader.getn(-1) | |
8 0.000079 0.000038 call self.add_node(node) | |
FUNCTION 249_compile_lambda() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5418 | |
Called 6 times | |
Total time: 0.004956 | |
Self time: 0.000100 | |
count total (s) self (s) | |
6 0.001772 0.000041 let rlist = map(a:node.rlist, 'self.compile(v:val)') | |
6 0.003181 0.000056 return printf('(lambda (%s) %s)', join(rlist, ' '), self.compile(a:node.left)) | |
FUNCTION 251___init__() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5437 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let self.reader = a:reader | |
let self.cmd = a:cmd | |
let self.delim = a:delim | |
let self.reg_magic = self.RE_MAGIC | |
FUNCTION 51_parse_cmd_python() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1290 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_lua() | |
FUNCTION 122_parse_concat() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4248 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if a:left.type !=# s:NODE_IDENTIFIER && a:left.type !=# s:NODE_CURLYNAME && a:left.type !=# s:NODE_DICT && a:left.type !=# s:NODE_SUBSCRIPT && a:left.type !=# s:NODE_CALL && a:left.type !=# s:NODE_DOT | |
return s:NIL | |
endif | |
if !s:iswordc(self.reader.p(0)) | |
return s:NIL | |
endif | |
let pos = self.reader.getpos() | |
let name = self.reader.read_word() | |
if s:isnamec(self.reader.p(0)) | |
" XXX: foo is str => ok, foo is obj => invalid expression | |
" foo.s:bar or foo.bar#baz | |
return s:NIL | |
endif | |
let node = s:Node(s:NODE_CONCAT) | |
let node.pos = a:token.pos | |
let node.left = a:left | |
let node.right = s:Node(s:NODE_IDENTIFIER) | |
let node.right.pos = pos | |
let node.right.value = name | |
return node | |
FUNCTION 114_parse_expr4() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3601 | |
Called 345 times | |
Total time: 1.173702 | |
Self time: 0.070662 | |
count total (s) self (s) | |
345 0.987771 0.441062 let left = self.parse_expr5() | |
339 0.001741 0.001258 let pos = self.reader.tell() | |
339 0.008173 0.001244 let token = self.tokenizer.get() | |
339 0.000629 if token.type == s:TOKEN_EQEQ | |
1 0.000006 0.000003 let node = s:Node(s:NODE_EQUAL) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001734 0.000004 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
338 0.000637 elseif token.type == s:TOKEN_EQEQCI | |
1 0.000006 0.000004 let node = s:Node(s:NODE_EQUALCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001904 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
337 0.000572 elseif token.type == s:TOKEN_EQEQCS | |
1 0.000006 0.000003 let node = s:Node(s:NODE_EQUALCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001753 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
336 0.000513 elseif token.type == s:TOKEN_NEQ | |
1 0.000006 0.000004 let node = s:Node(s:NODE_NEQUAL) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001740 0.000004 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
335 0.000495 elseif token.type == s:TOKEN_NEQCI | |
1 0.000006 0.000004 let node = s:Node(s:NODE_NEQUALCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001733 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
334 0.000482 elseif token.type == s:TOKEN_NEQCS | |
1 0.000006 0.000004 let node = s:Node(s:NODE_NEQUALCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001737 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
333 0.000516 elseif token.type == s:TOKEN_GT | |
1 0.000006 0.000004 let node = s:Node(s:NODE_GREATER) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001971 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
332 0.000513 elseif token.type == s:TOKEN_GTCI | |
1 0.000006 0.000003 let node = s:Node(s:NODE_GREATERCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001698 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
331 0.000491 elseif token.type == s:TOKEN_GTCS | |
1 0.000006 0.000004 let node = s:Node(s:NODE_GREATERCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001699 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
330 0.000455 elseif token.type == s:TOKEN_GTEQ | |
2 0.000013 0.000008 let node = s:Node(s:NODE_GEQUAL) | |
2 0.000004 let node.pos = token.pos | |
2 0.000004 let node.left = left | |
2 0.004481 0.000009 let node.right = self.parse_expr5() | |
2 0.000002 let left = node | |
328 0.000493 elseif token.type == s:TOKEN_GTEQCI | |
1 0.000006 0.000004 let node = s:Node(s:NODE_GEQUALCI) | |
1 0.000001 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001735 0.000004 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
327 0.000478 elseif token.type == s:TOKEN_GTEQCS | |
1 0.000006 0.000003 let node = s:Node(s:NODE_GEQUALCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001738 0.000004 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
326 0.000456 elseif token.type == s:TOKEN_LT | |
1 0.000006 0.000003 let node = s:Node(s:NODE_SMALLER) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001834 0.000004 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
325 0.000451 elseif token.type == s:TOKEN_LTCI | |
1 0.000006 0.000003 let node = s:Node(s:NODE_SMALLERCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001698 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
324 0.000471 elseif token.type == s:TOKEN_LTCS | |
1 0.000009 0.000004 let node = s:Node(s:NODE_SMALLERCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001768 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
323 0.000443 elseif token.type == s:TOKEN_LTEQ | |
1 0.000006 0.000003 let node = s:Node(s:NODE_SEQUAL) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001706 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
322 0.000477 elseif token.type == s:TOKEN_LTEQCI | |
1 0.000006 0.000003 let node = s:Node(s:NODE_SEQUALCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001698 0.000003 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
321 0.000465 elseif token.type == s:TOKEN_LTEQCS | |
1 0.000006 0.000003 let node = s:Node(s:NODE_SEQUALCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001695 0.000003 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
320 0.000450 elseif token.type == s:TOKEN_MATCH | |
1 0.000006 0.000003 let node = s:Node(s:NODE_MATCH) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001819 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
319 0.000516 elseif token.type == s:TOKEN_MATCHCI | |
1 0.000007 0.000004 let node = s:Node(s:NODE_MATCHCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001699 0.000003 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
318 0.000487 elseif token.type == s:TOKEN_MATCHCS | |
1 0.000006 0.000003 let node = s:Node(s:NODE_MATCHCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001690 0.000003 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
317 0.000479 elseif token.type == s:TOKEN_NOMATCH | |
1 0.000007 0.000004 let node = s:Node(s:NODE_NOMATCH) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001801 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
316 0.000525 elseif token.type == s:TOKEN_NOMATCHCI | |
1 0.000007 0.000004 let node = s:Node(s:NODE_NOMATCHCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001709 0.000005 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
315 0.000548 elseif token.type == s:TOKEN_NOMATCHCS | |
1 0.000006 0.000004 let node = s:Node(s:NODE_NOMATCHCS) | |
1 0.000001 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001711 0.000005 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
314 0.000423 elseif token.type == s:TOKEN_IS | |
1 0.000008 0.000005 let node = s:Node(s:NODE_IS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.002089 0.000005 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
313 0.000448 elseif token.type == s:TOKEN_ISCI | |
1 0.000007 0.000005 let node = s:Node(s:NODE_ISCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001762 0.000005 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
312 0.000440 elseif token.type == s:TOKEN_ISCS | |
1 0.000006 0.000003 let node = s:Node(s:NODE_ISCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001756 0.000005 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
311 0.000454 elseif token.type == s:TOKEN_ISNOT | |
1 0.000006 0.000003 let node = s:Node(s:NODE_ISNOT) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001749 0.000004 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
310 0.000468 elseif token.type == s:TOKEN_ISNOTCI | |
1 0.000007 0.000005 let node = s:Node(s:NODE_ISNOTCI) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001750 0.000005 let node.right = self.parse_expr5() | |
1 0.000001 let left = node | |
309 0.000488 elseif token.type == s:TOKEN_ISNOTCS | |
1 0.000007 0.000005 let node = s:Node(s:NODE_ISNOTCS) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001782 0.000004 let node.right = self.parse_expr5() | |
1 0.000002 let left = node | |
308 0.000227 else | |
308 0.001596 0.001029 call self.reader.seek_set(pos) | |
339 0.000234 endif | |
339 0.000343 return left | |
FUNCTION 42_parse_cmd_common() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1099 | |
Called 8 times | |
Total time: 0.015852 | |
Self time: 0.000773 | |
count total (s) self (s) | |
8 0.000116 0.000041 let end = self.reader.getpos() | |
8 0.000065 if self.ea.cmd.flags =~# '\<TRLBAR\>' && !self.ea.usefilter | |
4 0.012279 0.000023 let end = self.separate_nextcmd() | |
4 0.000019 elseif self.ea.cmd.name ==# '!' || self.ea.cmd.name ==# 'global' || self.ea.cmd.name ==# 'vglobal' || self.ea.usefilter | |
while s:TRUE | |
let end = self.reader.getpos() | |
if self.reader.getn(1) ==# '' | |
break | |
endif | |
endwhile | |
4 0.000003 else | |
27 0.000027 while s:TRUE | |
27 0.000317 0.000115 let end = self.reader.getpos() | |
27 0.000818 0.000093 if self.reader.getn(1) ==# '' | |
4 0.000004 break | |
23 0.000011 endif | |
27 0.000032 endwhile | |
8 0.000005 endif | |
8 0.000063 0.000040 let node = s:Node(s:NODE_EXCMD) | |
8 0.000021 let node.pos = self.ea.cmdpos | |
8 0.000015 let node.ea = self.ea | |
8 0.001809 0.000047 let node.str = self.reader.getstr(self.ea.linepos, end) | |
8 0.000075 0.000039 call self.add_node(node) | |
FUNCTION 224_compile_add() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5301 | |
Called 4 times | |
Total time: 0.002177 | |
Self time: 0.000034 | |
count total (s) self (s) | |
4 0.002173 0.000030 return printf('(+ %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 186_compile_echon() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5145 | |
Called 1 time | |
Total time: 0.000496 | |
Self time: 0.000016 | |
count total (s) self (s) | |
1 0.000468 0.000009 let list = map(a:node.list, 'self.compile(v:val)') | |
1 0.000028 0.000007 call self.out('(echon %s)', join(list, ' ')) | |
FUNCTION 33__parse_command() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 810 | |
Called 278 times | |
Total time: 1.363741 | |
Self time: 0.040374 | |
count total (s) self (s) | |
278 0.000608 if a:parser ==# 'parse_cmd_append' | |
call self.parse_cmd_append() | |
278 0.000527 elseif a:parser ==# 'parse_cmd_break' | |
1 0.000045 0.000003 call self.parse_cmd_break() | |
277 0.000462 elseif a:parser ==# 'parse_cmd_call' | |
7 0.122923 0.022999 call self.parse_cmd_call() | |
270 0.000449 elseif a:parser ==# 'parse_cmd_catch' | |
2 0.000513 0.000005 call self.parse_cmd_catch() | |
268 0.000442 elseif a:parser ==# 'parse_cmd_common' | |
6 0.014416 0.000036 call self.parse_cmd_common() | |
262 0.000434 elseif a:parser ==# 'parse_cmd_continue' | |
1 0.000046 0.000009 call self.parse_cmd_continue() | |
261 0.000428 elseif a:parser ==# 'parse_cmd_delfunction' | |
3 0.004973 0.000016 call self.parse_cmd_delfunction() | |
258 0.000391 elseif a:parser ==# 'parse_cmd_echo' | |
140 0.857174 0.128476 call self.parse_cmd_echo() | |
118 0.000201 elseif a:parser ==# 'parse_cmd_echoerr' | |
1 0.002434 0.000004 call self.parse_cmd_echoerr() | |
117 0.000178 elseif a:parser ==# 'parse_cmd_echohl' | |
1 0.000173 0.000003 call self.parse_cmd_echohl() | |
116 0.000182 elseif a:parser ==# 'parse_cmd_echomsg' | |
1 0.002446 0.000003 call self.parse_cmd_echomsg() | |
115 0.000183 elseif a:parser ==# 'parse_cmd_echon' | |
1 0.002480 0.000004 call self.parse_cmd_echon() | |
114 0.000188 elseif a:parser ==# 'parse_cmd_else' | |
1 0.000062 0.000004 call self.parse_cmd_else() | |
113 0.000183 elseif a:parser ==# 'parse_cmd_elseif' | |
1 0.001719 0.000004 call self.parse_cmd_elseif() | |
112 0.000175 elseif a:parser ==# 'parse_cmd_endfor' | |
1 0.000030 0.000003 call self.parse_cmd_endfor() | |
111 0.000185 elseif a:parser ==# 'parse_cmd_endfunction' | |
20 0.002096 0.000064 call self.parse_cmd_endfunction() | |
91 0.000138 elseif a:parser ==# 'parse_cmd_endif' | |
4 0.000177 0.000016 call self.parse_cmd_endif() | |
87 0.000140 elseif a:parser ==# 'parse_cmd_endtry' | |
1 0.000041 0.000002 call self.parse_cmd_endtry() | |
86 0.000145 elseif a:parser ==# 'parse_cmd_endwhile' | |
1 0.000031 0.000003 call self.parse_cmd_endwhile() | |
85 0.000136 elseif a:parser ==# 'parse_cmd_execute' | |
1 0.002825 0.000004 call self.parse_cmd_execute() | |
84 0.000126 elseif a:parser ==# 'parse_cmd_finally' | |
1 0.000044 0.000003 call self.parse_cmd_finally() | |
83 0.000125 elseif a:parser ==# 'parse_cmd_finish' | |
call self.parse_cmd_finish() | |
83 0.000136 elseif a:parser ==# 'parse_cmd_for' | |
1 0.010144 0.000005 call self.parse_cmd_for() | |
82 0.000145 elseif a:parser ==# 'parse_cmd_function' | |
26 0.291103 0.165366 call self.parse_cmd_function() | |
56 0.000087 elseif a:parser ==# 'parse_cmd_if' | |
4 0.009513 0.000012 call self.parse_cmd_if() | |
52 0.000081 elseif a:parser ==# 'parse_cmd_insert' | |
call self.parse_cmd_insert() | |
52 0.000076 elseif a:parser ==# 'parse_cmd_let' | |
23 0.221305 0.023992 call self.parse_cmd_let() | |
29 0.000048 elseif a:parser ==# 'parse_cmd_const' | |
9 0.213364 0.155616 call self.parse_cmd_const() | |
20 0.000034 elseif a:parser ==# 'parse_cmd_loadkeymap' | |
call self.parse_cmd_loadkeymap() | |
20 0.000029 elseif a:parser ==# 'parse_cmd_lockvar' | |
2 0.012485 0.000006 call self.parse_cmd_lockvar() | |
18 0.000026 elseif a:parser ==# 'parse_cmd_lua' | |
call self.parse_cmd_lua() | |
18 0.000031 elseif a:parser ==# 'parse_cmd_modifier_range' | |
call self.parse_cmd_modifier_range() | |
18 0.000027 elseif a:parser ==# 'parse_cmd_mzscheme' | |
call self.parse_cmd_mzscheme() | |
18 0.000026 elseif a:parser ==# 'parse_cmd_perl' | |
call self.parse_cmd_perl() | |
18 0.000030 elseif a:parser ==# 'parse_cmd_python' | |
call self.parse_cmd_python() | |
18 0.000030 elseif a:parser ==# 'parse_cmd_python3' | |
call self.parse_cmd_python3() | |
18 0.000027 elseif a:parser ==# 'parse_cmd_return' | |
2 0.005089 0.000010 call self.parse_cmd_return() | |
16 0.000022 elseif a:parser ==# 'parse_cmd_ruby' | |
call self.parse_cmd_ruby() | |
16 0.000026 elseif a:parser ==# 'parse_cmd_tcl' | |
call self.parse_cmd_tcl() | |
16 0.000026 elseif a:parser ==# 'parse_cmd_throw' | |
1 0.002265 0.000003 call self.parse_cmd_throw() | |
15 0.000023 elseif a:parser ==# 'parse_cmd_try' | |
1 0.000037 0.000004 call self.parse_cmd_try() | |
14 0.000021 elseif a:parser ==# 'parse_cmd_unlet' | |
1 0.005931 0.000003 call self.parse_cmd_unlet() | |
13 0.000019 elseif a:parser ==# 'parse_cmd_unlockvar' | |
2 0.012195 0.000007 call self.parse_cmd_unlockvar() | |
11 0.000020 elseif a:parser ==# 'parse_cmd_usercmd' | |
2 0.001490 0.000006 call self.parse_cmd_usercmd() | |
9 0.000011 elseif a:parser ==# 'parse_cmd_while' | |
1 0.001734 0.000004 call self.parse_cmd_while() | |
8 0.000013 elseif a:parser ==# 'parse_wincmd' | |
1 0.000415 0.000005 call self.parse_wincmd() | |
7 0.000012 elseif a:parser ==# 'parse_cmd_syntax' | |
7 0.018378 0.000029 call self.parse_cmd_syntax() | |
else | |
throw printf('unknown parser: %s', string(a:parser)) | |
259 0.000187 endif | |
FUNCTION 241_compile_dict() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5381 | |
Called 23 times | |
Total time: 0.011769 | |
Self time: 0.000985 | |
count total (s) self (s) | |
23 0.011582 0.000823 let value = map(a:node.value, '"(" . self.compile(v:val[0]) . " " . self.compile(v:val[1]) . ")"') | |
23 0.000048 if empty(value) | |
7 0.000007 return '(dict)' | |
16 0.000010 else | |
16 0.000066 return printf('(dict %s)', join(value, ' ')) | |
endif | |
FUNCTION <SNR>45_isupper() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 267 | |
Called 23 times | |
Total time: 0.000149 | |
Self time: 0.000149 | |
count total (s) self (s) | |
23 0.000143 return a:c =~# '^[A-Z]$' | |
FUNCTION 25_check_missing_endwhile() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 479 | |
Called 48 times | |
Total time: 0.000299 | |
Self time: 0.000299 | |
count total (s) self (s) | |
48 0.000118 if self.context[0].type == s:NODE_WHILE | |
throw s:Err(printf('E170: Missing :endwhile: %s', a:ends), a:pos) | |
48 0.000027 endif | |
FUNCTION 63_parse_cmd_const() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1540 | |
Called 9 times | |
Total time: 0.057748 | |
Self time: 0.000450 | |
count total (s) self (s) | |
9 0.000061 0.000045 let pos = self.reader.tell() | |
9 0.000653 0.000030 call self.reader.skip_white() | |
" :const | |
9 0.000176 0.000063 if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
9 0.000009 endif | |
8 0.191928 0.156165 let lhs = self.parse_constlhs() | |
3 0.000367 0.000016 call self.reader.skip_white() | |
3 0.000139 0.000012 let s1 = self.reader.peekn(1) | |
" :const {var-name} | |
3 0.000024 0.000012 if self.ends_excmds(s1) || s1 !=# '=' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
3 0.000003 endif | |
" :const left op right | |
3 0.000024 0.000017 let node = s:Node(s:NODE_CONST) | |
3 0.000008 let node.pos = self.ea.cmdpos | |
3 0.000004 let node.ea = self.ea | |
3 0.000089 0.000011 call self.reader.getn(1) | |
3 0.000006 let node.op = s1 | |
3 0.000006 let node.left = lhs.left | |
3 0.000004 let node.list = lhs.list | |
3 0.000004 let node.rest = lhs.rest | |
3 0.015442 0.000010 let node.right = self.parse_expr() | |
3 0.000022 0.000010 call self.add_node(node) | |
FUNCTION 170_compile_delfunction() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4982 | |
Called 3 times | |
Total time: 0.001241 | |
Self time: 0.000024 | |
count total (s) self (s) | |
3 0.001241 0.000024 call self.out('(delfunction %s)', self.compile(a:node.left)) | |
FUNCTION 119_parse_expr9() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4012 | |
Called 393 times | |
Total time: 0.538160 | |
Self time: 0.232686 | |
count total (s) self (s) | |
393 0.002123 0.001458 let pos = self.reader.tell() | |
393 0.009915 0.001520 let token = self.tokenizer.get() | |
393 0.002636 0.001630 let node = s:Node(-1) | |
393 0.000738 if token.type == s:TOKEN_NUMBER | |
115 0.000718 0.000464 let node = s:Node(s:NODE_NUMBER) | |
115 0.000263 let node.pos = token.pos | |
115 0.000220 let node.value = token.value | |
278 0.000461 elseif token.type == s:TOKEN_BLOB | |
10 0.000071 0.000046 let node = s:Node(s:NODE_BLOB) | |
10 0.000021 let node.pos = token.pos | |
10 0.000020 let node.value = token.value | |
268 0.000431 elseif token.type == s:TOKEN_DQUOTE | |
31 0.000149 0.000096 call self.reader.seek_set(pos) | |
31 0.000205 0.000136 let node = s:Node(s:NODE_STRING) | |
31 0.000059 let node.pos = token.pos | |
31 0.009598 0.000224 let node.value = '"' . self.tokenizer.get_dstring() . '"' | |
237 0.000398 elseif token.type == s:TOKEN_SQUOTE | |
17 0.000076 0.000046 call self.reader.seek_set(pos) | |
17 0.000104 0.000066 let node = s:Node(s:NODE_STRING) | |
17 0.000034 let node.pos = token.pos | |
17 0.004181 0.000110 let node.value = "'" . self.tokenizer.get_sstring() . "'" | |
220 0.000343 elseif token.type == s:TOKEN_SQOPEN | |
13 0.000078 0.000048 let node = s:Node(s:NODE_LIST) | |
13 0.000026 let node.pos = token.pos | |
13 0.000022 let node.value = [] | |
13 0.005434 0.000052 let token = self.tokenizer.peek() | |
13 0.000026 if token.type == s:TOKEN_SQCLOSE | |
1 0.000022 0.000003 call self.tokenizer.get() | |
12 0.000010 else | |
28 0.000033 while s:TRUE | |
28 0.002253 call add(node.value, self.parse_expr1()) | |
28 0.001203 0.000128 let token = self.tokenizer.peek() | |
28 0.000049 if token.type == s:TOKEN_COMMA | |
19 0.000429 0.000055 call self.tokenizer.get() | |
19 0.008634 0.000078 if self.tokenizer.peek().type == s:TOKEN_SQCLOSE | |
3 0.000068 0.000011 call self.tokenizer.get() | |
3 0.000003 break | |
16 0.000012 endif | |
9 0.000016 elseif token.type == s:TOKEN_SQCLOSE | |
9 0.000205 0.000026 call self.tokenizer.get() | |
9 0.000008 break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
16 0.000011 endif | |
28 0.000027 endwhile | |
13 0.000009 endif | |
207 0.000524 elseif token.type == s:TOKEN_COPEN || token.type == s:TOKEN_LITCOPEN | |
47 0.000126 let is_litdict = token.type == s:TOKEN_LITCOPEN | |
47 0.000290 0.000209 let savepos = self.reader.tell() | |
47 0.000086 let nodepos = token.pos | |
47 0.023171 0.000207 let token = self.tokenizer.get() | |
47 0.000132 let lambda = token.type == s:TOKEN_ARROW | |
47 0.000159 if !lambda && !(token.type == s:TOKEN_SQUOTE || token.type == s:TOKEN_DQUOTE) | |
" if the token type is stirng, we cannot peek next token and we can | |
" assume it's not lambda. | |
39 0.019179 0.000218 let token2 = self.tokenizer.peek() | |
39 0.000138 let lambda = token2.type == s:TOKEN_ARROW || token2.type == s:TOKEN_COMMA | |
47 0.000034 endif | |
" fallback to dict or {expr} if true | |
47 0.000084 let fallback = s:FALSE | |
47 0.000047 if lambda | |
" lambda {token,...} {->...} {token->...} | |
22 0.000158 0.000105 let node = s:Node(s:NODE_LAMBDA) | |
22 0.000045 let node.pos = nodepos | |
22 0.000033 let node.rlist = [] | |
22 0.000036 let named = {} | |
38 0.000050 while s:TRUE | |
38 0.000072 if token.type == s:TOKEN_ARROW | |
1 0.000001 break | |
37 0.000076 elseif token.type == s:TOKEN_IDENTIFIER | |
32 0.000361 0.000133 if !s:isargname(token.value) | |
1 0.021303 0.021297 throw s:Err(printf('E125: Illegal argument: %s', token.value), token.pos) | |
31 0.000099 elseif has_key(named, token.value) | |
1 0.022293 0.022286 throw s:Err(printf('E853: Duplicate argument name: %s', token.value), token.pos) | |
30 0.000022 endif | |
30 0.000088 let named[token.value] = 1 | |
30 0.000244 0.000168 let varnode = s:Node(s:NODE_IDENTIFIER) | |
30 0.000064 let varnode.pos = token.pos | |
30 0.000060 let varnode.value = token.value | |
" XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475 | |
30 0.002313 0.000269 if s:iswhite(self.reader.p(0)) && self.tokenizer.peek().type == s:TOKEN_COMMA | |
1 0.069497 0.069481 throw s:Err('E475: Invalid argument: White space is not allowed before comma', self.reader.getpos()) | |
29 0.000020 endif | |
29 0.006625 0.000132 let token = self.tokenizer.get() | |
29 0.000095 call add(node.rlist, varnode) | |
29 0.000058 if token.type == s:TOKEN_COMMA | |
" XXX: Vim allows last comma. {a, b, -> ...} => OK | |
18 0.011141 0.000079 let token = self.tokenizer.peek() | |
18 0.000040 if token.type == s:TOKEN_ARROW | |
2 0.000051 0.000007 call self.tokenizer.get() | |
2 0.000002 break | |
16 0.000012 endif | |
11 0.000015 elseif token.type == s:TOKEN_ARROW | |
11 0.000009 break | |
else | |
throw s:Err(printf('unexpected token: %s, type: %d', token.value, token.type), token.pos) | |
16 0.000017 endif | |
5 0.000007 elseif token.type == s:TOKEN_DOTDOTDOT | |
1 0.000006 0.000003 let varnode = s:Node(s:NODE_IDENTIFIER) | |
1 0.000002 let varnode.pos = token.pos | |
1 0.000002 let varnode.value = token.value | |
1 0.000003 call add(node.rlist, varnode) | |
1 0.000037 0.000003 let token = self.tokenizer.peek() | |
1 0.000002 if token.type == s:TOKEN_ARROW | |
1 0.000022 0.000003 call self.tokenizer.get() | |
1 0.000001 break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
4 0.000003 else | |
4 0.000005 let fallback = s:TRUE | |
4 0.000004 break | |
16 0.000012 endif | |
16 0.000458 0.000070 let token = self.tokenizer.get() | |
35 0.000098 endwhile | |
19 0.000021 if !fallback | |
15 0.008839 let node.left = self.parse_expr1() | |
15 0.000332 0.000055 let token = self.tokenizer.get() | |
15 0.000028 if token.type !=# s:TOKEN_CCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
15 0.000012 endif | |
15 0.000015 return node | |
4 0.000002 endif | |
29 0.000021 endif | |
" dict | |
29 0.000213 0.000135 let node = s:Node(s:NODE_DICT) | |
29 0.000064 let node.pos = nodepos | |
29 0.000053 let node.value = [] | |
29 0.000159 0.000108 call self.reader.seek_set(savepos) | |
29 0.001207 0.000107 let token = self.tokenizer.peek() | |
29 0.000058 if token.type == s:TOKEN_CCLOSE | |
9 0.000221 0.000033 call self.tokenizer.get() | |
9 0.000012 return node | |
20 0.000011 endif | |
24 0.000020 while 1 | |
24 0.003854 0.001254 let key = is_litdict ? self.parse_dict_literal_key() : self.parse_expr1() | |
24 0.004077 0.000086 let token = self.tokenizer.get() | |
24 0.000048 if token.type == s:TOKEN_CCLOSE | |
4 0.000010 if !empty(node.value) | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
4 0.000004 endif | |
4 0.000019 0.000013 call self.reader.seek_set(pos) | |
4 0.001046 let node = self.parse_identifier() | |
4 0.000004 break | |
20 0.000017 endif | |
20 0.000035 if token.type !=# s:TOKEN_COLON | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
20 0.000012 endif | |
20 0.010427 let val = self.parse_expr1() | |
20 0.000074 call add(node.value, [key, val]) | |
20 0.000433 0.000071 let token = self.tokenizer.get() | |
20 0.000033 if token.type == s:TOKEN_COMMA | |
7 0.003849 0.000042 if self.tokenizer.peek().type == s:TOKEN_CCLOSE | |
3 0.000066 0.000009 call self.tokenizer.get() | |
3 0.000003 break | |
4 0.000003 endif | |
13 0.000023 elseif token.type == s:TOKEN_CCLOSE | |
13 0.000011 break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
4 0.000004 endif | |
24 0.000047 endwhile | |
20 0.000020 return node | |
160 0.000289 elseif token.type == s:TOKEN_POPEN | |
1 0.000538 let node = self.parse_expr1() | |
1 0.000020 0.000003 let token = self.tokenizer.get() | |
1 0.000001 if token.type !=# s:TOKEN_PCLOSE | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
1 0.000001 endif | |
159 0.000253 elseif token.type == s:TOKEN_OPTION | |
let node = s:Node(s:NODE_OPTION) | |
let node.pos = token.pos | |
let node.value = token.value | |
159 0.000281 elseif token.type == s:TOKEN_IDENTIFIER | |
151 0.000900 0.000598 call self.reader.seek_set(pos) | |
151 0.081367 0.008304 let node = self.parse_identifier() | |
8 0.000024 elseif s:FALSE && (token.type == s:TOKEN_COLON || token.type == s:TOKEN_SHARP) | |
" XXX: no parse error but invalid expression | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
8 0.000359 0.000036 elseif token.type == s:TOKEN_LT && self.reader.peekn(4) ==? 'SID>' | |
3 0.000018 0.000012 call self.reader.seek_set(pos) | |
3 0.002620 0.000017 let node = self.parse_identifier() | |
5 0.000022 elseif token.type == s:TOKEN_IS || token.type == s:TOKEN_ISCS || token.type == s:TOKEN_ISNOT || token.type == s:TOKEN_ISNOTCS | |
4 0.000027 0.000017 call self.reader.seek_set(pos) | |
4 0.003260 0.000027 let node = self.parse_identifier() | |
1 0.000002 elseif token.type == s:TOKEN_ENV | |
let node = s:Node(s:NODE_ENV) | |
let node.pos = token.pos | |
let node.value = token.value | |
1 0.000001 elseif token.type == s:TOKEN_REG | |
let node = s:Node(s:NODE_REG) | |
let node.pos = token.pos | |
let node.value = token.value | |
1 0.000001 else | |
1 0.176656 0.176650 throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
345 0.000243 endif | |
345 0.000358 return node | |
FUNCTION 18_push_context() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 438 | |
Called 82 times | |
Total time: 0.000382 | |
Self time: 0.000382 | |
count total (s) self (s) | |
82 0.000352 call insert(self.context, a:node) | |
FUNCTION 75_parse_cmd_continue() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1724 | |
Called 1 time | |
Total time: 0.000037 | |
Self time: 0.000022 | |
count total (s) self (s) | |
1 0.000015 0.000007 if self.find_context(s:NODE_WHILE) == -1 && self.find_context(s:NODE_FOR) == -1 | |
throw s:Err('E586: :continue without :while or :for', self.ea.cmdpos) | |
1 0.000000 endif | |
1 0.000007 0.000004 let node = s:Node(s:NODE_CONTINUE) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000001 let node.ea = self.ea | |
1 0.000008 0.000004 call self.add_node(node) | |
FUNCTION 90_parse_lvalue_func() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1884 | |
Called 29 times | |
Total time: 0.063353 | |
Self time: 0.000544 | |
count total (s) self (s) | |
29 0.001770 0.000187 let p = s:LvalueParser.new(self.reader) | |
29 0.061347 0.000121 let node = p.parse() | |
29 0.000166 if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG | |
29 0.000034 return node | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
FUNCTION 260_get_token_brace() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5796 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
let minus = '' | |
let comma = '' | |
let n = '' | |
let m = '' | |
if self.reader.p(0) ==# '-' | |
let minus = self.reader.get() | |
let r .= minus | |
endif | |
if s:isdigit(self.reader.p(0)) | |
let n = self.reader.read_digit() | |
let r .= n | |
endif | |
if self.reader.p(0) ==# ',' | |
let comma = self.rader.get() | |
let r .= comma | |
endif | |
if s:isdigit(self.reader.p(0)) | |
let m = self.reader.read_digit() | |
let r .= m | |
endif | |
if self.reader.p(0) ==# '\' | |
let r .= self.reader.get() | |
endif | |
if self.reader.p(0) !=# '}' | |
throw s:Err('E554: Syntax error in \{...}', self.reader.getpos()) | |
endif | |
call self.reader.get() | |
return [a:pre . r, '\{' . minus . n . comma . m . '}'] | |
FUNCTION 127_parse_lv9() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4413 | |
Called 85 times | |
Total time: 0.102511 | |
Self time: 0.005646 | |
count total (s) self (s) | |
85 0.000497 0.000338 let pos = self.reader.tell() | |
85 0.047941 0.000335 let token = self.tokenizer.get() | |
85 0.000613 0.000400 let node = s:Node(-1) | |
85 0.000239 if token.type == s:TOKEN_COPEN | |
call self.reader.seek_set(pos) | |
let node = self.parse_identifier() | |
85 0.000172 elseif token.type == s:TOKEN_OPTION | |
1 0.000015 0.000012 let node = s:Node(s:NODE_OPTION) | |
1 0.000003 let node.pos = token.pos | |
1 0.000002 let node.value = token.value | |
84 0.000158 elseif token.type == s:TOKEN_IDENTIFIER | |
80 0.000419 0.000269 call self.reader.seek_set(pos) | |
80 0.047365 0.000499 let node = self.parse_identifier() | |
4 0.000190 0.000017 elseif token.type == s:TOKEN_LT && self.reader.peekn(4) ==? 'SID>' | |
2 0.000010 0.000006 call self.reader.seek_set(pos) | |
2 0.001694 0.000009 let node = self.parse_identifier() | |
2 0.000003 elseif token.type == s:TOKEN_ENV | |
1 0.000008 0.000005 let node = s:Node(s:NODE_ENV) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.value = token.value | |
1 0.000002 elseif token.type == s:TOKEN_REG | |
1 0.000007 0.000004 let node = s:Node(s:NODE_REG) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.value = token.value | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
85 0.000057 endif | |
85 0.000088 return node | |
FUNCTION <SNR>45_iswordc1() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 238 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return a:c =~# '^[A-Za-z_]$' | |
FUNCTION <SNR>45_isidc() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 263 | |
Called 16 times | |
Total time: 0.000144 | |
Self time: 0.000144 | |
count total (s) self (s) | |
16 0.000137 return a:c =~# '^[0-9A-Za-z_]$' | |
FUNCTION 45_parse_cmd_append() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1200 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.readline() | |
let lines = [cmdline] | |
let m = '.' | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.getn(-1) | |
call add(lines, line) | |
if line ==# m | |
break | |
endif | |
call self.reader.get() | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
FUNCTION 38_read_cmdarg() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1044 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
while s:TRUE | |
let c = self.reader.peekn(1) | |
if c ==# '' || s:iswhite(c) | |
break | |
endif | |
call self.reader.getn(1) | |
if c ==# '\' | |
let c = self.reader.getn(1) | |
endif | |
let r .= c | |
endwhile | |
return r | |
FUNCTION 94_parse_letlhs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1948 | |
Called 24 times | |
Total time: 0.110496 | |
Self time: 0.002144 | |
count total (s) self (s) | |
24 0.000094 let lhs = {'left': s:NIL, 'list': s:NIL, 'rest': s:NIL} | |
24 0.000600 0.000142 let tokenizer = s:ExprTokenizer.new(self.reader) | |
24 0.013831 0.000109 if tokenizer.peek().type == s:TOKEN_SQOPEN | |
5 0.000109 0.000015 call tokenizer.get() | |
5 0.000008 let lhs.list = [] | |
10 0.000013 while s:TRUE | |
10 0.016629 0.000140 let node = self.parse_lvalue() | |
10 0.000030 call add(lhs.list, node) | |
10 0.005011 0.000047 let token = tokenizer.get() | |
10 0.000020 if token.type == s:TOKEN_SQCLOSE | |
break | |
10 0.000017 elseif token.type == s:TOKEN_COMMA | |
5 0.000004 continue | |
5 0.000008 elseif token.type == s:TOKEN_SEMICOLON | |
5 0.008429 0.000070 let node = self.parse_lvalue() | |
5 0.000010 let lhs.rest = node | |
5 0.002527 0.000021 let token = tokenizer.get() | |
5 0.000010 if token.type == s:TOKEN_SQCLOSE | |
5 0.000005 break | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
5 0.000011 endwhile | |
19 0.000017 else | |
19 0.133904 0.072144 let lhs.left = self.parse_lvalue() | |
23 0.000017 endif | |
23 0.000024 return lhs | |
FUNCTION 236_compile_call() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5351 | |
Called 11 times | |
Total time: 0.007954 | |
Self time: 0.000197 | |
count total (s) self (s) | |
11 0.002270 0.000084 let rlist = map(a:node.rlist, 'self.compile(v:val)') | |
11 0.000023 if empty(rlist) | |
7 0.003363 0.000040 return printf('(%s)', self.compile(a:node.left)) | |
4 0.000002 else | |
4 0.002276 0.000028 return printf('(%s %s)', self.compile(a:node.left), join(rlist, ' ')) | |
endif | |
FUNCTION 264_get_token_sq_coll_element() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5958 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if self.reader.p(0) ==# '[' && self.reader.p(1) ==# '.' && !self.isend(self.reader.p(2)) && self.reader.p(3) ==# '.' && self.reader.p(4) ==# ']' | |
return self.reader.getn(5) | |
endif | |
return '' | |
FUNCTION 143_getpos() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4583 | |
Called 3265 times | |
Total time: 0.028920 | |
Self time: 0.028920 | |
count total (s) self (s) | |
3265 0.012966 let [lnum, col, offset] = self.pos[self.i] | |
3265 0.014144 return {'i': self.i, 'lnum': lnum, 'col': col, 'offset': offset} | |
FUNCTION 176_compile_lockvar() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5034 | |
Called 2 times | |
Total time: 0.001972 | |
Self time: 0.000067 | |
count total (s) self (s) | |
2 0.001897 0.000031 let list = map(a:node.list, 'self.compile(v:val)') | |
2 0.000003 if a:node.depth is# s:NIL | |
1 0.000037 0.000016 call self.out('(lockvar %s)', join(list, ' ')) | |
1 0.000001 else | |
1 0.000024 0.000006 call self.out('(lockvar %s %s)', a:node.depth, join(list, ' ')) | |
2 0.000002 endif | |
FUNCTION 234_compile_slice() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5341 | |
Called 5 times | |
Total time: 0.002972 | |
Self time: 0.000079 | |
count total (s) self (s) | |
5 0.000791 0.000025 let r0 = a:node.rlist[0] is# s:NIL ? 'nil' : self.compile(a:node.rlist[0]) | |
5 0.000787 0.000023 let r1 = a:node.rlist[1] is# s:NIL ? 'nil' : self.compile(a:node.rlist[1]) | |
5 0.001392 0.000029 return printf('(slice %s %s %s)', self.compile(a:node.left), r0, r1) | |
FUNCTION 246_compile_reg() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5406 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return a:node.value | |
FUNCTION 20_find_context() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 446 | |
Called 4 times | |
Total time: 0.000035 | |
Self time: 0.000035 | |
count total (s) self (s) | |
4 0.000008 let i = 0 | |
4 0.000010 for node in self.context | |
4 0.000007 if node.type == a:type | |
4 0.000004 return i | |
endif | |
let i += 1 | |
endfor | |
return -1 | |
FUNCTION 151_read_bdigit() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4649 | |
Called 5 times | |
Total time: 0.001104 | |
Self time: 0.000133 | |
count total (s) self (s) | |
5 0.000005 let r = '' | |
12 0.000865 0.000073 while self.peekn(1) ==# '0' || self.peekn(1) ==# '1' | |
7 0.000206 0.000027 let r .= self.getn(1) | |
12 0.000010 endwhile | |
5 0.000005 return r | |
FUNCTION 268_get_token_percent() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 6015 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let c = self.reader.get() | |
if c ==# '^' | |
return [a:pre . '^', '\%^'] | |
elseif c ==# '$' | |
return [a:pre . '$', '\%$'] | |
elseif c ==# 'V' | |
return [a:pre . 'V', '\%V'] | |
elseif c ==# '#' | |
return [a:pre . '#', '\%#'] | |
elseif c ==# '[' | |
return self.get_token_percent_sq(a:pre . '[') | |
elseif c ==# '(' | |
return [a:pre . '(', '\%('] | |
else | |
return self.get_token_mlcv(a:pre) | |
endif | |
FUNCTION 81_parse_cmd_throw() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1807 | |
Called 1 time | |
Total time: 0.002262 | |
Self time: 0.000025 | |
count total (s) self (s) | |
1 0.000013 0.000011 let node = s:Node(s:NODE_THROW) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.002236 0.000005 let node.left = self.parse_expr() | |
1 0.000008 0.000004 call self.add_node(node) | |
FUNCTION <SNR>45_isargname() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 254 | |
Called 65 times | |
Total time: 0.000461 | |
Self time: 0.000461 | |
count total (s) self (s) | |
65 0.000437 return a:s =~# '^[A-Za-z_][0-9A-Za-z_]*$' | |
FUNCTION 257_get_token_nomagic() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5620 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# '*' | |
return ['\*', '\*'] | |
elseif c ==# '+' | |
return ['\+', '\+'] | |
elseif c ==# '=' | |
return ['\=', '\='] | |
elseif c ==# '?' | |
return ['\?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('\{') | |
elseif c ==# '@' | |
return self.get_token_at('\@') | |
elseif c ==# '.' | |
return ['\.', '\.'] | |
elseif c ==# '<' | |
return ['\<', '\<'] | |
elseif c ==# '>' | |
return ['\>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('\%') | |
elseif c ==# '~' | |
return ['\~', '\^'] | |
elseif c ==# '[' | |
return self.get_token_sq('\[') | |
elseif c ==# '|' | |
return ['\|', '\|'] | |
elseif c ==# '&' | |
return ['\&', '\&'] | |
elseif c ==# '(' | |
return ['\(', '\('] | |
elseif c ==# ')' | |
return ['\)', '\)'] | |
endif | |
call self.reader.seek_set(pos) | |
return self.get_token_backslash_common() | |
elseif c ==# '^' | |
return ['^', '\^'] | |
elseif c ==# '$' | |
return ['$', '\$'] | |
endif | |
return [c, c] | |
FUNCTION 183_compile_try() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5109 | |
Called 1 time | |
Total time: 0.001763 | |
Self time: 0.000108 | |
count total (s) self (s) | |
1 0.000019 0.000002 call self.out('(try') | |
1 0.000008 0.000004 call self.incindent(' ') | |
1 0.000376 0.000004 call self.compile_body(a:node.body) | |
3 0.000004 for cnode in a:node.catch | |
2 0.000003 if cnode.pattern isnot# s:NIL | |
1 0.000006 0.000003 call self.decindent() | |
1 0.000020 0.000004 call self.out(' catch /%s/', cnode.pattern) | |
1 0.000013 0.000009 call self.incindent(' ') | |
1 0.000392 0.000004 call self.compile_body(cnode.body) | |
1 0.000001 else | |
1 0.000006 0.000003 call self.decindent() | |
1 0.000019 0.000003 call self.out(' catch') | |
1 0.000007 0.000003 call self.incindent(' ') | |
1 0.000395 0.000003 call self.compile_body(cnode.body) | |
2 0.000002 endif | |
3 0.000003 endfor | |
1 0.000002 if a:node.finally isnot# s:NIL | |
1 0.000005 0.000002 call self.decindent() | |
1 0.000019 0.000003 call self.out(' finally') | |
1 0.000007 0.000003 call self.incindent(' ') | |
1 0.000397 0.000004 call self.compile_body(a:node.finally.body) | |
1 0.000001 endif | |
1 0.000020 0.000003 call self.out(')') | |
1 0.000005 0.000002 call self.decindent() | |
FUNCTION 121_parse_dot() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4223 | |
Called 19 times | |
Total time: 0.006302 | |
Self time: 0.000886 | |
count total (s) self (s) | |
19 0.000106 if a:left.type !=# s:NODE_IDENTIFIER && a:left.type !=# s:NODE_CURLYNAME && a:left.type !=# s:NODE_DICT && a:left.type !=# s:NODE_SUBSCRIPT && a:left.type !=# s:NODE_CALL && a:left.type !=# s:NODE_DOT | |
2 0.000004 return s:NIL | |
17 0.000014 endif | |
17 0.000332 0.000100 if !s:iswordc(self.reader.p(0)) | |
1 0.000001 return s:NIL | |
16 0.000011 endif | |
16 0.000230 0.000090 let pos = self.reader.getpos() | |
16 0.004798 0.000066 let name = self.reader.read_word() | |
16 0.000343 0.000098 if s:isnamec(self.reader.p(0)) | |
" XXX: foo is str => ok, foo is obj => invalid expression | |
" foo.s:bar or foo.bar#baz | |
1 0.000001 return s:NIL | |
15 0.000010 endif | |
15 0.000105 0.000071 let node = s:Node(s:NODE_DOT) | |
15 0.000034 let node.pos = a:token.pos | |
15 0.000027 let node.left = a:left | |
15 0.000099 0.000066 let node.right = s:Node(s:NODE_IDENTIFIER) | |
15 0.000027 let node.right.pos = pos | |
15 0.000027 let node.right.value = name | |
15 0.000017 return node | |
FUNCTION 62_parse_cmd_let() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1491 | |
Called 23 times | |
Total time: 0.197313 | |
Self time: 0.002394 | |
count total (s) self (s) | |
23 0.000135 0.000093 let pos = self.reader.tell() | |
23 0.001587 0.000069 call self.reader.skip_white() | |
" :let | |
23 0.000393 0.000131 if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
23 0.000013 endif | |
23 0.174979 0.071907 let lhs = self.parse_letlhs() | |
22 0.002979 0.000133 call self.reader.skip_white() | |
22 0.001098 0.000092 let s1 = self.reader.peekn(1) | |
22 0.001352 0.000086 let s2 = self.reader.peekn(2) | |
" TODO check scriptversion? | |
22 0.000033 if s2 ==# '..' | |
1 0.000065 0.000004 let s2 = self.reader.peekn(3) | |
22 0.000015 endif | |
" :let {var-name} .. | |
22 0.000253 0.000158 if self.ends_excmds(s1) || (s2 !=# '+=' && s2 !=# '-=' && s2 !=# '.=' && s2 !=# '..=' && s2 !=# '*=' && s2 !=# '/=' && s2 !=# '%=' && s1 !=# '=') | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
22 0.000016 endif | |
" :let left op right | |
22 0.000151 0.000092 let node = s:Node(s:NODE_LET) | |
22 0.000054 let node.pos = self.ea.cmdpos | |
22 0.000036 let node.ea = self.ea | |
22 0.000031 let node.op = '' | |
22 0.000039 let node.left = lhs.left | |
22 0.000034 let node.list = lhs.list | |
22 0.000034 let node.rest = lhs.rest | |
22 0.000038 let node.right = s:NIL | |
22 0.000087 if s2 ==# '+=' || s2 ==# '-=' || s2 ==# '.=' || s2 ==# '..=' || s2 ==# '*=' || s2 ==# '/=' || s2 ==# '%=' | |
8 0.000350 0.000036 call self.reader.getn(len(s2)) | |
8 0.000014 let node.op = s2 | |
14 0.000021 elseif s1 ==# '=' | |
14 0.000480 0.000055 call self.reader.getn(1) | |
14 0.000022 let node.op = s1 | |
else | |
throw 'NOT REACHED' | |
22 0.000012 endif | |
22 0.083939 0.000082 let node.right = self.parse_expr() | |
22 0.000172 0.000076 call self.add_node(node) | |
FUNCTION 56_parse_cmd_usercmd() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1314 | |
Called 2 times | |
Total time: 0.001484 | |
Self time: 0.000012 | |
count total (s) self (s) | |
2 0.001482 0.000010 call self.parse_cmd_common() | |
FUNCTION 55_parse_cmd_finish() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1306 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_common() | |
if self.context[0].type == s:NODE_TOPLEVEL | |
call self.reader.seek_end(0) | |
endif | |
FUNCTION 254_get_token() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5510 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if self.reg_magic == self.RE_VERY_MAGIC | |
return self.get_token_very_magic() | |
elseif self.reg_magic == self.RE_MAGIC | |
return self.get_token_magic() | |
elseif self.reg_magic == self.RE_NOMAGIC | |
return self.get_token_nomagic() | |
elseif self.reg_magic == self.RE_VERY_NOMAGIC | |
return self.get_token_very_nomagic() | |
endif | |
FUNCTION 218_compile_is() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5277 | |
Called 1 time | |
Total time: 0.000559 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000558 0.000008 return printf('(is %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 263_get_token_sq_coll_char() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5929 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# 'd' | |
let r = self.getdecchrs() | |
let n = str2nr(r, 10) | |
elseif c ==# 'o' | |
let r = self.getoctchrs() | |
let n = str2nr(r, 8) | |
elseif c ==# 'x' | |
let r = self.gethexchrs(2) | |
let n = str2nr(r, 16) | |
elseif c ==# 'u' | |
let r = self.gethexchrs(4) | |
let n = str2nr(r, 16) | |
elseif c ==# 'U' | |
let r = self.gethexchrs(8) | |
let n = str2nr(r, 16) | |
else | |
let r = '' | |
endif | |
if r ==# '' | |
call self.reader.seek_set(pos) | |
return '\' | |
endif | |
return ['\' . c . r, n] | |
FUNCTION 100___init__() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3133 | |
Called 348 times | |
Total time: 0.001574 | |
Self time: 0.001574 | |
count total (s) self (s) | |
348 0.000734 let self.reader = a:reader | |
348 0.000651 let self.cache = {} | |
FUNCTION 221_compile_isnot() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5289 | |
Called 1 time | |
Total time: 0.000559 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000559 0.000008 return printf('(isnot %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 40_parse_trail() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1072 | |
Called 259 times | |
Total time: 0.024919 | |
Self time: 0.007081 | |
count total (s) self (s) | |
259 0.014716 0.000830 call self.reader.skip_white() | |
259 0.002862 0.001067 let c = self.reader.peek() | |
259 0.000378 if c ==# '<EOF>' | |
" pass | |
259 0.000354 elseif c ==# '<EOL>' | |
251 0.002903 0.000833 call self.reader.get() | |
8 0.000011 elseif c ==# '|' | |
6 0.000072 0.000018 call self.reader.get() | |
2 0.000002 elseif c ==# '"' | |
call self.parse_comment() | |
call self.reader.get() | |
2 0.000002 else | |
2 0.054114 0.054081 throw s:Err(printf('E488: Trailing characters: %s', c), self.reader.getpos()) | |
257 0.000166 endif | |
FUNCTION 31_parse_pattern() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 699 | |
Called 9 times | |
Total time: 0.006076 | |
Self time: 0.002661 | |
count total (s) self (s) | |
9 0.000016 let pattern = '' | |
9 0.000011 let endc = '' | |
9 0.000013 let inbracket = 0 | |
86 0.000069 while s:TRUE | |
86 0.002647 0.000330 let c = self.reader.getn(1) | |
86 0.000104 if c ==# '' | |
1 0.000000 break | |
85 0.000042 endif | |
85 0.000173 if c ==# a:delimiter && inbracket == 0 | |
8 0.000013 let endc = c | |
8 0.000008 break | |
77 0.000042 endif | |
77 0.000149 let pattern .= c | |
77 0.000092 if c ==# '\' | |
16 0.000733 0.000057 let c = self.reader.peekn(1) | |
16 0.000017 if c ==# '' | |
throw s:Err('E682: Invalid search pattern or delimiter', self.reader.getpos()) | |
16 0.000011 endif | |
16 0.000479 0.000057 call self.reader.getn(1) | |
16 0.000032 let pattern .= c | |
61 0.000072 elseif c ==# '[' | |
4 0.000006 let inbracket += 1 | |
57 0.000059 elseif c ==# ']' | |
4 0.000004 let inbracket -= 1 | |
77 0.000050 endif | |
86 0.000078 endwhile | |
9 0.000018 return [pattern, endc] | |
FUNCTION 219_compile_isci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5281 | |
Called 1 time | |
Total time: 0.000746 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000746 0.000008 return printf('(is? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 69_parse_cmd_else() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1640 | |
Called 1 time | |
Total time: 0.000058 | |
Self time: 0.000045 | |
count total (s) self (s) | |
1 0.000007 if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF | |
throw s:Err('E581: :else without :if', self.ea.cmdpos) | |
1 0.000001 endif | |
1 0.000002 if self.context[0].type !=# s:NODE_IF | |
1 0.000010 0.000005 call self.pop_context() | |
1 0.000001 endif | |
1 0.000009 0.000005 let node = s:Node(s:NODE_ELSE) | |
1 0.000003 let node.pos = self.ea.cmdpos | |
1 0.000003 let node.body = [] | |
1 0.000002 let node.ea = self.ea | |
1 0.000004 let self.context[0].else = node | |
1 0.000009 0.000005 call self.push_context(node) | |
FUNCTION 148_read_odigit() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4616 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
while s:isodigit(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
FUNCTION 34_find_command() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 910 | |
Called 279 times | |
Total time: 0.358244 | |
Self time: 0.178332 | |
count total (s) self (s) | |
279 0.013571 0.001047 let c = self.reader.peekn(1) | |
279 0.000403 let name = '' | |
279 0.000380 if c ==# 'k' | |
call self.reader.getn(1) | |
let name = 'k' | |
279 0.001681 0.000964 elseif c ==# 's' && self.reader.peekn(5) =~# '\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])' | |
call self.reader.getn(1) | |
let name = 'substitute' | |
279 0.001745 elseif c =~# '[@*!=><&~#]' | |
call self.reader.getn(1) | |
let name = c | |
279 0.017489 0.001343 elseif self.reader.peekn(2) ==# 'py' | |
let name = self.reader.read_alnum() | |
279 0.000234 else | |
279 0.001419 0.000969 let pos = self.reader.tell() | |
279 0.151063 0.001072 let name = self.reader.read_alpha() | |
279 0.002045 if name !=# 'del' && name =~# '\v^d%[elete][lp]$' | |
call self.reader.seek_set(pos) | |
let name = self.reader.getn(len(name) - 1) | |
279 0.000222 endif | |
279 0.000202 endif | |
279 0.000388 if name ==# '' | |
return s:NIL | |
279 0.000186 endif | |
279 0.000867 if has_key(self.find_command_cache, name) | |
181 0.000361 return self.find_command_cache[name] | |
98 0.000062 endif | |
98 0.000187 let cmd = s:NIL | |
18387 0.017801 for x in self.builtin_commands | |
18386 0.061379 if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
97 0.000132 unlet cmd | |
97 0.000165 let cmd = x | |
97 0.000082 break | |
18289 0.010454 endif | |
18387 0.015462 endfor | |
98 0.000137 if self.neovim | |
6 0.000011 for x in self.neovim_additional_commands | |
4 0.000019 if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
unlet cmd | |
let cmd = x | |
break | |
4 0.000003 endif | |
6 0.000004 endfor | |
11 0.000013 for x in self.neovim_removed_commands | |
10 0.000040 if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
1 0.000001 unlet cmd | |
1 0.000002 let cmd = s:NIL | |
1 0.000001 break | |
9 0.000005 endif | |
11 0.000010 endfor | |
98 0.000080 endif | |
" FIXME: user defined command | |
98 0.000377 if (cmd is# s:NIL || cmd.name ==# 'Print') && name =~# '^[A-Z]' | |
1 0.000093 0.000009 let name .= self.reader.read_alnum() | |
1 0.000002 unlet cmd | |
1 0.000005 let cmd = {'name': name, 'flags': 'USERCMD', 'parser': 'parse_cmd_usercmd'} | |
98 0.000061 endif | |
98 0.000357 let self.find_command_cache[name] = cmd | |
98 0.000119 return cmd | |
FUNCTION 240_compile_list() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5372 | |
Called 12 times | |
Total time: 0.007916 | |
Self time: 0.000250 | |
count total (s) self (s) | |
12 0.007801 0.000135 let value = map(a:node.value, 'self.compile(v:val)') | |
12 0.000024 if empty(value) | |
1 0.000001 return '(list)' | |
11 0.000007 else | |
11 0.000061 return printf('(list %s)', join(value, ' ')) | |
endif | |
FUNCTION 95_parse_constlhs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1982 | |
Called 9 times | |
Total time: 0.040527 | |
Self time: 0.000780 | |
count total (s) self (s) | |
9 0.000037 let lhs = {'left': s:NIL, 'list': s:NIL, 'rest': s:NIL} | |
9 0.000244 0.000056 let tokenizer = s:ExprTokenizer.new(self.reader) | |
9 0.006387 0.000042 if tokenizer.peek().type == s:TOKEN_SQOPEN | |
2 0.000042 0.000004 call tokenizer.get() | |
2 0.000003 let lhs.list = [] | |
4 0.000005 while s:TRUE | |
4 0.006464 0.000055 let node = self.parse_lvalue() | |
4 0.000012 call add(lhs.list, node) | |
4 0.001979 0.000014 let token = tokenizer.get() | |
4 0.000008 if token.type == s:TOKEN_SQCLOSE | |
1 0.000000 break | |
3 0.000005 elseif token.type == s:TOKEN_COMMA | |
2 0.000002 continue | |
1 0.000001 elseif token.type == s:TOKEN_SEMICOLON | |
1 0.001790 0.000013 let node = self.parse_lvalue() | |
1 0.000002 let lhs.rest = node | |
1 0.000472 0.000004 let token = tokenizer.get() | |
1 0.000002 if token.type == s:TOKEN_SQCLOSE | |
1 0.000001 break | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
2 0.000004 endwhile | |
7 0.000005 else | |
6 0.176513 0.156855 let lhs.left = self.parse_constlvalue() | |
3 0.000003 endif | |
3 0.000003 return lhs | |
FUNCTION 115_parse_expr5() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3795 | |
Called 376 times | |
Total time: 1.078790 | |
Self time: 0.018262 | |
count total (s) self (s) | |
376 0.994032 0.441244 let left = self.parse_expr6() | |
384 0.000476 while s:TRUE | |
384 0.001845 0.001309 let pos = self.reader.tell() | |
384 0.009147 0.001443 let token = self.tokenizer.get() | |
384 0.000672 if token.type == s:TOKEN_PLUS | |
4 0.000026 0.000014 let node = s:Node(s:NODE_ADD) | |
4 0.000008 let node.pos = token.pos | |
4 0.000007 let node.left = left | |
4 0.006178 0.000016 let node.right = self.parse_expr6() | |
4 0.000006 let left = node | |
380 0.000647 elseif token.type == s:TOKEN_MINUS | |
1 0.000006 0.000004 let node = s:Node(s:NODE_SUBTRACT) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001623 0.000004 let node.right = self.parse_expr6() | |
1 0.000001 let left = node | |
379 0.000634 elseif token.type == s:TOKEN_DOTDOT " TODO check scriptversion? | |
2 0.000012 0.000006 let node = s:Node(s:NODE_CONCAT) | |
2 0.000004 let node.pos = token.pos | |
2 0.000004 let node.left = left | |
2 0.003556 0.000008 let node.right = self.parse_expr6() | |
2 0.000003 let left = node | |
377 0.000596 elseif token.type == s:TOKEN_DOT " TODO check scriptversion? | |
7 0.000044 0.000026 let node = s:Node(s:NODE_CONCAT) | |
7 0.000014 let node.pos = token.pos | |
7 0.000012 let node.left = left | |
7 0.013923 0.000031 let node.right = self.parse_expr6() | |
7 0.000009 let left = node | |
370 0.000254 else | |
370 0.001866 0.001238 call self.reader.seek_set(pos) | |
370 0.000346 break | |
14 0.000014 endif | |
384 0.001058 endwhile | |
370 0.000388 return left | |
FUNCTION 72_parse_cmd_endwhile() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1680 | |
Called 1 time | |
Total time: 0.000028 | |
Self time: 0.000022 | |
count total (s) self (s) | |
1 0.000003 if self.context[0].type !=# s:NODE_WHILE | |
throw s:Err('E588: :endwhile without :while', self.ea.cmdpos) | |
1 0.000001 endif | |
1 0.000007 0.000004 let node = s:Node(s:NODE_ENDWHILE) | |
1 0.000003 let node.pos = self.ea.cmdpos | |
1 0.000001 let node.ea = self.ea | |
1 0.000002 let self.context[0].endwhile = node | |
1 0.000007 0.000004 call self.pop_context() | |
FUNCTION 16_new() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 422 | |
Called 50 times | |
Total time: 0.006775 | |
Self time: 0.005893 | |
count total (s) self (s) | |
50 0.005227 let obj = copy(self) | |
50 0.001397 0.000515 call call(obj.__init__, a:000, obj) | |
50 0.000085 return obj | |
FUNCTION 108_new() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3509 | |
Called 290 times | |
Total time: 0.012743 | |
Self time: 0.005257 | |
count total (s) self (s) | |
290 0.003073 let obj = copy(self) | |
290 0.009167 0.001681 call call(obj.__init__, a:000, obj) | |
290 0.000302 return obj | |
FUNCTION 133_seek_cur() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4506 | |
Called 2025 times | |
Total time: 0.005857 | |
Self time: 0.005857 | |
count total (s) self (s) | |
2025 0.005183 let self.i = self.i + a:i | |
FUNCTION <SNR>45_islower() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 271 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return a:c =~# '^[a-z]$' | |
FUNCTION 87_parse_cmd_execute() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1858 | |
Called 1 time | |
Total time: 0.002821 | |
Self time: 0.000017 | |
count total (s) self (s) | |
1 0.000007 0.000004 let node = s:Node(s:NODE_EXECUTE) | |
1 0.000003 let node.pos = self.ea.cmdpos | |
1 0.000001 let node.ea = self.ea | |
1 0.002801 0.000004 let node.list = self.parse_exprlist() | |
1 0.000007 0.000003 call self.add_node(node) | |
FUNCTION 181_compile_continue() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5101 | |
Called 1 time | |
Total time: 0.000019 | |
Self time: 0.000003 | |
count total (s) self (s) | |
1 0.000019 0.000003 call self.out('(continue)') | |
FUNCTION 194_compile_equal() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5181 | |
Called 1 time | |
Total time: 0.000553 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000553 0.000007 return printf('(== %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION <SNR>45_Err() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 416 | |
Called 22 times | |
Total time: 0.000155 | |
Self time: 0.000155 | |
count total (s) self (s) | |
22 0.000146 return printf('vimlparser: %s: line %d col %d', a:msg, a:pos.lnum, a:pos.col) | |
FUNCTION 179_compile_while() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5074 | |
Called 1 time | |
Total time: 0.000504 | |
Self time: 0.000018 | |
count total (s) self (s) | |
1 0.000278 0.000007 call self.out('(while %s', self.compile(a:node.cond)) | |
1 0.000006 0.000002 call self.incindent(' ') | |
1 0.000196 0.000003 call self.compile_body(a:node.body) | |
1 0.000018 0.000003 call self.out(')') | |
1 0.000005 0.000002 call self.decindent() | |
FUNCTION 36_parse_argopt() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 989 | |
Called 1 time | |
Total time: 0.000082 | |
Self time: 0.000073 | |
count total (s) self (s) | |
1 0.000015 0.000006 while self.reader.p(0) ==# '+' && self.reader.p(1) ==# '+' | |
let s = self.reader.peekn(20) | |
if s =~# '^++bin\>' | |
call self.reader.getn(5) | |
let self.ea.force_bin = 1 | |
elseif s =~# '^++nobin\>' | |
call self.reader.getn(7) | |
let self.ea.force_bin = 2 | |
elseif s =~# '^++edit\>' | |
call self.reader.getn(6) | |
let self.ea.read_edit = 1 | |
elseif s =~# '^++ff=\(dos\|unix\|mac\)\>' | |
call self.reader.getn(5) | |
let self.ea.force_ff = self.reader.read_alpha() | |
elseif s =~# '^++fileformat=\(dos\|unix\|mac\)\>' | |
call self.reader.getn(13) | |
let self.ea.force_ff = self.reader.read_alpha() | |
elseif s =~# '^++enc=\S' | |
call self.reader.getn(6) | |
let self.ea.force_enc = self.reader.read_nonwhite() | |
elseif s =~# '^++encoding=\S' | |
call self.reader.getn(11) | |
let self.ea.force_enc = self.reader.read_nonwhite() | |
elseif s =~# '^++bad=\(keep\|drop\|.\)\>' | |
call self.reader.getn(6) | |
if s =~# '^++bad=keep' | |
let self.ea.bad_char = self.reader.getn(4) | |
elseif s =~# '^++bad=drop' | |
let self.ea.bad_char = self.reader.getn(4) | |
else | |
let self.ea.bad_char = self.reader.getn(1) | |
endif | |
elseif s =~# '^++' | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
else | |
break | |
endif | |
call self.reader.skip_white() | |
1 0.000003 endwhile | |
FUNCTION <SNR>45_ExArg() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 275 | |
Called 288 times | |
Total time: 0.013057 | |
Self time: 0.013057 | |
count total (s) self (s) | |
288 0.000523 let ea = {} | |
288 0.000630 let ea.forceit = s:FALSE | |
288 0.000510 let ea.addr_count = 0 | |
288 0.000457 let ea.line1 = 0 | |
288 0.000373 let ea.line2 = 0 | |
288 0.000385 let ea.flags = 0 | |
288 0.000585 let ea.do_ecmd_cmd = '' | |
288 0.000480 let ea.do_ecmd_lnum = 0 | |
288 0.000486 let ea.append = 0 | |
288 0.000532 let ea.usefilter = s:FALSE | |
288 0.000426 let ea.amount = 0 | |
288 0.000423 let ea.regname = 0 | |
288 0.000411 let ea.force_bin = 0 | |
288 0.000423 let ea.read_edit = 0 | |
288 0.000435 let ea.force_ff = 0 | |
288 0.000560 let ea.force_enc = 0 | |
288 0.000418 let ea.bad_char = 0 | |
288 0.000465 let ea.linepos = {} | |
288 0.000501 let ea.cmdpos = [] | |
288 0.000421 let ea.argpos = [] | |
288 0.000433 let ea.cmd = {} | |
288 0.000434 let ea.modifiers = [] | |
288 0.000416 let ea.range = [] | |
288 0.000458 let ea.argopt = {} | |
288 0.000411 let ea.argcmd = {} | |
288 0.000331 return ea | |
FUNCTION 198_compile_nequalci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5197 | |
Called 1 time | |
Total time: 0.000621 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000619 0.000007 return printf('(!=? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 61_parse_cmd_call() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1475 | |
Called 7 times | |
Total time: 0.099924 | |
Self time: 0.000284 | |
count total (s) self (s) | |
7 0.000058 0.000037 let node = s:Node(s:NODE_EXCALL) | |
7 0.000018 let node.pos = self.ea.cmdpos | |
7 0.000012 let node.ea = self.ea | |
7 0.000501 0.000024 call self.reader.skip_white() | |
7 0.000089 0.000034 let c = self.reader.peek() | |
7 0.000059 0.000026 if self.ends_excmds(c) | |
throw s:Err('E471: Argument required', self.reader.getpos()) | |
7 0.000004 endif | |
7 0.536858 0.437830 let node.left = self.parse_expr() | |
6 0.000012 if node.left.type !=# s:NODE_CALL | |
throw s:Err('Not an function call', node.left.pos) | |
6 0.000005 endif | |
6 0.000048 0.000022 call self.add_node(node) | |
FUNCTION <SNR>45_isnamec1() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 250 | |
Called 902 times | |
Total time: 0.004868 | |
Self time: 0.004868 | |
count total (s) self (s) | |
902 0.004551 return a:c =~# '^[A-Za-z_]$' | |
FUNCTION 142_getstr() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4568 | |
Called 16 times | |
Total time: 0.005094 | |
Self time: 0.005094 | |
count total (s) self (s) | |
16 0.000021 let r = '' | |
421 0.000474 for i in range(a:begin.i, a:end.i - 1) | |
405 0.000788 if i >= len(self.buf) | |
break | |
405 0.000226 endif | |
405 0.000806 let c = self.buf[i] | |
405 0.000483 if c ==# '<EOL>' | |
let c = "\n" | |
405 0.000243 endif | |
405 0.000642 let r .= c | |
421 0.000352 endfor | |
16 0.000019 return r | |
FUNCTION 259_get_token_backslash_common() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5720 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let cclass = 'iIkKfFpPsSdDxXoOwWhHaAlLuU' | |
let c = self.reader.get() | |
if c ==# '\' | |
return ['\\', '\\'] | |
elseif stridx(cclass, c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif c ==# '_' | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if stridx(cclass, c) !=# -1 | |
return ['\_' . c, '\_ . c'] | |
elseif c ==# '^' | |
return ['\_^', '\_^'] | |
elseif c ==# '$' | |
return ['\_$', '\_$'] | |
elseif c ==# '.' | |
return ['\_.', '\_.'] | |
elseif c ==# '[' | |
return self.get_token_sq('\_[') | |
endif | |
throw s:Err('E63: invalid use of \_', epos) | |
elseif stridx('etrb', c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif stridx('123456789', c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif c ==# 'z' | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if stridx('123456789', c) !=# -1 | |
return ['\z' . c, '\z' . c] | |
elseif c ==# 's' | |
return ['\zs', '\zs'] | |
elseif c ==# 'e' | |
return ['\ze', '\ze'] | |
elseif c ==# '(' | |
return ['\z(', '\z('] | |
endif | |
throw s:Err('E68: Invalid character after \z', epos) | |
elseif stridx('cCmMvVZ', c) !=# -1 | |
return ['\' . c, '\' . c] | |
elseif c ==# '%' | |
let epos = self.reader.getpos() | |
let c = self.reader.get() | |
if c ==# 'd' | |
let r = self.getdecchrs() | |
if r !=# '' | |
return ['\%d' . r, '\%d' . r] | |
endif | |
elseif c ==# 'o' | |
let r = self.getoctchrs() | |
if r !=# '' | |
return ['\%o' . r, '\%o' . r] | |
endif | |
elseif c ==# 'x' | |
let r = self.gethexchrs(2) | |
if r !=# '' | |
return ['\%x' . r, '\%x' . r] | |
endif | |
elseif c ==# 'u' | |
let r = self.gethexchrs(4) | |
if r !=# '' | |
return ['\%u' . r, '\%u' . r] | |
endif | |
elseif c ==# 'U' | |
let r = self.gethexchrs(8) | |
if r !=# '' | |
return ['\%U' . r, '\%U' . r] | |
endif | |
endif | |
throw s:Err('E678: Invalid character after \%[dxouU]', epos) | |
endif | |
return ['\' . c, c] | |
FUNCTION 153_read_word() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4666 | |
Called 20 times | |
Total time: 0.007060 | |
Self time: 0.001058 | |
count total (s) self (s) | |
20 0.000030 let r = '' | |
80 0.004697 0.000522 while s:iswordc(self.peekn(1)) | |
60 0.002156 0.000329 let r .= self.getn(1) | |
80 0.000075 endwhile | |
20 0.000024 return r | |
FUNCTION 30_parse_range() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 617 | |
Called 279 times | |
Total time: 0.193984 | |
Self time: 0.041938 | |
count total (s) self (s) | |
279 0.000496 let tokens = [] | |
279 0.000432 while s:TRUE | |
279 0.000304 while s:TRUE | |
279 0.019631 0.000891 call self.reader.skip_white() | |
279 0.014122 0.001213 let c = self.reader.peekn(1) | |
279 0.000384 if c ==# '' | |
break | |
279 0.000174 endif | |
279 0.000482 if c ==# '.' | |
call add(tokens, self.reader.getn(1)) | |
279 0.000375 elseif c ==# '$' | |
call add(tokens, self.reader.getn(1)) | |
279 0.000381 elseif c ==# "'" | |
call self.reader.getn(1) | |
let m = self.reader.getn(1) | |
if m ==# '' | |
break | |
endif | |
call add(tokens, "'" . m) | |
279 0.000337 elseif c ==# '/' | |
call self.reader.getn(1) | |
let [pattern, _] = self.parse_pattern(c) | |
call add(tokens, pattern) | |
279 0.000322 elseif c ==# '?' | |
call self.reader.getn(1) | |
let [pattern, _] = self.parse_pattern(c) | |
call add(tokens, pattern) | |
279 0.000319 elseif c ==# '\' | |
let m = self.reader.p(1) | |
if m ==# '&' || m ==# '?' || m ==# '/' | |
call self.reader.seek_cur(2) | |
call add(tokens, '\' . m) | |
else | |
throw s:Err('E10: \\ should be followed by /, ? or &', self.reader.getpos()) | |
endif | |
279 0.002836 0.001170 elseif s:isdigit(c) | |
call add(tokens, self.reader.read_digit()) | |
279 0.000207 endif | |
279 0.000318 while s:TRUE | |
279 0.018816 0.001078 call self.reader.skip_white() | |
279 0.014180 0.001320 if self.reader.peekn(1) ==# '' | |
break | |
279 0.000300 endif | |
279 0.035665 0.001207 let n = self.reader.read_integer() | |
279 0.000393 if n ==# '' | |
279 0.000229 break | |
endif | |
call add(tokens, n) | |
279 0.000207 endwhile | |
279 0.005957 0.001908 if self.reader.p(0) !=# '/' && self.reader.p(0) !=# '?' | |
279 0.000238 break | |
endif | |
279 0.000174 endwhile | |
279 0.013435 0.001114 if self.reader.peekn(1) ==# '%' | |
call add(tokens, self.reader.getn(1)) | |
279 0.014175 0.001533 elseif self.reader.peekn(1) ==# '*' " && &cpoptions !~ '\*' | |
call add(tokens, self.reader.getn(1)) | |
279 0.000195 endif | |
279 0.013434 0.001148 if self.reader.peekn(1) ==# ';' | |
call add(tokens, self.reader.getn(1)) | |
continue | |
279 0.013588 0.001211 elseif self.reader.peekn(1) ==# ',' | |
call add(tokens, self.reader.getn(1)) | |
continue | |
279 0.000159 endif | |
279 0.000201 break | |
279 0.001712 endwhile | |
279 0.000623 let self.ea.range = tokens | |
FUNCTION 273_gethexchrs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 6098 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
for i in range(a:n) | |
let c = self.reader.peek() | |
if !s:isxdigit(c) | |
break | |
endif | |
let r .= self.reader.get() | |
endfor | |
return r | |
FUNCTION 26_check_missing_endfor() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 485 | |
Called 48 times | |
Total time: 0.000298 | |
Self time: 0.000298 | |
count total (s) self (s) | |
48 0.000112 if self.context[0].type == s:NODE_FOR | |
throw s:Err(printf('E170: Missing :endfor: %s', a:ends), a:pos) | |
48 0.000031 endif | |
FUNCTION 124_parse_curly_parts() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4288 | |
Called 244 times | |
Total time: 0.145859 | |
Self time: 0.037432 | |
count total (s) self (s) | |
244 0.000460 let curly_parts = [] | |
244 0.002519 0.000813 let c = self.reader.peek() | |
244 0.002912 0.000935 let pos = self.reader.getpos() | |
244 0.001270 0.000727 if c ==# '<' && self.reader.peekn(5) ==? '<SID>' | |
5 0.000500 0.000026 let name = self.reader.getn(5) | |
5 0.000040 0.000025 let node = s:Node(s:NODE_CURLYNAMEPART) | |
5 0.000012 let node.curly = s:FALSE " Keep backword compatibility for the curly attribute | |
5 0.000013 let node.pos = pos | |
5 0.000009 let node.value = name | |
5 0.000018 call add(curly_parts, node) | |
244 0.000174 endif | |
503 0.000615 while s:TRUE | |
503 0.005219 0.001791 let c = self.reader.peek() | |
503 0.005808 0.002031 if s:isnamec(c) | |
244 0.003140 0.001220 let pos = self.reader.getpos() | |
244 0.054808 0.001062 let name = self.reader.read_name() | |
244 0.001801 0.001196 let node = s:Node(s:NODE_CURLYNAMEPART) | |
244 0.000535 let node.curly = s:FALSE " Keep backword compatibility for the curly attribute | |
244 0.000439 let node.pos = pos | |
244 0.000415 let node.value = name | |
244 0.000719 call add(curly_parts, node) | |
259 0.000381 elseif c ==# '{' | |
15 0.000173 0.000047 call self.reader.get() | |
15 0.000177 0.000056 let pos = self.reader.getpos() | |
15 0.000095 0.000061 let node = s:Node(s:NODE_CURLYNAMEEXPR) | |
15 0.000029 let node.curly = s:TRUE " Keep backword compatibility for the curly attribute | |
15 0.000026 let node.pos = pos | |
15 0.015765 0.009109 let node.value = self.parse_expr1() | |
15 0.000045 call add(curly_parts, node) | |
15 0.000981 0.000041 call self.reader.skip_white() | |
15 0.000194 0.000082 let c = self.reader.p(0) | |
15 0.000025 if c !=# '}' | |
throw s:Err(printf('unexpected token: %s', c), self.reader.getpos()) | |
15 0.000010 endif | |
15 0.000081 0.000045 call self.reader.seek_cur(1) | |
244 0.000180 else | |
244 0.000178 break | |
259 0.000169 endif | |
503 0.000970 endwhile | |
244 0.000322 return curly_parts | |
FUNCTION 245_compile_env() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5402 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return a:node.value | |
FUNCTION 272_getoctchrs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 6094 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return self.reader.read_odigit() | |
FUNCTION 102_peek() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3142 | |
Called 307 times | |
Total time: 0.129561 | |
Self time: 0.003812 | |
count total (s) self (s) | |
307 0.001555 0.001071 let pos = self.reader.tell() | |
307 0.125792 0.001093 let r = self.get() | |
307 0.001659 0.001093 call self.reader.seek_set(pos) | |
307 0.000324 return r | |
FUNCTION 162_incindent() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4739 | |
Called 22 times | |
Total time: 0.000100 | |
Self time: 0.000100 | |
count total (s) self (s) | |
22 0.000096 call insert(self.indent, self.indent[0] . a:s) | |
FUNCTION 78_parse_cmd_catch() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1756 | |
Called 2 times | |
Total time: 0.000508 | |
Self time: 0.000113 | |
count total (s) self (s) | |
2 0.000006 if self.context[0].type == s:NODE_FINALLY | |
throw s:Err('E604: :catch after :finally', self.ea.cmdpos) | |
2 0.000007 elseif self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH | |
throw s:Err('E603: :catch without :try', self.ea.cmdpos) | |
2 0.000001 endif | |
2 0.000004 if self.context[0].type !=# s:NODE_TRY | |
1 0.000013 0.000010 call self.pop_context() | |
2 0.000001 endif | |
2 0.000014 0.000009 let node = s:Node(s:NODE_CATCH) | |
2 0.000005 let node.pos = self.ea.cmdpos | |
2 0.000003 let node.body = [] | |
2 0.000004 let node.ea = self.ea | |
2 0.000003 let node.pattern = s:NIL | |
2 0.000119 0.000006 call self.reader.skip_white() | |
2 0.000032 0.000011 if !self.ends_excmds(self.reader.peek()) | |
1 0.000254 0.000008 let [node.pattern, _] = self.parse_pattern(self.reader.get()) | |
2 0.000002 endif | |
2 0.000007 call add(self.context[0].catch, node) | |
2 0.000014 0.000007 call self.push_context(node) | |
FUNCTION 147_read_digit() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4608 | |
Called 402 times | |
Total time: 0.039735 | |
Self time: 0.006989 | |
count total (s) self (s) | |
402 0.000527 let r = '' | |
555 0.031638 0.003495 while s:isdigit(self.peekn(1)) | |
153 0.005353 0.000750 let r .= self.getn(1) | |
555 0.000532 endwhile | |
402 0.000434 return r | |
FUNCTION 239_compile_string() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5368 | |
Called 44 times | |
Total time: 0.000074 | |
Self time: 0.000074 | |
count total (s) self (s) | |
44 0.000059 return a:node.value | |
FUNCTION 46_parse_cmd_insert() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1223 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_append() | |
FUNCTION 71_parse_cmd_while() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1669 | |
Called 1 time | |
Total time: 0.001730 | |
Self time: 0.000031 | |
count total (s) self (s) | |
1 0.000007 0.000004 let node = s:Node(s:NODE_WHILE) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.body = [] | |
1 0.000001 let node.ea = self.ea | |
1 0.001699 0.000010 let node.cond = self.parse_expr() | |
1 0.000002 let node.endwhile = s:NIL | |
1 0.000008 0.000004 call self.add_node(node) | |
1 0.000007 0.000004 call self.push_context(node) | |
FUNCTION 83_parse_cmd_echon() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1823 | |
Called 1 time | |
Total time: 0.002476 | |
Self time: 0.000023 | |
count total (s) self (s) | |
1 0.000007 0.000004 let node = s:Node(s:NODE_ECHON) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000001 let node.ea = self.ea | |
1 0.002450 0.000004 let node.list = self.parse_exprlist() | |
1 0.000014 0.000010 call self.add_node(node) | |
FUNCTION 19_pop_context() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 442 | |
Called 60 times | |
Total time: 0.000214 | |
Self time: 0.000214 | |
count total (s) self (s) | |
60 0.000193 call remove(self.context, 0) | |
FUNCTION 261_get_token_sq() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5829 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let start = self.reader.tell() | |
let r = '' | |
" Complement of range | |
if self.reader.p(0) ==# '^' | |
let r .= self.reader.get() | |
endif | |
" At the start ']' and '-' mean the literal character. | |
if self.reader.p(0) ==# ']' || self.reader.p(0) ==# '-' | |
let r .= self.reader.get() | |
endif | |
while s:TRUE | |
let startc = 0 | |
let c = self.reader.p(0) | |
if self.isend(c) | |
" If there is no matching ']', we assume the '[' is a normal character. | |
call self.reader.seek_set(start) | |
return [a:pre, '['] | |
elseif c ==# ']' | |
call self.reader.seek_cur(1) | |
return [a:pre . r . ']', '\[' . r . ']'] | |
elseif c ==# '[' | |
let e = self.get_token_sq_char_class() | |
if e ==# '' | |
let e = self.get_token_sq_equi_class() | |
if e ==# '' | |
let e = self.get_token_sq_coll_element() | |
if e ==# '' | |
let [e, startc] = self.get_token_sq_c() | |
endif | |
endif | |
endif | |
let r .= e | |
else | |
let [e, startc] = self.get_token_sq_c() | |
let r .= e | |
endif | |
if startc !=# 0 && self.reader.p(0) ==# '-' && !self.isend(self.reader.p(1)) && !(self.reader.p(1) ==# '\' && self.reader.p(2) ==# 'n') | |
call self.reader.seek_cur(1) | |
let r .= '-' | |
let c = self.reader.p(0) | |
if c ==# '[' | |
let e = self.get_token_sq_coll_element() | |
if e !=# '' | |
let endc = char2nr(e[2]) | |
else | |
let [e, endc] = self.get_token_sq_c() | |
endif | |
let r .= e | |
else | |
let [e, endc] = self.get_token_sq_c() | |
let r .= e | |
endif | |
if startc > endc || endc > startc + 256 | |
throw s:Err('E16: Invalid range', self.reader.getpos()) | |
endif | |
endif | |
endwhile | |
FUNCTION 225_compile_subtract() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5305 | |
Called 1 time | |
Total time: 0.000556 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000556 0.000007 return printf('(- %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 154_read_white() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4674 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
while s:iswhite(self.peekn(1)) | |
let r .= self.getn(1) | |
endwhile | |
return r | |
FUNCTION 223_compile_isnotcs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5297 | |
Called 1 time | |
Total time: 0.000560 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000560 0.000008 return printf('(isnot# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 237_compile_number() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5360 | |
Called 91 times | |
Total time: 0.000153 | |
Self time: 0.000153 | |
count total (s) self (s) | |
91 0.000118 return a:node.value | |
FUNCTION 152_read_integer() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4657 | |
Called 279 times | |
Total time: 0.034458 | |
Self time: 0.004164 | |
count total (s) self (s) | |
279 0.000349 let r = '' | |
279 0.013512 0.001035 let c = self.peekn(1) | |
279 0.000582 if c ==# '-' || c ==# '+' | |
let r = self.getn(1) | |
279 0.000214 endif | |
279 0.019072 0.001255 return r . self.read_digit() | |
FUNCTION 41_parse_cmd_modifier_range() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1090 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, self.reader.getpos()) | |
call self.add_node(node) | |
FUNCTION 177_compile_unlockvar() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5043 | |
Called 2 times | |
Total time: 0.001739 | |
Self time: 0.000058 | |
count total (s) self (s) | |
2 0.001675 0.000027 let list = map(a:node.list, 'self.compile(v:val)') | |
2 0.000003 if a:node.depth is# s:NIL | |
1 0.000029 0.000012 call self.out('(unlockvar %s)', join(list, ' ')) | |
1 0.000001 else | |
1 0.000022 0.000006 call self.out('(unlockvar %s %s)', a:node.depth, join(list, ' ')) | |
2 0.000002 endif | |
FUNCTION 28_parse_one_cmd() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 510 | |
Called 288 times | |
Total time: 2.487178 | |
Self time: 0.017652 | |
count total (s) self (s) | |
288 0.014495 0.001438 let self.ea = s:ExArg() | |
288 0.020641 0.001414 if self.reader.peekn(2) ==# '#!' | |
call self.parse_hashbang() | |
call self.reader.get() | |
return | |
288 0.000204 endif | |
288 0.024884 0.001165 call self.reader.skip_white_and_colon() | |
288 0.014976 0.001297 if self.reader.peekn(1) ==# '' | |
1 0.000021 0.000010 call self.reader.get() | |
1 0.000001 return | |
287 0.000198 endif | |
287 0.014223 0.001172 if self.reader.peekn(1) ==# '"' | |
8 0.002582 0.000036 call self.parse_comment() | |
8 0.000114 0.000031 call self.reader.get() | |
8 0.000010 return | |
279 0.000186 endif | |
279 0.003970 0.001347 let self.ea.linepos = self.reader.getpos() | |
279 0.301472 0.001326 call self.parse_command_modifiers() | |
279 0.195368 0.001384 call self.parse_range() | |
279 2.267794 0.405313 call self.parse_command() | |
259 0.059706 0.034787 call self.parse_trail() | |
FUNCTION 204_compile_gequalci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5221 | |
Called 1 time | |
Total time: 0.000554 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000554 0.000008 return printf('(>=? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 216_compile_nomatchci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5269 | |
Called 1 time | |
Total time: 0.000551 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000551 0.000007 return printf('(!~? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 187_compile_echohl() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5150 | |
Called 1 time | |
Total time: 0.000022 | |
Self time: 0.000006 | |
count total (s) self (s) | |
1 0.000022 0.000006 call self.out('(echohl "%s")', escape(a:node.str, '\"')) | |
FUNCTION 252_isend() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5444 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return a:c ==# '<EOF>' || a:c ==# '<EOL>' || a:c ==# self.delim | |
FUNCTION <SNR>45_isalnum() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 218 | |
Called 44 times | |
Total time: 0.000283 | |
Self time: 0.000283 | |
count total (s) self (s) | |
44 0.000263 return a:c =~# '^[0-9A-Za-z]$' | |
FUNCTION 132_seek_set() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4502 | |
Called 22724 times | |
Total time: 0.041746 | |
Self time: 0.041746 | |
count total (s) self (s) | |
22724 0.033787 let self.i = a:i | |
FUNCTION 59_parse_cmd_delfunction() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1451 | |
Called 3 times | |
Total time: 0.004957 | |
Self time: 0.000098 | |
count total (s) self (s) | |
3 0.000025 0.000017 let node = s:Node(s:NODE_DELFUNCTION) | |
3 0.000008 let node.pos = self.ea.cmdpos | |
3 0.000006 let node.ea = self.ea | |
3 0.004888 0.000053 let node.left = self.parse_lvalue_func() | |
3 0.000026 0.000010 call self.add_node(node) | |
FUNCTION 77_parse_cmd_try() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1744 | |
Called 1 time | |
Total time: 0.000033 | |
Self time: 0.000023 | |
count total (s) self (s) | |
1 0.000007 0.000004 let node = s:Node(s:NODE_TRY) | |
1 0.000003 let node.pos = self.ea.cmdpos | |
1 0.000001 let node.body = [] | |
1 0.000001 let node.ea = self.ea | |
1 0.000002 let node.catch = [] | |
1 0.000002 let node.finally = s:NIL | |
1 0.000001 let node.endtry = s:NIL | |
1 0.000007 0.000003 call self.add_node(node) | |
1 0.000007 0.000004 call self.push_context(node) | |
FUNCTION 130_eof() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4494 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return self.i >= len(self.buf) | |
FUNCTION 190_compile_execute() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5164 | |
Called 1 time | |
Total time: 0.000292 | |
Self time: 0.000012 | |
count total (s) self (s) | |
1 0.000271 0.000007 let list = map(a:node.list, 'self.compile(v:val)') | |
1 0.000021 0.000005 call self.out('(execute %s)', join(list, ' ')) | |
FUNCTION 92_parse_constlvalue() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1909 | |
Called 7 times | |
Total time: 0.022557 | |
Self time: 0.000339 | |
count total (s) self (s) | |
7 0.000420 0.000048 let p = s:LvalueParser.new(self.reader) | |
7 0.021813 0.000029 let node = p.parse() | |
7 0.000020 if node.type == s:NODE_IDENTIFIER | |
1 0.000017 0.000004 if !s:isvarname(node.value) | |
throw s:Err(printf('E461: Illegal variable name: %s', node.value), node.pos) | |
1 0.000001 endif | |
7 0.000007 endif | |
7 0.000024 if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME | |
1 0.000001 return node | |
6 0.000023 elseif node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_SLICE || node.type == s:NODE_DOT | |
3 0.106358 0.106334 throw s:Err('E996: Cannot lock a list or dict', node.pos) | |
3 0.000006 elseif node.type == s:NODE_OPTION | |
throw s:Err('E996: Cannot lock an option', node.pos) | |
2 0.000004 elseif node.type == s:NODE_ENV | |
1 0.024555 0.024547 throw s:Err('E996: Cannot lock an environment variable', node.pos) | |
1 0.000002 elseif node.type == s:NODE_REG | |
1 0.030928 0.030919 throw s:Err('E996: Cannot lock a register', node.pos) | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
FUNCTION 233_compile_subscript() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5337 | |
Called 5 times | |
Total time: 0.004352 | |
Self time: 0.000028 | |
count total (s) self (s) | |
5 0.002987 0.000275 return printf('(subscript %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 125_parse() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4333 | |
Called 85 times | |
Total time: 0.188005 | |
Self time: 0.000338 | |
count total (s) self (s) | |
85 0.187987 0.000320 return self.parse_lv8() | |
FUNCTION 104_get2() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3163 | |
Called 1226 times | |
Total time: 0.420596 | |
Self time: 0.265918 | |
count total (s) self (s) | |
1226 0.001979 let r = self.reader | |
1226 0.015836 0.004856 let pos = r.getpos() | |
1226 0.012667 0.004137 let c = r.peek() | |
1226 0.001789 if c ==# '<EOF>' | |
return self.token(s:TOKEN_EOF, c, pos) | |
1226 0.001725 elseif c ==# '<EOL>' | |
183 0.001088 0.000620 call r.seek_cur(1) | |
183 0.001599 0.000837 return self.token(s:TOKEN_EOL, c, pos) | |
1043 0.009698 0.003960 elseif s:iswhite(c) | |
let s = r.read_white() | |
return self.token(s:TOKEN_SPACE, s, pos) | |
1043 0.006017 0.005572 elseif c ==# '0' && (r.p(1) ==# 'X' || r.p(1) ==# 'x') && s:isxdigit(r.p(2)) | |
2 0.000122 0.000010 let s = r.getn(3) | |
2 0.001360 0.000010 let s .= r.read_xdigit() | |
2 0.000019 0.000010 return self.token(s:TOKEN_NUMBER, s, pos) | |
1041 0.004877 0.004503 elseif c ==# '0' && (r.p(1) ==# 'B' || r.p(1) ==# 'b') && (r.p(2) ==# '0' || r.p(2) ==# '1') | |
5 0.000293 0.000025 let s = r.getn(3) | |
5 0.001123 0.000019 let s .= r.read_bdigit() | |
5 0.000042 0.000022 return self.token(s:TOKEN_NUMBER, s, pos) | |
1036 0.003872 0.003540 elseif c ==# '0' && (r.p(1) ==# 'Z' || r.p(1) ==# 'z') && r.p(2) !=# '.' | |
11 0.000583 0.000064 let s = r.getn(2) | |
11 0.033836 0.029919 let s .= r.read_blob() | |
10 0.000112 0.000067 return self.token(s:TOKEN_BLOB, s, pos) | |
1025 0.009147 0.003880 elseif s:isdigit(c) | |
113 0.021019 0.000623 let s = r.read_digit() | |
113 0.001557 0.000650 if r.p(0) ==# '.' && s:isdigit(r.p(1)) | |
5 0.000173 0.000025 let s .= r.getn(1) | |
5 0.000861 0.000022 let s .= r.read_digit() | |
5 0.000216 0.000078 if (r.p(0) ==# 'E' || r.p(0) ==# 'e') && (s:isdigit(r.p(1)) || ((r.p(1) ==# '-' || r.p(1) ==# '+') && s:isdigit(r.p(2)))) | |
3 0.000136 0.000018 let s .= r.getn(2) | |
3 0.000413 0.000013 let s .= r.read_digit() | |
5 0.000005 endif | |
113 0.000071 endif | |
113 0.001032 0.000532 return self.token(s:TOKEN_NUMBER, s, pos) | |
912 0.003738 0.003417 elseif c ==# 'i' && r.p(1) ==# 's' && !s:isidc(r.p(2)) | |
5 0.000063 0.000021 if r.p(2) ==# '?' | |
1 0.000005 0.000003 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_ISCI, 'is?', pos) | |
4 0.000053 0.000020 elseif r.p(2) ==# '#' | |
2 0.000012 0.000007 call r.seek_cur(3) | |
2 0.000019 0.000010 return self.token(s:TOKEN_ISCS, 'is#', pos) | |
2 0.000002 else | |
2 0.000017 0.000010 call r.seek_cur(2) | |
2 0.000022 0.000012 return self.token(s:TOKEN_IS, 'is', pos) | |
endif | |
907 0.005092 0.004878 elseif c ==# 'i' && r.p(1) ==# 's' && r.p(2) ==# 'n' && r.p(3) ==# 'o' && r.p(4) ==# 't' && !s:isidc(r.p(5)) | |
5 0.000051 0.000018 if r.p(5) ==# '?' | |
1 0.000005 0.000003 call r.seek_cur(6) | |
1 0.000009 0.000005 return self.token(s:TOKEN_ISNOTCI, 'isnot?', pos) | |
4 0.000038 0.000012 elseif r.p(5) ==# '#' | |
2 0.000012 0.000007 call r.seek_cur(6) | |
2 0.000018 0.000009 return self.token(s:TOKEN_ISNOTCS, 'isnot#', pos) | |
2 0.000002 else | |
2 0.000012 0.000006 call r.seek_cur(5) | |
2 0.000019 0.000010 return self.token(s:TOKEN_ISNOT, 'isnot', pos) | |
endif | |
902 0.008526 0.003658 elseif s:isnamec1(c) | |
338 0.077067 0.001717 let s = r.read_name() | |
338 0.003417 0.001862 return self.token(s:TOKEN_IDENTIFIER, s, pos) | |
564 0.001162 0.001131 elseif c ==# '|' && r.p(1) ==# '|' | |
1 0.000006 0.000004 call r.seek_cur(2) | |
1 0.000009 0.000005 return self.token(s:TOKEN_OROR, '||', pos) | |
563 0.001040 0.001015 elseif c ==# '&' && r.p(1) ==# '&' | |
1 0.000006 0.000004 call r.seek_cur(2) | |
1 0.000008 0.000005 return self.token(s:TOKEN_ANDAND, '&&', pos) | |
562 0.001320 0.001110 elseif c ==# '=' && r.p(1) ==# '=' | |
3 0.000027 0.000009 if r.p(2) ==# '?' | |
1 0.000006 0.000004 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_EQEQCI, '==?', pos) | |
2 0.000018 0.000006 elseif r.p(2) ==# '#' | |
1 0.000011 0.000009 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_EQEQCS, '==#', pos) | |
1 0.000000 else | |
1 0.000006 0.000004 call r.seek_cur(2) | |
1 0.000008 0.000004 return self.token(s:TOKEN_EQEQ, '==', pos) | |
endif | |
559 0.001091 0.001040 elseif c ==# '!' && r.p(1) ==# '=' | |
3 0.000027 0.000009 if r.p(2) ==# '?' | |
1 0.000005 0.000003 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_NEQCI, '!=?', pos) | |
2 0.000018 0.000006 elseif r.p(2) ==# '#' | |
1 0.000011 0.000008 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_NEQCS, '!=#', pos) | |
1 0.000000 else | |
1 0.000006 0.000004 call r.seek_cur(2) | |
1 0.000008 0.000003 return self.token(s:TOKEN_NEQ, '!=', pos) | |
endif | |
556 0.001074 0.001023 elseif c ==# '>' && r.p(1) ==# '=' | |
4 0.000039 0.000012 if r.p(2) ==# '?' | |
1 0.000006 0.000003 call r.seek_cur(3) | |
1 0.000008 0.000004 return self.token(s:TOKEN_GTEQCI, '>=?', pos) | |
3 0.000029 0.000010 elseif r.p(2) ==# '#' | |
1 0.000012 0.000009 call r.seek_cur(3) | |
1 0.000008 0.000003 return self.token(s:TOKEN_GTEQCS, '>=#', pos) | |
2 0.000002 else | |
2 0.000012 0.000008 call r.seek_cur(2) | |
2 0.000018 0.000009 return self.token(s:TOKEN_GTEQ, '>=', pos) | |
endif | |
552 0.001079 0.000993 elseif c ==# '<' && r.p(1) ==# '=' | |
3 0.000028 0.000009 if r.p(2) ==# '?' | |
1 0.000005 0.000002 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_LTEQCI, '<=?', pos) | |
2 0.000018 0.000006 elseif r.p(2) ==# '#' | |
1 0.000011 0.000008 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_LTEQCS, '<=#', pos) | |
1 0.000000 else | |
1 0.000005 0.000003 call r.seek_cur(2) | |
1 0.000008 0.000004 return self.token(s:TOKEN_LTEQ, '<=', pos) | |
endif | |
549 0.001193 0.001021 elseif c ==# '=' && r.p(1) ==# '~' | |
3 0.000027 0.000009 if r.p(2) ==# '?' | |
1 0.000006 0.000004 call r.seek_cur(3) | |
1 0.000008 0.000004 return self.token(s:TOKEN_MATCHCI, '=~?', pos) | |
2 0.000017 0.000005 elseif r.p(2) ==# '#' | |
1 0.000005 0.000003 call r.seek_cur(3) | |
1 0.000008 0.000004 return self.token(s:TOKEN_MATCHCS, '=~#', pos) | |
1 0.000001 else | |
1 0.000005 0.000003 call r.seek_cur(2) | |
1 0.000008 0.000004 return self.token(s:TOKEN_MATCH, '=~', pos) | |
endif | |
546 0.001020 0.000996 elseif c ==# '!' && r.p(1) ==# '~' | |
3 0.000027 0.000009 if r.p(2) ==# '?' | |
1 0.000011 0.000008 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_NOMATCHCI, '!~?', pos) | |
2 0.000024 0.000011 elseif r.p(2) ==# '#' | |
1 0.000005 0.000003 call r.seek_cur(3) | |
1 0.000009 0.000005 return self.token(s:TOKEN_NOMATCHCS, '!~#', pos) | |
1 0.000001 else | |
1 0.000005 0.000002 call r.seek_cur(2) | |
1 0.000008 0.000004 return self.token(s:TOKEN_NOMATCH, '!~', pos) | |
endif | |
543 0.000628 elseif c ==# '>' | |
3 0.000028 0.000010 if r.p(1) ==# '?' | |
1 0.000005 0.000003 call r.seek_cur(2) | |
1 0.000008 0.000004 return self.token(s:TOKEN_GTCI, '>?', pos) | |
2 0.000018 0.000006 elseif r.p(1) ==# '#' | |
1 0.000011 0.000008 call r.seek_cur(2) | |
1 0.000009 0.000005 return self.token(s:TOKEN_GTCS, '>#', pos) | |
1 0.000000 else | |
1 0.000006 0.000004 call r.seek_cur(1) | |
1 0.000008 0.000004 return self.token(s:TOKEN_GT, '>', pos) | |
endif | |
540 0.000602 elseif c ==# '<' | |
8 0.000083 0.000026 if r.p(1) ==# '?' | |
1 0.000005 0.000002 call r.seek_cur(2) | |
1 0.000008 0.000004 return self.token(s:TOKEN_LTCI, '<?', pos) | |
7 0.000070 0.000022 elseif r.p(1) ==# '#' | |
1 0.000011 0.000008 call r.seek_cur(2) | |
1 0.000008 0.000004 return self.token(s:TOKEN_LTCS, '<#', pos) | |
6 0.000005 else | |
6 0.000039 0.000021 call r.seek_cur(1) | |
6 0.000058 0.000028 return self.token(s:TOKEN_LT, '<', pos) | |
endif | |
532 0.000572 elseif c ==# '+' | |
5 0.000036 0.000018 call r.seek_cur(1) | |
5 0.000044 0.000023 return self.token(s:TOKEN_PLUS, '+', pos) | |
527 0.000611 elseif c ==# '-' | |
20 0.000232 0.000078 if r.p(1) ==# '>' | |
15 0.000094 0.000056 call r.seek_cur(2) | |
15 0.000133 0.000067 return self.token(s:TOKEN_ARROW, '->', pos) | |
5 0.000003 else | |
5 0.000028 0.000014 call r.seek_cur(1) | |
5 0.000042 0.000021 return self.token(s:TOKEN_MINUS, '-', pos) | |
endif | |
507 0.000558 elseif c ==# '.' | |
27 0.000372 0.000139 if r.p(1) ==# '.' && r.p(2) ==# '.' | |
2 0.000014 0.000008 call r.seek_cur(3) | |
2 0.000019 0.000010 return self.token(s:TOKEN_DOTDOTDOT, '...', pos) | |
25 0.000241 0.000074 elseif r.p(1) ==# '.' | |
3 0.000016 0.000008 call r.seek_cur(2) | |
3 0.000024 0.000012 return self.token(s:TOKEN_DOTDOT, '..', pos) " TODO check scriptversion? | |
22 0.000019 else | |
22 0.000143 0.000082 call r.seek_cur(1) | |
22 0.000199 0.000107 return self.token(s:TOKEN_DOT, '.', pos) " TODO check scriptversion? | |
endif | |
480 0.000527 elseif c ==# '*' | |
3 0.000019 0.000011 call r.seek_cur(1) | |
3 0.000026 0.000014 return self.token(s:TOKEN_STAR, '*', pos) | |
477 0.000563 elseif c ==# '/' | |
2 0.000012 0.000006 call r.seek_cur(1) | |
2 0.000016 0.000008 return self.token(s:TOKEN_SLASH, '/', pos) | |
475 0.000554 elseif c ==# '%' | |
2 0.000012 0.000006 call r.seek_cur(1) | |
2 0.000016 0.000008 return self.token(s:TOKEN_PERCENT, '%', pos) | |
473 0.000533 elseif c ==# '!' | |
1 0.000006 0.000003 call r.seek_cur(1) | |
1 0.000008 0.000004 return self.token(s:TOKEN_NOT, '!', pos) | |
472 0.000531 elseif c ==# '?' | |
1 0.000005 0.000002 call r.seek_cur(1) | |
1 0.000009 0.000005 return self.token(s:TOKEN_QUESTION, '?', pos) | |
471 0.000552 elseif c ==# ':' | |
27 0.000175 0.000096 call r.seek_cur(1) | |
27 0.000236 0.000122 return self.token(s:TOKEN_COLON, ':', pos) | |
444 0.000494 elseif c ==# '#' | |
8 0.000093 0.000031 if r.p(1) ==# '{' | |
8 0.000049 0.000026 call r.seek_cur(2) | |
8 0.000073 0.000038 return self.token(s:TOKEN_LITCOPEN, '#{', pos) | |
else | |
call r.seek_cur(1) | |
return self.token(s:TOKEN_SHARP, '#', pos) | |
endif | |
436 0.000479 elseif c ==# '(' | |
39 0.000303 0.000170 call r.seek_cur(1) | |
39 0.000368 0.000185 return self.token(s:TOKEN_POPEN, '(', pos) | |
397 0.000442 elseif c ==# ')' | |
33 0.000232 0.000125 call r.seek_cur(1) | |
33 0.000320 0.000171 return self.token(s:TOKEN_PCLOSE, ')', pos) | |
364 0.000402 elseif c ==# '[' | |
34 0.000213 0.000112 call r.seek_cur(1) | |
34 0.000325 0.000161 return self.token(s:TOKEN_SQOPEN, '[', pos) | |
330 0.000374 elseif c ==# ']' | |
39 0.000284 0.000163 call r.seek_cur(1) | |
39 0.000330 0.000167 return self.token(s:TOKEN_SQCLOSE, ']', pos) | |
291 0.000359 elseif c ==# '{' | |
42 0.000287 0.000145 call r.seek_cur(1) | |
42 0.000389 0.000203 return self.token(s:TOKEN_COPEN, '{', pos) | |
249 0.000284 elseif c ==# '}' | |
53 0.000422 0.000254 call r.seek_cur(1) | |
53 0.000493 0.000262 return self.token(s:TOKEN_CCLOSE, '}', pos) | |
196 0.000224 elseif c ==# ',' | |
105 0.000779 0.000427 call r.seek_cur(1) | |
105 0.000973 0.000503 return self.token(s:TOKEN_COMMA, ',', pos) | |
91 0.000104 elseif c ==# "'" | |
17 0.000112 0.000063 call r.seek_cur(1) | |
17 0.000149 0.000076 return self.token(s:TOKEN_SQUOTE, "'", pos) | |
74 0.000078 elseif c ==# '"' | |
31 0.000209 0.000111 call r.seek_cur(1) | |
31 0.000313 0.000151 return self.token(s:TOKEN_DQUOTE, '"', pos) | |
43 0.000055 elseif c ==# '$' | |
2 0.000093 0.000012 let s = r.getn(1) | |
2 0.000426 0.000013 let s .= r.read_word() | |
2 0.000024 0.000012 return self.token(s:TOKEN_ENV, s, pos) | |
41 0.000050 elseif c ==# '@' | |
" @<EOL> is treated as @" | |
2 0.000129 0.000018 return self.token(s:TOKEN_REG, r.getn(2), pos) | |
39 0.000043 elseif c ==# '&' | |
2 0.000003 let s = '' | |
2 0.000049 0.000015 if (r.p(1) ==# 'g' || r.p(1) ==# 'l') && r.p(2) ==# ':' | |
let s = r.getn(3) . r.read_word() | |
2 0.000002 else | |
2 0.002007 0.000017 let s = r.getn(1) . r.read_word() | |
2 0.000002 endif | |
2 0.000023 0.000012 return self.token(s:TOKEN_OPTION, s, pos) | |
37 0.000042 elseif c ==# '=' | |
21 0.000137 0.000076 call r.seek_cur(1) | |
21 0.000201 0.000101 return self.token(s:TOKEN_EQ, '=', pos) | |
16 0.000020 elseif c ==# '|' | |
3 0.000027 0.000017 call r.seek_cur(1) | |
3 0.000030 0.000015 return self.token(s:TOKEN_OR, '|', pos) | |
13 0.000013 elseif c ==# ';' | |
12 0.000075 0.000041 call r.seek_cur(1) | |
12 0.000100 0.000049 return self.token(s:TOKEN_SEMICOLON, ';', pos) | |
1 0.000001 elseif c ==# '`' | |
1 0.000006 0.000002 call r.seek_cur(1) | |
1 0.000009 0.000004 return self.token(s:TOKEN_BACKTICK, '`', pos) | |
else | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
endif | |
FUNCTION 111_parse_expr1() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3525 | |
Called 343 times | |
Total time: 1.234936 | |
Self time: 0.012608 | |
count total (s) self (s) | |
343 1.150846 0.440988 let left = self.parse_expr2() | |
337 0.001647 0.001175 let pos = self.reader.tell() | |
337 0.007763 0.001242 let token = self.tokenizer.get() | |
337 0.000637 if token.type == s:TOKEN_QUESTION | |
1 0.000007 0.000005 let node = s:Node(s:NODE_TERNARY) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.cond = left | |
1 0.000003 let node.left = self.parse_expr1() | |
1 0.000021 0.000003 let token = self.tokenizer.get() | |
1 0.000001 if token.type !=# s:TOKEN_COLON | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
1 0.000000 endif | |
1 0.000003 let node.right = self.parse_expr1() | |
1 0.000002 let left = node | |
336 0.000250 else | |
336 0.001576 0.001027 call self.reader.seek_set(pos) | |
337 0.000260 endif | |
337 0.000339 return left | |
FUNCTION 269_get_token_percent_sq() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 6035 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let r = '' | |
while s:TRUE | |
let c = self.reader.peek() | |
if self.isend(c) | |
throw s:Err('E69: Missing ] after \%[', self.reader.getpos()) | |
elseif c ==# ']' | |
if r ==# '' | |
throw s:Err('E70: Empty \%[', self.reader.getpos()) | |
endif | |
call self.reader.seek_cur(1) | |
break | |
endif | |
call self.reader.seek_cur(1) | |
let r .= c | |
endwhile | |
return [a:pre . r . ']', '\%[' . r . ']'] | |
FUNCTION <SNR>45_numtoname() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 31 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let sig = printf("function('%s')", a:num) | |
for k in keys(s:) | |
if type(s:[k]) == type({}) | |
for name in keys(s:[k]) | |
if type(s:[k][name]) == type(function('tr')) && string(s:[k][name]) == sig | |
return printf('%s.%s', k, name) | |
endif | |
endfor | |
endif | |
endfor | |
return a:num | |
FUNCTION 158_skip_white_and_colon() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4704 | |
Called 567 times | |
Total time: 0.042512 | |
Self time: 0.010048 | |
count total (s) self (s) | |
597 0.000923 while s:TRUE | |
597 0.030286 0.002458 let c = self.peekn(1) | |
597 0.007432 0.002921 if !s:iswhite(c) && c !=# ':' | |
567 0.000525 break | |
30 0.000021 endif | |
30 0.000256 0.000131 call self.seek_cur(1) | |
597 0.000784 endwhile | |
FUNCTION 206_compile_smaller() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5229 | |
Called 1 time | |
Total time: 0.000561 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000561 0.000007 return printf('(< %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 82_parse_cmd_echo() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1815 | |
Called 140 times | |
Total time: 0.728698 | |
Self time: 0.002481 | |
count total (s) self (s) | |
140 0.001052 0.000679 let node = s:Node(s:NODE_ECHO) | |
140 0.000327 let node.pos = self.ea.cmdpos | |
140 0.000247 let node.ea = self.ea | |
140 1.715110 0.989823 let node.list = self.parse_exprlist() | |
135 0.000997 0.000440 call self.add_node(node) | |
FUNCTION 230_compile_not() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5325 | |
Called 1 time | |
Total time: 0.000283 | |
Self time: 0.000005 | |
count total (s) self (s) | |
1 0.000283 0.000005 return printf('(! %s)', self.compile(a:node.left)) | |
FUNCTION 116_parse_expr6() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3835 | |
Called 390 times | |
Total time: 1.047970 | |
Self time: 0.016593 | |
count total (s) self (s) | |
390 0.988849 0.441588 let left = self.parse_expr7() | |
388 0.000574 while s:TRUE | |
388 0.002033 0.001447 let pos = self.reader.tell() | |
388 0.009740 0.001498 let token = self.tokenizer.get() | |
388 0.000769 if token.type == s:TOKEN_STAR | |
2 0.000013 0.000008 let node = s:Node(s:NODE_MULTIPLY) | |
2 0.000004 let node.pos = token.pos | |
2 0.000003 let node.left = left | |
2 0.003038 0.000007 let node.right = self.parse_expr7() | |
2 0.000002 let left = node | |
386 0.000696 elseif token.type == s:TOKEN_SLASH | |
1 0.000006 0.000004 let node = s:Node(s:NODE_DIVIDE) | |
1 0.000002 let node.pos = token.pos | |
1 0.000001 let node.left = left | |
1 0.001561 0.000005 let node.right = self.parse_expr7() | |
1 0.000001 let left = node | |
385 0.000645 elseif token.type == s:TOKEN_PERCENT | |
1 0.000006 0.000004 let node = s:Node(s:NODE_REMAINDER) | |
1 0.000002 let node.pos = token.pos | |
1 0.000002 let node.left = left | |
1 0.001560 0.000004 let node.right = self.parse_expr7() | |
1 0.000002 let left = node | |
384 0.000265 else | |
384 0.001937 0.001273 call self.reader.seek_set(pos) | |
384 0.000295 break | |
4 0.000003 endif | |
388 0.000947 endwhile | |
384 0.000404 return left | |
FUNCTION 217_compile_nomatchcs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5273 | |
Called 1 time | |
Total time: 0.000553 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000552 0.000007 return printf('(!~# %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION <SNR>45_isnamec() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 246 | |
Called 2047 times | |
Total time: 0.015351 | |
Self time: 0.015351 | |
count total (s) self (s) | |
2047 0.014659 return a:c =~# '^[0-9A-Za-z_:#]$' | |
FUNCTION 65_parse_cmd_lockvar() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1583 | |
Called 2 times | |
Total time: 0.012479 | |
Self time: 0.000076 | |
count total (s) self (s) | |
2 0.000014 0.000008 let node = s:Node(s:NODE_LOCKVAR) | |
2 0.000005 let node.pos = self.ea.cmdpos | |
2 0.000004 let node.ea = self.ea | |
2 0.000003 let node.depth = s:NIL | |
2 0.000002 let node.list = [] | |
2 0.000123 0.000007 call self.reader.skip_white() | |
2 0.000111 0.000011 if s:isdigit(self.reader.peekn(1)) | |
1 0.000150 0.000011 let node.depth = str2nr(self.reader.read_digit(), 10) | |
2 0.000002 endif | |
2 0.012044 0.000010 let node.list = self.parse_lvaluelist() | |
2 0.000015 0.000007 call self.add_node(node) | |
FUNCTION 182_compile_break() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5105 | |
Called 1 time | |
Total time: 0.000019 | |
Self time: 0.000003 | |
count total (s) self (s) | |
1 0.000019 0.000003 call self.out('(break)') | |
FUNCTION 73_parse_cmd_for() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1691 | |
Called 1 time | |
Total time: 0.010139 | |
Self time: 0.000058 | |
count total (s) self (s) | |
1 0.000007 0.000004 let node = s:Node(s:NODE_FOR) | |
1 0.000003 let node.pos = self.ea.cmdpos | |
1 0.000001 let node.body = [] | |
1 0.000002 let node.ea = self.ea | |
1 0.000002 let node.left = s:NIL | |
1 0.000001 let node.right = s:NIL | |
1 0.000001 let node.endfor = s:NIL | |
1 0.007437 0.000013 let lhs = self.parse_letlhs() | |
1 0.000002 let node.left = lhs.left | |
1 0.000002 let node.list = lhs.list | |
1 0.000001 let node.rest = lhs.rest | |
1 0.000130 0.000003 call self.reader.skip_white() | |
1 0.000013 0.000004 let epos = self.reader.getpos() | |
1 0.000233 0.000003 if self.reader.read_alpha() !=# 'in' | |
throw s:Err('Missing "in" after :for', epos) | |
1 0.000001 endif | |
1 0.002284 0.000003 let node.right = self.parse_expr() | |
1 0.000008 0.000004 call self.add_node(node) | |
1 0.000006 0.000003 call self.push_context(node) | |
FUNCTION <SNR>45_isdigit() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 222 | |
Called 2186 times | |
Total time: 0.012391 | |
Self time: 0.012391 | |
count total (s) self (s) | |
2186 0.011628 return a:c =~# '^[0-9]$' | |
FUNCTION 226_compile_concat() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5309 | |
Called 8 times | |
Total time: 0.004933 | |
Self time: 0.000059 | |
count total (s) self (s) | |
8 0.004134 0.000278 return printf('(concat %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 189_compile_echoerr() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5159 | |
Called 1 time | |
Total time: 0.000302 | |
Self time: 0.000021 | |
count total (s) self (s) | |
1 0.000272 0.000008 let list = map(a:node.list, 'self.compile(v:val)') | |
1 0.000030 0.000013 call self.out('(echoerr %s)', join(list, ' ')) | |
FUNCTION 150_read_xdigit() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4641 | |
Called 2 times | |
Total time: 0.001350 | |
Self time: 0.000199 | |
count total (s) self (s) | |
2 0.000002 let r = '' | |
16 0.000844 0.000088 while s:isxdigit(self.peekn(1)) | |
14 0.000470 0.000075 let r .= self.getn(1) | |
16 0.000022 endwhile | |
2 0.000002 return r | |
FUNCTION 255_get_token_very_magic() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5522 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
return self.get_token_backslash_common() | |
elseif c ==# '*' | |
return ['*', '\*'] | |
elseif c ==# '+' | |
return ['+', '\+'] | |
elseif c ==# '=' | |
return ['=', '\='] | |
elseif c ==# '?' | |
return ['?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('{') | |
elseif c ==# '@' | |
return self.get_token_at('@') | |
elseif c ==# '^' | |
return ['^', '\^'] | |
elseif c ==# '$' | |
return ['$', '\$'] | |
elseif c ==# '.' | |
return ['.', '\.'] | |
elseif c ==# '<' | |
return ['<', '\<'] | |
elseif c ==# '>' | |
return ['>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('%') | |
elseif c ==# '[' | |
return self.get_token_sq('[') | |
elseif c ==# '~' | |
return ['~', '\~'] | |
elseif c ==# '|' | |
return ['|', '\|'] | |
elseif c ==# '&' | |
return ['&', '\&'] | |
elseif c ==# '(' | |
return ['(', '\('] | |
elseif c ==# ')' | |
return [')', '\)'] | |
endif | |
return [c, c] | |
FUNCTION 238_compile_blob() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5364 | |
Called 9 times | |
Total time: 0.000017 | |
Self time: 0.000017 | |
count total (s) self (s) | |
9 0.000015 return a:node.value | |
FUNCTION 185_compile_echo() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5140 | |
Called 125 times | |
Total time: 0.104801 | |
Self time: 0.002037 | |
count total (s) self (s) | |
125 0.101746 0.001164 let list = map(a:node.list, 'self.compile(v:val)') | |
125 0.002979 0.000797 call self.out('(echo %s)', join(list, ' ')) | |
FUNCTION 167_compile_comment() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4957 | |
Called 7 times | |
Total time: 0.000172 | |
Self time: 0.000033 | |
count total (s) self (s) | |
7 0.000170 0.000031 call self.out(';%s', a:node.str) | |
FUNCTION 253_parse_regexp() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5448 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let prevtoken = '' | |
let ntoken = '' | |
let ret = [] | |
if self.reader.peekn(4) ==# '\%#=' | |
let epos = self.reader.getpos() | |
let token = self.reader.getn(5) | |
if token !=# '\%#=0' && token !=# '\%#=1' && token !=# '\%#=2' | |
throw s:Err('E864: \%#= can only be followed by 0, 1, or 2', epos) | |
endif | |
call add(ret, token) | |
endif | |
while !self.isend(self.reader.peek()) | |
let prevtoken = ntoken | |
let [token, ntoken] = self.get_token() | |
if ntoken ==# '\m' | |
let self.reg_magic = self.RE_MAGIC | |
elseif ntoken ==# '\M' | |
let self.reg_magic = self.RE_NOMAGIC | |
elseif ntoken ==# '\v' | |
let self.reg_magic = self.RE_VERY_MAGIC | |
elseif ntoken ==# '\V' | |
let self.reg_magic = self.RE_VERY_NOMAGIC | |
elseif ntoken ==# '\*' | |
" '*' is not magic as the very first character. | |
if prevtoken ==# '' || prevtoken ==# '\^' || prevtoken ==# '\&' || prevtoken ==# '\|' || prevtoken ==# '\(' | |
let ntoken = '*' | |
endif | |
elseif ntoken ==# '\^' | |
" '^' is only magic as the very first character. | |
if self.reg_magic !=# self.RE_VERY_MAGIC && prevtoken !=# '' && prevtoken !=# '\&' && prevtoken !=# '\|' && prevtoken !=# '\n' && prevtoken !=# '\(' && prevtoken !=# '\%(' | |
let ntoken = '^' | |
endif | |
elseif ntoken ==# '\$' | |
" '$' is only magic as the very last character | |
let pos = self.reader.tell() | |
if self.reg_magic !=# self.RE_VERY_MAGIC | |
while !self.isend(self.reader.peek()) | |
let [t, n] = self.get_token() | |
" XXX: Vim doesn't check \v and \V? | |
if n ==# '\c' || n ==# '\C' || n ==# '\m' || n ==# '\M' || n ==# '\Z' | |
continue | |
endif | |
if n !=# '\|' && n !=# '\&' && n !=# '\n' && n !=# '\)' | |
let ntoken = '$' | |
endif | |
break | |
endwhile | |
endif | |
call self.reader.seek_set(pos) | |
elseif ntoken ==# '\?' | |
" '?' is literal in '?' command. | |
if self.cmd ==# '?' | |
let ntoken = '?' | |
endif | |
endif | |
call add(ret, ntoken) | |
endwhile | |
return ret | |
FUNCTION 262_get_token_sq_c() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5890 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
let c = self.reader.p(0) | |
if c ==# '\' | |
call self.reader.seek_cur(1) | |
let c = self.reader.p(0) | |
if c ==# 'n' | |
call self.reader.seek_cur(1) | |
return ['\n', 0] | |
elseif c ==# 'r' | |
call self.reader.seek_cur(1) | |
return ['\r', 13] | |
elseif c ==# 't' | |
call self.reader.seek_cur(1) | |
return ['\t', 9] | |
elseif c ==# 'e' | |
call self.reader.seek_cur(1) | |
return ['\e', 27] | |
elseif c ==# 'b' | |
call self.reader.seek_cur(1) | |
return ['\b', 8] | |
elseif stridx(']^-\', c) !=# -1 | |
call self.reader.seek_cur(1) | |
return ['\' . c, char2nr(c)] | |
elseif stridx('doxuU', c) !=# -1 | |
let [c, n] = self.get_token_sq_coll_char() | |
return [c, n] | |
else | |
return ['\', char2nr('\')] | |
endif | |
elseif c ==# '-' | |
call self.reader.seek_cur(1) | |
return ['-', char2nr('-')] | |
else | |
call self.reader.seek_cur(1) | |
return [c, char2nr(c)] | |
endif | |
FUNCTION 231_compile_plus() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5329 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
return printf('(+ %s)', self.compile(a:node.left)) | |
FUNCTION 53_parse_cmd_ruby() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1298 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.parse_cmd_lua() | |
FUNCTION 243_compile_identifier() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5394 | |
Called 219 times | |
Total time: 0.000363 | |
Self time: 0.000363 | |
count total (s) self (s) | |
219 0.000298 return a:node.value | |
FUNCTION 171_compile_return() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4986 | |
Called 2 times | |
Total time: 0.000652 | |
Self time: 0.000026 | |
count total (s) self (s) | |
2 0.000003 if a:node.left is# s:NIL | |
call self.out('(return)') | |
2 0.000000 else | |
2 0.000641 0.000015 call self.out('(return %s)', self.compile(a:node.left)) | |
2 0.000001 endif | |
FUNCTION 66_parse_cmd_unlockvar() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1597 | |
Called 2 times | |
Total time: 0.012188 | |
Self time: 0.000077 | |
count total (s) self (s) | |
2 0.000015 0.000010 let node = s:Node(s:NODE_UNLOCKVAR) | |
2 0.000005 let node.pos = self.ea.cmdpos | |
2 0.000002 let node.ea = self.ea | |
2 0.000003 let node.depth = s:NIL | |
2 0.000004 let node.list = [] | |
2 0.000125 0.000006 call self.reader.skip_white() | |
2 0.000114 0.000018 if s:isdigit(self.reader.peekn(1)) | |
1 0.000149 0.000005 let node.depth = str2nr(self.reader.read_digit(), 10) | |
2 0.000000 endif | |
2 0.011748 0.000009 let node.list = self.parse_lvaluelist() | |
2 0.000015 0.000007 call self.add_node(node) | |
FUNCTION 213_compile_matchci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5257 | |
Called 1 time | |
Total time: 0.000565 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000565 0.000009 return printf('(=~? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 103_get() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 3149 | |
Called 4172 times | |
Total time: 0.622626 | |
Self time: 0.085735 | |
count total (s) self (s) | |
" FIXME: remove dirty hack | |
4172 0.026760 0.020485 if has_key(self.cache, self.reader.tell()) | |
2946 0.017043 0.012926 let x = self.cache[self.reader.tell()] | |
2946 0.016547 0.011272 call self.reader.seek_set(x[0]) | |
2946 0.004476 return x[1] | |
1226 0.000833 endif | |
1226 0.005928 0.004218 let pos = self.reader.tell() | |
1226 0.101160 0.004160 call self.reader.skip_white() | |
1226 0.456084 0.035488 let r = self.get2() | |
1225 0.009346 0.007428 let self.cache[pos] = [self.reader.tell(), r] | |
1225 0.001227 return r | |
FUNCTION 137_get() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4528 | |
Called 324 times | |
Total time: 0.002753 | |
Self time: 0.002753 | |
count total (s) self (s) | |
324 0.000731 if self.i >= len(self.buf) | |
return '<EOF>' | |
324 0.000216 endif | |
324 0.000461 let self.i += 1 | |
324 0.000787 return self.buf[self.i - 1] | |
FUNCTION <SNR>45_iswhite() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 242 | |
Called 7087 times | |
Total time: 0.044540 | |
Self time: 0.044540 | |
count total (s) self (s) | |
7087 0.042045 return a:c =~# '^[ \t]$' | |
FUNCTION 47_parse_cmd_loadkeymap() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1227 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.readline() | |
let lines = [cmdline] | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.readline() | |
call add(lines, line) | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
FUNCTION 202_compile_greatercs() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5213 | |
Called 1 time | |
Total time: 0.000552 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000552 0.000007 return printf('(># %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 64_parse_cmd_unlet() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1575 | |
Called 1 time | |
Total time: 0.005928 | |
Self time: 0.000019 | |
count total (s) self (s) | |
1 0.000007 0.000005 let node = s:Node(s:NODE_UNLET) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.005909 0.000005 let node.list = self.parse_lvaluelist() | |
1 0.000007 0.000004 call self.add_node(node) | |
FUNCTION 85_parse_cmd_echomsg() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 1842 | |
Called 1 time | |
Total time: 0.002443 | |
Self time: 0.000018 | |
count total (s) self (s) | |
1 0.000007 0.000004 let node = s:Node(s:NODE_ECHOMSG) | |
1 0.000002 let node.pos = self.ea.cmdpos | |
1 0.000002 let node.ea = self.ea | |
1 0.002423 0.000005 let node.list = self.parse_exprlist() | |
1 0.000007 0.000003 call self.add_node(node) | |
FUNCTION 149_read_blob() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4624 | |
Called 11 times | |
Total time: 0.003917 | |
Self time: 0.001020 | |
count total (s) self (s) | |
11 0.000015 let r = '' | |
35 0.000026 while 1 | |
35 0.002053 0.000140 let s = self.peekn(2) | |
35 0.000224 if s =~# '^[0-9A-Fa-f][0-9A-Fa-f]$' | |
23 0.001048 0.000110 let r .= self.getn(2) | |
12 0.000043 elseif s =~# '^\.[0-9A-Fa-f]$' | |
1 0.000032 0.000004 let r .= self.getn(1) | |
11 0.000052 elseif s =~# '^[0-9A-Fa-f][^0-9A-Fa-f]$' | |
throw s:Err('E973: Blob literal should have an even number of hex characters:' . s, self.getpos()) | |
10 0.000006 else | |
10 0.000007 break | |
24 0.000019 endif | |
34 0.000035 endwhile | |
10 0.000010 return r | |
FUNCTION 22_check_missing_endfunction() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 461 | |
Called 28 times | |
Total time: 0.000223 | |
Self time: 0.000223 | |
count total (s) self (s) | |
28 0.000085 if self.context[0].type == s:NODE_FUNCTION | |
throw s:Err(printf('E126: Missing :endfunction: %s', a:ends), a:pos) | |
28 0.000013 endif | |
FUNCTION 258_get_token_very_nomagic() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5671 | |
Called 0 times | |
Total time: 0.000000 | |
Self time: 0.000000 | |
count total (s) self (s) | |
if self.isend(self.reader.peek()) | |
return ['<END>', '<END>'] | |
endif | |
let c = self.reader.get() | |
if c ==# '\' | |
let pos = self.reader.tell() | |
let c = self.reader.get() | |
if c ==# '*' | |
return ['\*', '\*'] | |
elseif c ==# '+' | |
return ['\+', '\+'] | |
elseif c ==# '=' | |
return ['\=', '\='] | |
elseif c ==# '?' | |
return ['\?', '\?'] | |
elseif c ==# '{' | |
return self.get_token_brace('\{') | |
elseif c ==# '@' | |
return self.get_token_at('\@') | |
elseif c ==# '^' | |
return ['\^', '\^'] | |
elseif c ==# '$' | |
return ['\$', '\$'] | |
elseif c ==# '<' | |
return ['\<', '\<'] | |
elseif c ==# '>' | |
return ['\>', '\>'] | |
elseif c ==# '%' | |
return self.get_token_percent('\%') | |
elseif c ==# '~' | |
return ['\~', '\~'] | |
elseif c ==# '[' | |
return self.get_token_sq('\[') | |
elseif c ==# '|' | |
return ['\|', '\|'] | |
elseif c ==# '&' | |
return ['\&', '\&'] | |
elseif c ==# '(' | |
return ['\(', '\('] | |
elseif c ==# ')' | |
return ['\)', '\)'] | |
endif | |
call self.reader.seek_set(pos) | |
return self.get_token_backslash_common() | |
endif | |
return [c, c] | |
FUNCTION 173_compile_let() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4998 | |
Called 17 times | |
Total time: 0.021851 | |
Self time: 0.000521 | |
count total (s) self (s) | |
17 0.000025 let left = '' | |
17 0.000056 if a:node.left isnot# s:NIL | |
13 0.008620 0.000047 let left = self.compile(a:node.left) | |
4 0.000003 else | |
4 0.002229 0.000042 let left = join(map(a:node.list, 'self.compile(v:val)'), ' ') | |
4 0.000005 if a:node.rest isnot# s:NIL | |
4 0.001110 0.000016 let left .= ' . ' . self.compile(a:node.rest) | |
4 0.000002 endif | |
4 0.000010 let left = '(' . left . ')' | |
17 0.000008 endif | |
17 0.009244 0.000067 let right = self.compile(a:node.right) | |
17 0.000393 0.000094 call self.out('(let %s %s %s)', a:node.op, left, right) | |
FUNCTION 172_compile_excall() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4994 | |
Called 6 times | |
Total time: 0.006305 | |
Self time: 0.000047 | |
count total (s) self (s) | |
6 0.006302 0.000044 call self.out('(call %s)', self.compile(a:node.left)) | |
FUNCTION 140_peekline() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4558 | |
Called 1 time | |
Total time: 0.000156 | |
Self time: 0.000005 | |
count total (s) self (s) | |
1 0.000156 0.000005 return self.peekn(-1) | |
FUNCTION 144_setpos() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4588 | |
Called 1 time | |
Total time: 0.000003 | |
Self time: 0.000003 | |
count total (s) self (s) | |
1 0.000002 let self.i = a:pos.i | |
FUNCTION 157_skip_white() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 4698 | |
Called 3412 times | |
Total time: 0.273626 | |
Self time: 0.046700 | |
count total (s) self (s) | |
4354 0.253146 0.028990 while s:iswhite(self.peekn(1)) | |
942 0.006381 0.003611 call self.seek_cur(1) | |
4354 0.004414 endwhile | |
FUNCTION 195_compile_equalci() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 5185 | |
Called 1 time | |
Total time: 0.000555 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000555 0.000007 return printf('(==? %s %s)', self.compile(a:node.left), self.compile(a:node.right)) | |
FUNCTION 96_ends_excmds() | |
Defined: ~/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim line 2015 | |
Called 524 times | |
Total time: 0.002241 | |
Self time: 0.002241 | |
count total (s) self (s) | |
524 0.002049 return a:c ==# '' || a:c ==# '|' || a:c ==# '"' || a:c ==# '<EOF>' || a:c ==# '<EOL>' | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
50 2.498462 0.005561 27_parse() | |
288 2.487178 0.017652 28_parse_one_cmd() | |
279 1.862481 0.044934 32_parse_command() | |
278 1.363741 0.040374 33__parse_command() | |
343 1.234936 0.012608 111_parse_expr1() | |
343 1.210702 0.008636 112_parse_expr2() | |
344 1.192212 0.008772 113_parse_expr3() | |
345 1.173702 0.070662 114_parse_expr4() | |
376 1.078790 0.018262 115_parse_expr5() | |
390 1.047970 0.016593 116_parse_expr6() | |
395 1.020268 0.014066 117_parse_expr7() | |
205 0.946120 0.004166 88_parse_expr() | |
205 0.933214 0.000897 110_parse() | |
393 0.843865 0.134013 118_parse_expr8() | |
144 0.735355 0.006962 89_parse_exprlist() | |
15932 0.732700 0.206241 138_peekn() | |
140 0.728698 0.002481 82_parse_cmd_echo() | |
4172 0.622626 0.085735 103_get() | |
20636 0.611853 139_getn() | |
762 0.585751 0.142650 164_compile() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
20636 0.611853 139_getn() | |
1226 0.420596 0.265918 104_get2() | |
393 0.538160 0.232686 119_parse_expr9() | |
15932 0.732700 0.206241 138_peekn() | |
279 0.358244 0.178332 34_find_command() | |
762 0.585751 0.142650 164_compile() | |
393 0.843865 0.134013 118_parse_expr8() | |
50 0.117723 129___init__() | |
4172 0.622626 0.085735 103_get() | |
345 1.173702 0.070662 114_parse_expr4() | |
279 0.300146 0.057949 29_parse_command_modifiers() | |
618 0.327196 0.048025 145_read_alpha() | |
3412 0.273626 0.046700 157_skip_white() | |
30024 0.046515 131_tell() | |
279 1.862481 0.044934 32_parse_command() | |
7087 0.044540 <SNR>45_iswhite() | |
279 0.193984 0.041938 30_parse_range() | |
22724 0.041746 132_seek_set() | |
278 1.363741 0.040374 33__parse_command() | |
244 0.145859 0.037432 124_parse_curly_parts() | |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT /Users/tyru/config/home/volt/repos/github.com/vim-jp/vim-vimlparser/autoload/vimlparser.vim | |
Sourced 1 time | |
Total time: 0.008346 | |
Self time: 0.008346 | |
count total (s) self (s) | |
" vim:set ts=8 sts=2 sw=2 tw=0 et: | |
" | |
" VimL parser - Vim Script Parser | |
" | |
" License: This file is placed in the public domain. | |
1 0.000004 function! vimlparser#import() abort | |
return s: | |
endfunction | |
" @brief Read input as VimScript and return stringified AST. | |
" @param input Input filename or string of VimScript. | |
" @return Stringified AST. | |
1 0.000002 function! vimlparser#test(input, ...) abort | |
try | |
if a:0 > 0 | |
let l:neovim = a:1 | |
else | |
let l:neovim = 0 | |
endif | |
let i = type(a:input) == 1 && filereadable(a:input) ? readfile(a:input) : split(a:input, "\n") | |
let r = s:StringReader.new(i) | |
let p = s:VimLParser.new(l:neovim) | |
let c = s:Compiler.new() | |
echo join(c.compile(p.parse(r)), "\n") | |
catch | |
echoerr substitute(v:throwpoint, '\.\.\zs\d\+', '\=s:numtoname(submatch(0))', 'g') . "\n" . v:exception | |
endtry | |
endfunction | |
1 0.000003 function! s:numtoname(num) abort | |
let sig = printf("function('%s')", a:num) | |
for k in keys(s:) | |
if type(s:[k]) == type({}) | |
for name in keys(s:[k]) | |
if type(s:[k][name]) == type(function('tr')) && string(s:[k][name]) == sig | |
return printf('%s.%s', k, name) | |
endif | |
endfor | |
endif | |
endfor | |
return a:num | |
endfunction | |
1 0.000003 let s:NIL = [] | |
1 0.000002 let s:TRUE = 1 | |
1 0.000002 let s:FALSE = 0 | |
1 0.000002 let s:NODE_TOPLEVEL = 1 | |
1 0.000002 let s:NODE_COMMENT = 2 | |
1 0.000002 let s:NODE_EXCMD = 3 | |
1 0.000001 let s:NODE_FUNCTION = 4 | |
1 0.000002 let s:NODE_ENDFUNCTION = 5 | |
1 0.000002 let s:NODE_DELFUNCTION = 6 | |
1 0.000002 let s:NODE_RETURN = 7 | |
1 0.000002 let s:NODE_EXCALL = 8 | |
1 0.000001 let s:NODE_LET = 9 | |
1 0.000002 let s:NODE_UNLET = 10 | |
1 0.000002 let s:NODE_LOCKVAR = 11 | |
1 0.000002 let s:NODE_UNLOCKVAR = 12 | |
1 0.000002 let s:NODE_IF = 13 | |
1 0.000002 let s:NODE_ELSEIF = 14 | |
1 0.000002 let s:NODE_ELSE = 15 | |
1 0.000001 let s:NODE_ENDIF = 16 | |
1 0.000002 let s:NODE_WHILE = 17 | |
1 0.000002 let s:NODE_ENDWHILE = 18 | |
1 0.000001 let s:NODE_FOR = 19 | |
1 0.000002 let s:NODE_ENDFOR = 20 | |
1 0.000002 let s:NODE_CONTINUE = 21 | |
1 0.000001 let s:NODE_BREAK = 22 | |
1 0.000004 let s:NODE_TRY = 23 | |
1 0.000002 let s:NODE_CATCH = 24 | |
1 0.000002 let s:NODE_FINALLY = 25 | |
1 0.000001 let s:NODE_ENDTRY = 26 | |
1 0.000002 let s:NODE_THROW = 27 | |
1 0.000002 let s:NODE_ECHO = 28 | |
1 0.000001 let s:NODE_ECHON = 29 | |
1 0.000002 let s:NODE_ECHOHL = 30 | |
1 0.000002 let s:NODE_ECHOMSG = 31 | |
1 0.000006 let s:NODE_ECHOERR = 32 | |
1 0.000002 let s:NODE_EXECUTE = 33 | |
1 0.000002 let s:NODE_TERNARY = 34 | |
1 0.000001 let s:NODE_OR = 35 | |
1 0.000001 let s:NODE_AND = 36 | |
1 0.000002 let s:NODE_EQUAL = 37 | |
1 0.000001 let s:NODE_EQUALCI = 38 | |
1 0.000002 let s:NODE_EQUALCS = 39 | |
1 0.000003 let s:NODE_NEQUAL = 40 | |
1 0.000003 let s:NODE_NEQUALCI = 41 | |
1 0.000003 let s:NODE_NEQUALCS = 42 | |
1 0.000003 let s:NODE_GREATER = 43 | |
1 0.000002 let s:NODE_GREATERCI = 44 | |
1 0.000003 let s:NODE_GREATERCS = 45 | |
1 0.000002 let s:NODE_GEQUAL = 46 | |
1 0.000003 let s:NODE_GEQUALCI = 47 | |
1 0.000003 let s:NODE_GEQUALCS = 48 | |
1 0.000001 let s:NODE_SMALLER = 49 | |
1 0.000002 let s:NODE_SMALLERCI = 50 | |
1 0.000002 let s:NODE_SMALLERCS = 51 | |
1 0.000002 let s:NODE_SEQUAL = 52 | |
1 0.000001 let s:NODE_SEQUALCI = 53 | |
1 0.000002 let s:NODE_SEQUALCS = 54 | |
1 0.000002 let s:NODE_MATCH = 55 | |
1 0.000001 let s:NODE_MATCHCI = 56 | |
1 0.000002 let s:NODE_MATCHCS = 57 | |
1 0.000002 let s:NODE_NOMATCH = 58 | |
1 0.000002 let s:NODE_NOMATCHCI = 59 | |
1 0.000001 let s:NODE_NOMATCHCS = 60 | |
1 0.000002 let s:NODE_IS = 61 | |
1 0.000001 let s:NODE_ISCI = 62 | |
1 0.000002 let s:NODE_ISCS = 63 | |
1 0.000007 let s:NODE_ISNOT = 64 | |
1 0.000002 let s:NODE_ISNOTCI = 65 | |
1 0.000002 let s:NODE_ISNOTCS = 66 | |
1 0.000001 let s:NODE_ADD = 67 | |
1 0.000001 let s:NODE_SUBTRACT = 68 | |
1 0.000002 let s:NODE_CONCAT = 69 | |
1 0.000001 let s:NODE_MULTIPLY = 70 | |
1 0.000001 let s:NODE_DIVIDE = 71 | |
1 0.000002 let s:NODE_REMAINDER = 72 | |
1 0.000001 let s:NODE_NOT = 73 | |
1 0.000001 let s:NODE_MINUS = 74 | |
1 0.000002 let s:NODE_PLUS = 75 | |
1 0.000001 let s:NODE_SUBSCRIPT = 76 | |
1 0.000001 let s:NODE_SLICE = 77 | |
1 0.000002 let s:NODE_CALL = 78 | |
1 0.000001 let s:NODE_DOT = 79 | |
1 0.000002 let s:NODE_NUMBER = 80 | |
1 0.000002 let s:NODE_STRING = 81 | |
1 0.000001 let s:NODE_LIST = 82 | |
1 0.000002 let s:NODE_DICT = 83 | |
1 0.000002 let s:NODE_OPTION = 85 | |
1 0.000002 let s:NODE_IDENTIFIER = 86 | |
1 0.000001 let s:NODE_CURLYNAME = 87 | |
1 0.000002 let s:NODE_ENV = 88 | |
1 0.000001 let s:NODE_REG = 89 | |
1 0.000002 let s:NODE_CURLYNAMEPART = 90 | |
1 0.000002 let s:NODE_CURLYNAMEEXPR = 91 | |
1 0.000002 let s:NODE_LAMBDA = 92 | |
1 0.000002 let s:NODE_BLOB = 93 | |
1 0.000001 let s:NODE_CONST = 94 | |
1 0.000001 let s:TOKEN_EOF = 1 | |
1 0.000007 let s:TOKEN_EOL = 2 | |
1 0.000001 let s:TOKEN_SPACE = 3 | |
1 0.000001 let s:TOKEN_OROR = 4 | |
1 0.000002 let s:TOKEN_ANDAND = 5 | |
1 0.000001 let s:TOKEN_EQEQ = 6 | |
1 0.000001 let s:TOKEN_EQEQCI = 7 | |
1 0.000002 let s:TOKEN_EQEQCS = 8 | |
1 0.000001 let s:TOKEN_NEQ = 9 | |
1 0.000001 let s:TOKEN_NEQCI = 10 | |
1 0.000002 let s:TOKEN_NEQCS = 11 | |
1 0.000001 let s:TOKEN_GT = 12 | |
1 0.000001 let s:TOKEN_GTCI = 13 | |
1 0.000002 let s:TOKEN_GTCS = 14 | |
1 0.000002 let s:TOKEN_GTEQ = 15 | |
1 0.000001 let s:TOKEN_GTEQCI = 16 | |
1 0.000002 let s:TOKEN_GTEQCS = 17 | |
1 0.000002 let s:TOKEN_LT = 18 | |
1 0.000004 let s:TOKEN_LTCI = 19 | |
1 0.000002 let s:TOKEN_LTCS = 20 | |
1 0.000001 let s:TOKEN_LTEQ = 21 | |
1 0.000002 let s:TOKEN_LTEQCI = 22 | |
1 0.000002 let s:TOKEN_LTEQCS = 23 | |
1 0.000002 let s:TOKEN_MATCH = 24 | |
1 0.000002 let s:TOKEN_MATCHCI = 25 | |
1 0.000002 let s:TOKEN_MATCHCS = 26 | |
1 0.000001 let s:TOKEN_NOMATCH = 27 | |
1 0.000002 let s:TOKEN_NOMATCHCI = 28 | |
1 0.000002 let s:TOKEN_NOMATCHCS = 29 | |
1 0.000005 let s:TOKEN_IS = 30 | |
1 0.000001 let s:TOKEN_ISCI = 31 | |
1 0.000001 let s:TOKEN_ISCS = 32 | |
1 0.000002 let s:TOKEN_ISNOT = 33 | |
1 0.000007 let s:TOKEN_ISNOTCI = 34 | |
1 0.000001 let s:TOKEN_ISNOTCS = 35 | |
1 0.000002 let s:TOKEN_PLUS = 36 | |
1 0.000002 let s:TOKEN_MINUS = 37 | |
1 0.000001 let s:TOKEN_DOT = 38 | |
1 0.000001 let s:TOKEN_STAR = 39 | |
1 0.000002 let s:TOKEN_SLASH = 40 | |
1 0.000001 let s:TOKEN_PERCENT = 41 | |
1 0.000001 let s:TOKEN_NOT = 42 | |
1 0.000002 let s:TOKEN_QUESTION = 43 | |
1 0.000002 let s:TOKEN_COLON = 44 | |
1 0.000001 let s:TOKEN_POPEN = 45 | |
1 0.000002 let s:TOKEN_PCLOSE = 46 | |
1 0.000002 let s:TOKEN_SQOPEN = 47 | |
1 0.000002 let s:TOKEN_SQCLOSE = 48 | |
1 0.000001 let s:TOKEN_COPEN = 49 | |
1 0.000002 let s:TOKEN_CCLOSE = 50 | |
1 0.000002 let s:TOKEN_COMMA = 51 | |
1 0.000001 let s:TOKEN_NUMBER = 52 | |
1 0.000002 let s:TOKEN_SQUOTE = 53 | |
1 0.000002 let s:TOKEN_DQUOTE = 54 | |
1 0.000002 let s:TOKEN_OPTION = 55 | |
1 0.000002 let s:TOKEN_IDENTIFIER = 56 | |
1 0.000001 let s:TOKEN_ENV = 57 | |
1 0.000002 let s:TOKEN_REG = 58 | |
1 0.000001 let s:TOKEN_EQ = 59 | |
1 0.000001 let s:TOKEN_OR = 60 | |
1 0.000002 let s:TOKEN_SEMICOLON = 61 | |
1 0.000002 let s:TOKEN_BACKTICK = 62 | |
1 0.000002 let s:TOKEN_DOTDOTDOT = 63 | |
1 0.000001 let s:TOKEN_SHARP = 64 | |
1 0.000002 let s:TOKEN_ARROW = 65 | |
1 0.000007 let s:TOKEN_BLOB = 66 | |
1 0.000002 let s:TOKEN_LITCOPEN = 67 | |
1 0.000002 let s:TOKEN_DOTDOT = 68 | |
1 0.000002 let s:MAX_FUNC_ARGS = 20 | |
1 0.000002 function! s:isalpha(c) abort | |
return a:c =~# '^[A-Za-z]$' | |
endfunction | |
1 0.000002 function! s:isalnum(c) abort | |
return a:c =~# '^[0-9A-Za-z]$' | |
endfunction | |
1 0.000001 function! s:isdigit(c) abort | |
return a:c =~# '^[0-9]$' | |
endfunction | |
1 0.000001 function! s:isodigit(c) abort | |
return a:c =~# '^[0-7]$' | |
endfunction | |
1 0.000002 function! s:isxdigit(c) abort | |
return a:c =~# '^[0-9A-Fa-f]$' | |
endfunction | |
1 0.000001 function! s:iswordc(c) abort | |
return a:c =~# '^[0-9A-Za-z_]$' | |
endfunction | |
1 0.000002 function! s:iswordc1(c) abort | |
return a:c =~# '^[A-Za-z_]$' | |
endfunction | |
1 0.000002 function! s:iswhite(c) abort | |
return a:c =~# '^[ \t]$' | |
endfunction | |
1 0.000002 function! s:isnamec(c) abort | |
return a:c =~# '^[0-9A-Za-z_:#]$' | |
endfunction | |
1 0.000001 function! s:isnamec1(c) abort | |
return a:c =~# '^[A-Za-z_]$' | |
endfunction | |
1 0.000002 function! s:isargname(s) abort | |
return a:s =~# '^[A-Za-z_][0-9A-Za-z_]*$' | |
endfunction | |
1 0.000002 function! s:isvarname(s) abort | |
return a:s =~# '^[vgslabwt]:$\|^\([vgslabwt]:\)\?[A-Za-z_][0-9A-Za-z_#]*$' | |
endfunction | |
" FIXME: | |
1 0.000002 function! s:isidc(c) abort | |
return a:c =~# '^[0-9A-Za-z_]$' | |
endfunction | |
1 0.000002 function! s:isupper(c) abort | |
return a:c =~# '^[A-Z]$' | |
endfunction | |
1 0.000001 function! s:islower(c) abort | |
return a:c =~# '^[a-z]$' | |
endfunction | |
1 0.000002 function! s:ExArg() abort | |
let ea = {} | |
let ea.forceit = s:FALSE | |
let ea.addr_count = 0 | |
let ea.line1 = 0 | |
let ea.line2 = 0 | |
let ea.flags = 0 | |
let ea.do_ecmd_cmd = '' | |
let ea.do_ecmd_lnum = 0 | |
let ea.append = 0 | |
let ea.usefilter = s:FALSE | |
let ea.amount = 0 | |
let ea.regname = 0 | |
let ea.force_bin = 0 | |
let ea.read_edit = 0 | |
let ea.force_ff = 0 | |
let ea.force_enc = 0 | |
let ea.bad_char = 0 | |
let ea.linepos = {} | |
let ea.cmdpos = [] | |
let ea.argpos = [] | |
let ea.cmd = {} | |
let ea.modifiers = [] | |
let ea.range = [] | |
let ea.argopt = {} | |
let ea.argcmd = {} | |
return ea | |
endfunction | |
" struct node { | |
" int type | |
" pos pos | |
" node left | |
" node right | |
" node cond | |
" node rest | |
" node[] list | |
" node[] rlist | |
" node[] body | |
" string op | |
" string str | |
" int depth | |
" variant value | |
" } | |
" TOPLEVEL .body | |
" COMMENT .str | |
" EXCMD .ea .str | |
" FUNCTION .ea .body .left .rlist .attr .endfunction | |
" ENDFUNCTION .ea | |
" DELFUNCTION .ea .left | |
" RETURN .ea .left | |
" EXCALL .ea .left | |
" LET .ea .op .left .list .rest .right | |
" CONST .ea .op .left .list .rest .right | |
" UNLET .ea .list | |
" LOCKVAR .ea .depth .list | |
" UNLOCKVAR .ea .depth .list | |
" IF .ea .body .cond .elseif .else .endif | |
" ELSEIF .ea .body .cond | |
" ELSE .ea .body | |
" ENDIF .ea | |
" WHILE .ea .body .cond .endwhile | |
" ENDWHILE .ea | |
" FOR .ea .body .left .list .rest .right .endfor | |
" ENDFOR .ea | |
" CONTINUE .ea | |
" BREAK .ea | |
" TRY .ea .body .catch .finally .endtry | |
" CATCH .ea .body .pattern | |
" FINALLY .ea .body | |
" ENDTRY .ea | |
" THROW .ea .left | |
" ECHO .ea .list | |
" ECHON .ea .list | |
" ECHOHL .ea .str | |
" ECHOMSG .ea .list | |
" ECHOERR .ea .list | |
" EXECUTE .ea .list | |
" TERNARY .cond .left .right | |
" OR .left .right | |
" AND .left .right | |
" EQUAL .left .right | |
" EQUALCI .left .right | |
" EQUALCS .left .right | |
" NEQUAL .left .right | |
" NEQUALCI .left .right | |
" NEQUALCS .left .right | |
" GREATER .left .right | |
" GREATERCI .left .right | |
" GREATERCS .left .right | |
" GEQUAL .left .right | |
" GEQUALCI .left .right | |
" GEQUALCS .left .right | |
" SMALLER .left .right | |
" SMALLERCI .left .right | |
" SMALLERCS .left .right | |
" SEQUAL .left .right | |
" SEQUALCI .left .right | |
" SEQUALCS .left .right | |
" MATCH .left .right | |
" MATCHCI .left .right | |
" MATCHCS .left .right | |
" NOMATCH .left .right | |
" NOMATCHCI .left .right | |
" NOMATCHCS .left .right | |
" IS .left .right | |
" ISCI .left .right | |
" ISCS .left .right | |
" ISNOT .left .right | |
" ISNOTCI .left .right | |
" ISNOTCS .left .right | |
" ADD .left .right | |
" SUBTRACT .left .right | |
" CONCAT .left .right | |
" MULTIPLY .left .right | |
" DIVIDE .left .right | |
" REMAINDER .left .right | |
" NOT .left | |
" MINUS .left | |
" PLUS .left | |
" SUBSCRIPT .left .right | |
" SLICE .left .rlist | |
" CALL .left .rlist | |
" DOT .left .right | |
" NUMBER .value | |
" STRING .value | |
" LIST .value | |
" DICT .value | |
" NESTING .left | |
" OPTION .value | |
" IDENTIFIER .value | |
" CURLYNAME .value | |
" ENV .value | |
" REG .value | |
" CURLYNAMEPART .value | |
" CURLYNAMEEXPR .value | |
" LAMBDA .rlist .left | |
1 0.000002 function! s:Node(type) abort | |
return {'type': a:type} | |
endfunction | |
1 0.000002 function! s:Err(msg, pos) abort | |
return printf('vimlparser: %s: line %d col %d', a:msg, a:pos.lnum, a:pos.col) | |
endfunction | |
1 0.000003 let s:VimLParser = {} | |
1 0.000002 function! s:VimLParser.new(...) abort | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj | |
endfunction | |
1 0.000002 function! s:VimLParser.__init__(...) abort | |
if len(a:000) > 0 | |
let self.neovim = a:000[0] | |
else | |
let self.neovim = 0 | |
endif | |
let self.find_command_cache = {} | |
endfunction | |
1 0.000002 function! s:VimLParser.push_context(node) abort | |
call insert(self.context, a:node) | |
endfunction | |
1 0.000002 function! s:VimLParser.pop_context() abort | |
call remove(self.context, 0) | |
endfunction | |
1 0.000002 function! s:VimLParser.find_context(type) abort | |
let i = 0 | |
for node in self.context | |
if node.type == a:type | |
return i | |
endif | |
let i += 1 | |
endfor | |
return -1 | |
endfunction | |
1 0.000002 function! s:VimLParser.add_node(node) abort | |
call add(self.context[0].body, a:node) | |
endfunction | |
1 0.000003 function! s:VimLParser.check_missing_endfunction(ends, pos) abort | |
if self.context[0].type == s:NODE_FUNCTION | |
throw s:Err(printf('E126: Missing :endfunction: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.check_missing_endif(ends, pos) abort | |
if self.context[0].type == s:NODE_IF || self.context[0].type == s:NODE_ELSEIF || self.context[0].type == s:NODE_ELSE | |
throw s:Err(printf('E171: Missing :endif: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.check_missing_endtry(ends, pos) abort | |
if self.context[0].type == s:NODE_TRY || self.context[0].type == s:NODE_CATCH || self.context[0].type == s:NODE_FINALLY | |
throw s:Err(printf('E600: Missing :endtry: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.check_missing_endwhile(ends, pos) abort | |
if self.context[0].type == s:NODE_WHILE | |
throw s:Err(printf('E170: Missing :endwhile: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.check_missing_endfor(ends, pos) abort | |
if self.context[0].type == s:NODE_FOR | |
throw s:Err(printf('E170: Missing :endfor: %s', a:ends), a:pos) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.parse(reader) abort | |
let self.reader = a:reader | |
let self.context = [] | |
let toplevel = s:Node(s:NODE_TOPLEVEL) | |
let toplevel.pos = self.reader.getpos() | |
let toplevel.body = [] | |
call self.push_context(toplevel) | |
while self.reader.peek() !=# '<EOF>' | |
call self.parse_one_cmd() | |
endwhile | |
call self.check_missing_endfunction('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endif('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endtry('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endwhile('TOPLEVEL', self.reader.getpos()) | |
call self.check_missing_endfor('TOPLEVEL', self.reader.getpos()) | |
call self.pop_context() | |
return toplevel | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_one_cmd() abort | |
let self.ea = s:ExArg() | |
if self.reader.peekn(2) ==# '#!' | |
call self.parse_hashbang() | |
call self.reader.get() | |
return | |
endif | |
call self.reader.skip_white_and_colon() | |
if self.reader.peekn(1) ==# '' | |
call self.reader.get() | |
return | |
endif | |
if self.reader.peekn(1) ==# '"' | |
call self.parse_comment() | |
call self.reader.get() | |
return | |
endif | |
let self.ea.linepos = self.reader.getpos() | |
call self.parse_command_modifiers() | |
call self.parse_range() | |
call self.parse_command() | |
call self.parse_trail() | |
endfunction | |
" FIXME: | |
1 0.000002 function! s:VimLParser.parse_command_modifiers() abort | |
let modifiers = [] | |
while s:TRUE | |
let pos = self.reader.tell() | |
let d = '' | |
if s:isdigit(self.reader.peekn(1)) | |
let d = self.reader.read_digit() | |
call self.reader.skip_white() | |
endif | |
let k = self.reader.read_alpha() | |
let c = self.reader.peekn(1) | |
call self.reader.skip_white() | |
if stridx('aboveleft', k) == 0 && len(k) >= 3 " abo\%[veleft] | |
call add(modifiers, {'name': 'aboveleft'}) | |
elseif stridx('belowright', k) == 0 && len(k) >= 3 " bel\%[owright] | |
call add(modifiers, {'name': 'belowright'}) | |
elseif stridx('browse', k) == 0 && len(k) >= 3 " bro\%[wse] | |
call add(modifiers, {'name': 'browse'}) | |
elseif stridx('botright', k) == 0 && len(k) >= 2 " bo\%[tright] | |
call add(modifiers, {'name': 'botright'}) | |
elseif stridx('confirm', k) == 0 && len(k) >= 4 " conf\%[irm] | |
call add(modifiers, {'name': 'confirm'}) | |
elseif stridx('keepmarks', k) == 0 && len(k) >= 3 " kee\%[pmarks] | |
call add(modifiers, {'name': 'keepmarks'}) | |
elseif stridx('keepalt', k) == 0 && len(k) >= 5 " keepa\%[lt] | |
call add(modifiers, {'name': 'keepalt'}) | |
elseif stridx('keepjumps', k) == 0 && len(k) >= 5 " keepj\%[umps] | |
call add(modifiers, {'name': 'keepjumps'}) | |
elseif stridx('keeppatterns', k) == 0 && len(k) >= 5 " keepp\%[atterns] | |
call add(modifiers, {'name': 'keeppatterns'}) | |
elseif stridx('hide', k) == 0 && len(k) >= 3 " hid\%[e] | |
if self.ends_excmds(c) | |
break | |
endif | |
call add(modifiers, {'name': 'hide'}) | |
elseif stridx('lockmarks', k) == 0 && len(k) >= 3 " loc\%[kmarks] | |
call add(modifiers, {'name': 'lockmarks'}) | |
elseif stridx('leftabove', k) == 0 && len(k) >= 5 " lefta\%[bove] | |
call add(modifiers, {'name': 'leftabove'}) | |
elseif stridx('noautocmd', k) == 0 && len(k) >= 3 " noa\%[utocmd] | |
call add(modifiers, {'name': 'noautocmd'}) | |
elseif stridx('noswapfile', k) == 0 && len(k) >= 3 " :nos\%[wapfile] | |
call add(modifiers, {'name': 'noswapfile'}) | |
elseif stridx('rightbelow', k) == 0 && len(k) >= 6 " rightb\%[elow] | |
call add(modifiers, {'name': 'rightbelow'}) | |
elseif stridx('sandbox', k) == 0 && len(k) >= 3 " san\%[dbox] | |
call add(modifiers, {'name': 'sandbox'}) | |
elseif stridx('silent', k) == 0 && len(k) >= 3 " sil\%[ent] | |
if c ==# '!' | |
call self.reader.get() | |
call add(modifiers, {'name': 'silent', 'bang': 1}) | |
else | |
call add(modifiers, {'name': 'silent', 'bang': 0}) | |
endif | |
elseif k ==# 'tab' " tab | |
if d !=# '' | |
call add(modifiers, {'name': 'tab', 'count': str2nr(d, 10)}) | |
else | |
call add(modifiers, {'name': 'tab'}) | |
endif | |
elseif stridx('topleft', k) == 0 && len(k) >= 2 " to\%[pleft] | |
call add(modifiers, {'name': 'topleft'}) | |
elseif stridx('unsilent', k) == 0 && len(k) >= 3 " uns\%[ilent] | |
call add(modifiers, {'name': 'unsilent'}) | |
elseif stridx('vertical', k) == 0 && len(k) >= 4 " vert\%[ical] | |
call add(modifiers, {'name': 'vertical'}) | |
elseif stridx('verbose', k) == 0 && len(k) >= 4 " verb\%[ose] | |
if d !=# '' | |
call add(modifiers, {'name': 'verbose', 'count': str2nr(d, 10)}) | |
else | |
call add(modifiers, {'name': 'verbose', 'count': 1}) | |
endif | |
else | |
call self.reader.seek_set(pos) | |
break | |
endif | |
endwhile | |
let self.ea.modifiers = modifiers | |
endfunction | |
" FIXME: | |
1 0.000002 function! s:VimLParser.parse_range() abort | |
let tokens = [] | |
while s:TRUE | |
while s:TRUE | |
call self.reader.skip_white() | |
let c = self.reader.peekn(1) | |
if c ==# '' | |
break | |
endif | |
if c ==# '.' | |
call add(tokens, self.reader.getn(1)) | |
elseif c ==# '$' | |
call add(tokens, self.reader.getn(1)) | |
elseif c ==# "'" | |
call self.reader.getn(1) | |
let m = self.reader.getn(1) | |
if m ==# '' | |
break | |
endif | |
call add(tokens, "'" . m) | |
elseif c ==# '/' | |
call self.reader.getn(1) | |
let [pattern, _] = self.parse_pattern(c) | |
call add(tokens, pattern) | |
elseif c ==# '?' | |
call self.reader.getn(1) | |
let [pattern, _] = self.parse_pattern(c) | |
call add(tokens, pattern) | |
elseif c ==# '\' | |
let m = self.reader.p(1) | |
if m ==# '&' || m ==# '?' || m ==# '/' | |
call self.reader.seek_cur(2) | |
call add(tokens, '\' . m) | |
else | |
throw s:Err('E10: \\ should be followed by /, ? or &', self.reader.getpos()) | |
endif | |
elseif s:isdigit(c) | |
call add(tokens, self.reader.read_digit()) | |
endif | |
while s:TRUE | |
call self.reader.skip_white() | |
if self.reader.peekn(1) ==# '' | |
break | |
endif | |
let n = self.reader.read_integer() | |
if n ==# '' | |
break | |
endif | |
call add(tokens, n) | |
endwhile | |
if self.reader.p(0) !=# '/' && self.reader.p(0) !=# '?' | |
break | |
endif | |
endwhile | |
if self.reader.peekn(1) ==# '%' | |
call add(tokens, self.reader.getn(1)) | |
elseif self.reader.peekn(1) ==# '*' " && &cpoptions !~ '\*' | |
call add(tokens, self.reader.getn(1)) | |
endif | |
if self.reader.peekn(1) ==# ';' | |
call add(tokens, self.reader.getn(1)) | |
continue | |
elseif self.reader.peekn(1) ==# ',' | |
call add(tokens, self.reader.getn(1)) | |
continue | |
endif | |
break | |
endwhile | |
let self.ea.range = tokens | |
endfunction | |
" FIXME: | |
1 0.000003 function! s:VimLParser.parse_pattern(delimiter) abort | |
let pattern = '' | |
let endc = '' | |
let inbracket = 0 | |
while s:TRUE | |
let c = self.reader.getn(1) | |
if c ==# '' | |
break | |
endif | |
if c ==# a:delimiter && inbracket == 0 | |
let endc = c | |
break | |
endif | |
let pattern .= c | |
if c ==# '\' | |
let c = self.reader.peekn(1) | |
if c ==# '' | |
throw s:Err('E682: Invalid search pattern or delimiter', self.reader.getpos()) | |
endif | |
call self.reader.getn(1) | |
let pattern .= c | |
elseif c ==# '[' | |
let inbracket += 1 | |
elseif c ==# ']' | |
let inbracket -= 1 | |
endif | |
endwhile | |
return [pattern, endc] | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_command() abort | |
call self.reader.skip_white_and_colon() | |
let self.ea.cmdpos = self.reader.getpos() | |
if self.reader.peekn(1) ==# '' || self.reader.peekn(1) ==# '"' | |
if !empty(self.ea.modifiers) || !empty(self.ea.range) | |
call self.parse_cmd_modifier_range() | |
endif | |
return | |
endif | |
let self.ea.cmd = self.find_command() | |
if self.ea.cmd is# s:NIL | |
call self.reader.setpos(self.ea.cmdpos) | |
throw s:Err(printf('E492: Not an editor command: %s', self.reader.peekline()), self.ea.cmdpos) | |
endif | |
if self.reader.peekn(1) ==# '!' && self.ea.cmd.name !=# 'substitute' && self.ea.cmd.name !=# 'smagic' && self.ea.cmd.name !=# 'snomagic' | |
call self.reader.getn(1) | |
let self.ea.forceit = s:TRUE | |
else | |
let self.ea.forceit = s:FALSE | |
endif | |
if self.ea.cmd.flags !~# '\<BANG\>' && self.ea.forceit && self.ea.cmd.flags !~# '\<USERCMD\>' | |
throw s:Err('E477: No ! allowed', self.ea.cmdpos) | |
endif | |
if self.ea.cmd.name !=# '!' | |
call self.reader.skip_white() | |
endif | |
let self.ea.argpos = self.reader.getpos() | |
if self.ea.cmd.flags =~# '\<ARGOPT\>' | |
call self.parse_argopt() | |
endif | |
if self.ea.cmd.name ==# 'write' || self.ea.cmd.name ==# 'update' | |
if self.reader.p(0) ==# '>' | |
if self.reader.p(1) !=# '>' | |
throw s:Err('E494: Use w or w>>', self.ea.cmdpos) | |
endif | |
call self.reader.seek_cur(2) | |
call self.reader.skip_white() | |
let self.ea.append = 1 | |
elseif self.reader.peekn(1) ==# '!' && self.ea.cmd.name ==# 'write' | |
call self.reader.getn(1) | |
let self.ea.usefilter = s:TRUE | |
endif | |
endif | |
if self.ea.cmd.name ==# 'read' | |
if self.ea.forceit | |
let self.ea.usefilter = s:TRUE | |
let self.ea.forceit = s:FALSE | |
elseif self.reader.peekn(1) ==# '!' | |
call self.reader.getn(1) | |
let self.ea.usefilter = s:TRUE | |
endif | |
endif | |
if self.ea.cmd.name ==# '<' || self.ea.cmd.name ==# '>' | |
let self.ea.amount = 1 | |
while self.reader.peekn(1) ==# self.ea.cmd.name | |
call self.reader.getn(1) | |
let self.ea.amount += 1 | |
endwhile | |
call self.reader.skip_white() | |
endif | |
if self.ea.cmd.flags =~# '\<EDITCMD\>' && !self.ea.usefilter | |
call self.parse_argcmd() | |
endif | |
call self._parse_command(self.ea.cmd.parser) | |
endfunction | |
" TODO: self[a:parser] | |
1 0.000002 function! s:VimLParser._parse_command(parser) abort | |
if a:parser ==# 'parse_cmd_append' | |
call self.parse_cmd_append() | |
elseif a:parser ==# 'parse_cmd_break' | |
call self.parse_cmd_break() | |
elseif a:parser ==# 'parse_cmd_call' | |
call self.parse_cmd_call() | |
elseif a:parser ==# 'parse_cmd_catch' | |
call self.parse_cmd_catch() | |
elseif a:parser ==# 'parse_cmd_common' | |
call self.parse_cmd_common() | |
elseif a:parser ==# 'parse_cmd_continue' | |
call self.parse_cmd_continue() | |
elseif a:parser ==# 'parse_cmd_delfunction' | |
call self.parse_cmd_delfunction() | |
elseif a:parser ==# 'parse_cmd_echo' | |
call self.parse_cmd_echo() | |
elseif a:parser ==# 'parse_cmd_echoerr' | |
call self.parse_cmd_echoerr() | |
elseif a:parser ==# 'parse_cmd_echohl' | |
call self.parse_cmd_echohl() | |
elseif a:parser ==# 'parse_cmd_echomsg' | |
call self.parse_cmd_echomsg() | |
elseif a:parser ==# 'parse_cmd_echon' | |
call self.parse_cmd_echon() | |
elseif a:parser ==# 'parse_cmd_else' | |
call self.parse_cmd_else() | |
elseif a:parser ==# 'parse_cmd_elseif' | |
call self.parse_cmd_elseif() | |
elseif a:parser ==# 'parse_cmd_endfor' | |
call self.parse_cmd_endfor() | |
elseif a:parser ==# 'parse_cmd_endfunction' | |
call self.parse_cmd_endfunction() | |
elseif a:parser ==# 'parse_cmd_endif' | |
call self.parse_cmd_endif() | |
elseif a:parser ==# 'parse_cmd_endtry' | |
call self.parse_cmd_endtry() | |
elseif a:parser ==# 'parse_cmd_endwhile' | |
call self.parse_cmd_endwhile() | |
elseif a:parser ==# 'parse_cmd_execute' | |
call self.parse_cmd_execute() | |
elseif a:parser ==# 'parse_cmd_finally' | |
call self.parse_cmd_finally() | |
elseif a:parser ==# 'parse_cmd_finish' | |
call self.parse_cmd_finish() | |
elseif a:parser ==# 'parse_cmd_for' | |
call self.parse_cmd_for() | |
elseif a:parser ==# 'parse_cmd_function' | |
call self.parse_cmd_function() | |
elseif a:parser ==# 'parse_cmd_if' | |
call self.parse_cmd_if() | |
elseif a:parser ==# 'parse_cmd_insert' | |
call self.parse_cmd_insert() | |
elseif a:parser ==# 'parse_cmd_let' | |
call self.parse_cmd_let() | |
elseif a:parser ==# 'parse_cmd_const' | |
call self.parse_cmd_const() | |
elseif a:parser ==# 'parse_cmd_loadkeymap' | |
call self.parse_cmd_loadkeymap() | |
elseif a:parser ==# 'parse_cmd_lockvar' | |
call self.parse_cmd_lockvar() | |
elseif a:parser ==# 'parse_cmd_lua' | |
call self.parse_cmd_lua() | |
elseif a:parser ==# 'parse_cmd_modifier_range' | |
call self.parse_cmd_modifier_range() | |
elseif a:parser ==# 'parse_cmd_mzscheme' | |
call self.parse_cmd_mzscheme() | |
elseif a:parser ==# 'parse_cmd_perl' | |
call self.parse_cmd_perl() | |
elseif a:parser ==# 'parse_cmd_python' | |
call self.parse_cmd_python() | |
elseif a:parser ==# 'parse_cmd_python3' | |
call self.parse_cmd_python3() | |
elseif a:parser ==# 'parse_cmd_return' | |
call self.parse_cmd_return() | |
elseif a:parser ==# 'parse_cmd_ruby' | |
call self.parse_cmd_ruby() | |
elseif a:parser ==# 'parse_cmd_tcl' | |
call self.parse_cmd_tcl() | |
elseif a:parser ==# 'parse_cmd_throw' | |
call self.parse_cmd_throw() | |
elseif a:parser ==# 'parse_cmd_try' | |
call self.parse_cmd_try() | |
elseif a:parser ==# 'parse_cmd_unlet' | |
call self.parse_cmd_unlet() | |
elseif a:parser ==# 'parse_cmd_unlockvar' | |
call self.parse_cmd_unlockvar() | |
elseif a:parser ==# 'parse_cmd_usercmd' | |
call self.parse_cmd_usercmd() | |
elseif a:parser ==# 'parse_cmd_while' | |
call self.parse_cmd_while() | |
elseif a:parser ==# 'parse_wincmd' | |
call self.parse_wincmd() | |
elseif a:parser ==# 'parse_cmd_syntax' | |
call self.parse_cmd_syntax() | |
else | |
throw printf('unknown parser: %s', string(a:parser)) | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.find_command() abort | |
let c = self.reader.peekn(1) | |
let name = '' | |
if c ==# 'k' | |
call self.reader.getn(1) | |
let name = 'k' | |
elseif c ==# 's' && self.reader.peekn(5) =~# '\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])' | |
call self.reader.getn(1) | |
let name = 'substitute' | |
elseif c =~# '[@*!=><&~#]' | |
call self.reader.getn(1) | |
let name = c | |
elseif self.reader.peekn(2) ==# 'py' | |
let name = self.reader.read_alnum() | |
else | |
let pos = self.reader.tell() | |
let name = self.reader.read_alpha() | |
if name !=# 'del' && name =~# '\v^d%[elete][lp]$' | |
call self.reader.seek_set(pos) | |
let name = self.reader.getn(len(name) - 1) | |
endif | |
endif | |
if name ==# '' | |
return s:NIL | |
endif | |
if has_key(self.find_command_cache, name) | |
return self.find_command_cache[name] | |
endif | |
let cmd = s:NIL | |
for x in self.builtin_commands | |
if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
unlet cmd | |
let cmd = x | |
break | |
endif | |
endfor | |
if self.neovim | |
for x in self.neovim_additional_commands | |
if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
unlet cmd | |
let cmd = x | |
break | |
endif | |
endfor | |
for x in self.neovim_removed_commands | |
if stridx(x.name, name) == 0 && len(name) >= x.minlen | |
unlet cmd | |
let cmd = s:NIL | |
break | |
endif | |
endfor | |
endif | |
" FIXME: user defined command | |
if (cmd is# s:NIL || cmd.name ==# 'Print') && name =~# '^[A-Z]' | |
let name .= self.reader.read_alnum() | |
unlet cmd | |
let cmd = {'name': name, 'flags': 'USERCMD', 'parser': 'parse_cmd_usercmd'} | |
endif | |
let self.find_command_cache[name] = cmd | |
return cmd | |
endfunction | |
" TODO: | |
1 0.000002 function! s:VimLParser.parse_hashbang() abort | |
call self.reader.getn(-1) | |
endfunction | |
" TODO: | |
" ++opt=val | |
1 0.000002 function! s:VimLParser.parse_argopt() abort | |
while self.reader.p(0) ==# '+' && self.reader.p(1) ==# '+' | |
let s = self.reader.peekn(20) | |
if s =~# '^++bin\>' | |
call self.reader.getn(5) | |
let self.ea.force_bin = 1 | |
elseif s =~# '^++nobin\>' | |
call self.reader.getn(7) | |
let self.ea.force_bin = 2 | |
elseif s =~# '^++edit\>' | |
call self.reader.getn(6) | |
let self.ea.read_edit = 1 | |
elseif s =~# '^++ff=\(dos\|unix\|mac\)\>' | |
call self.reader.getn(5) | |
let self.ea.force_ff = self.reader.read_alpha() | |
elseif s =~# '^++fileformat=\(dos\|unix\|mac\)\>' | |
call self.reader.getn(13) | |
let self.ea.force_ff = self.reader.read_alpha() | |
elseif s =~# '^++enc=\S' | |
call self.reader.getn(6) | |
let self.ea.force_enc = self.reader.read_nonwhite() | |
elseif s =~# '^++encoding=\S' | |
call self.reader.getn(11) | |
let self.ea.force_enc = self.reader.read_nonwhite() | |
elseif s =~# '^++bad=\(keep\|drop\|.\)\>' | |
call self.reader.getn(6) | |
if s =~# '^++bad=keep' | |
let self.ea.bad_char = self.reader.getn(4) | |
elseif s =~# '^++bad=drop' | |
let self.ea.bad_char = self.reader.getn(4) | |
else | |
let self.ea.bad_char = self.reader.getn(1) | |
endif | |
elseif s =~# '^++' | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
else | |
break | |
endif | |
call self.reader.skip_white() | |
endwhile | |
endfunction | |
" TODO: | |
" +command | |
1 0.000001 function! s:VimLParser.parse_argcmd() abort | |
if self.reader.peekn(1) ==# '+' | |
call self.reader.getn(1) | |
if self.reader.peekn(1) ==# ' ' | |
let self.ea.do_ecmd_cmd = '$' | |
else | |
let self.ea.do_ecmd_cmd = self.read_cmdarg() | |
endif | |
endif | |
endfunction | |
1 0.000002 function! s:VimLParser.read_cmdarg() abort | |
let r = '' | |
while s:TRUE | |
let c = self.reader.peekn(1) | |
if c ==# '' || s:iswhite(c) | |
break | |
endif | |
call self.reader.getn(1) | |
if c ==# '\' | |
let c = self.reader.getn(1) | |
endif | |
let r .= c | |
endwhile | |
return r | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_comment() abort | |
let npos = self.reader.getpos() | |
let c = self.reader.get() | |
if c !=# '"' | |
throw s:Err(printf('unexpected character: %s', c), npos) | |
endif | |
let node = s:Node(s:NODE_COMMENT) | |
let node.pos = npos | |
let node.str = self.reader.getn(-1) | |
call self.add_node(node) | |
endfunction | |
1 0.000056 function! s:VimLParser.parse_trail() abort | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if c ==# '<EOF>' | |
" pass | |
elseif c ==# '<EOL>' | |
call self.reader.get() | |
elseif c ==# '|' | |
call self.reader.get() | |
elseif c ==# '"' | |
call self.parse_comment() | |
call self.reader.get() | |
else | |
throw s:Err(printf('E488: Trailing characters: %s', c), self.reader.getpos()) | |
endif | |
endfunction | |
" modifier or range only command line | |
1 0.000002 function! s:VimLParser.parse_cmd_modifier_range() abort | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, self.reader.getpos()) | |
call self.add_node(node) | |
endfunction | |
" TODO: | |
1 0.000002 function! s:VimLParser.parse_cmd_common() abort | |
let end = self.reader.getpos() | |
if self.ea.cmd.flags =~# '\<TRLBAR\>' && !self.ea.usefilter | |
let end = self.separate_nextcmd() | |
elseif self.ea.cmd.name ==# '!' || self.ea.cmd.name ==# 'global' || self.ea.cmd.name ==# 'vglobal' || self.ea.usefilter | |
while s:TRUE | |
let end = self.reader.getpos() | |
if self.reader.getn(1) ==# '' | |
break | |
endif | |
endwhile | |
else | |
while s:TRUE | |
let end = self.reader.getpos() | |
if self.reader.getn(1) ==# '' | |
break | |
endif | |
endwhile | |
endif | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, end) | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.separate_nextcmd() abort | |
if self.ea.cmd.name ==# 'vimgrep' || self.ea.cmd.name ==# 'vimgrepadd' || self.ea.cmd.name ==# 'lvimgrep' || self.ea.cmd.name ==# 'lvimgrepadd' | |
call self.skip_vimgrep_pat() | |
endif | |
let pc = '' | |
let end = self.reader.getpos() | |
let nospend = end | |
while s:TRUE | |
let end = self.reader.getpos() | |
if !s:iswhite(pc) | |
let nospend = end | |
endif | |
let c = self.reader.peek() | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
break | |
elseif c ==# "\x16" " <C-V> | |
call self.reader.get() | |
let end = self.reader.getpos() | |
let nospend = self.reader.getpos() | |
let c = self.reader.peek() | |
if c ==# '<EOF>' || c ==# '<EOL>' | |
break | |
endif | |
call self.reader.get() | |
elseif self.reader.peekn(2) ==# '`=' && self.ea.cmd.flags =~# '\<\(XFILE\|FILES\|FILE1\)\>' | |
call self.reader.getn(2) | |
call self.parse_expr() | |
let c = self.reader.peekn(1) | |
if c !=# '`' | |
throw s:Err(printf('unexpected character: %s', c), self.reader.getpos()) | |
endif | |
call self.reader.getn(1) | |
elseif c ==# '|' || c ==# "\n" || | |
\ (c ==# '"' && self.ea.cmd.flags !~# '\<NOTRLCOM\>' | |
\ && ((self.ea.cmd.name !=# '@' && self.ea.cmd.name !=# '*') | |
\ || self.reader.getpos() !=# self.ea.argpos) | |
\ && (self.ea.cmd.name !=# 'redir' | |
\ || self.reader.getpos().i !=# self.ea.argpos.i + 1 || pc !=# '@')) | |
let has_cpo_bar = s:FALSE " &cpoptions =~ 'b' | |
if (!has_cpo_bar || self.ea.cmd.flags !~# '\<USECTRLV\>') && pc ==# '\' | |
call self.reader.get() | |
else | |
break | |
endif | |
else | |
call self.reader.get() | |
endif | |
let pc = c | |
endwhile | |
if self.ea.cmd.flags !~# '\<NOTRLCOM\>' | |
let end = nospend | |
endif | |
return end | |
endfunction | |
" FIXME | |
1 0.000002 function! s:VimLParser.skip_vimgrep_pat() abort | |
if self.reader.peekn(1) ==# '' | |
" pass | |
elseif s:isidc(self.reader.peekn(1)) | |
" :vimgrep pattern fname | |
call self.reader.read_nonwhite() | |
else | |
" :vimgrep /pattern/[g][j] fname | |
let c = self.reader.getn(1) | |
let [_, endc] = self.parse_pattern(c) | |
if c !=# endc | |
return | |
endif | |
while self.reader.p(0) ==# 'g' || self.reader.p(0) ==# 'j' | |
call self.reader.getn(1) | |
endwhile | |
endif | |
endfunction | |
1 0.000006 function! s:VimLParser.parse_cmd_append() abort | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.readline() | |
let lines = [cmdline] | |
let m = '.' | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.getn(-1) | |
call add(lines, line) | |
if line ==# m | |
break | |
endif | |
call self.reader.get() | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_insert() abort | |
call self.parse_cmd_append() | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_loadkeymap() abort | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.readline() | |
let lines = [cmdline] | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.readline() | |
call add(lines, line) | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_lua() abort | |
let lines = [] | |
call self.reader.skip_white() | |
if self.reader.peekn(2) ==# '<<' | |
call self.reader.getn(2) | |
call self.reader.skip_white() | |
let m = self.reader.readline() | |
if m ==# '' | |
let m = '.' | |
endif | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.getn(-1) | |
let lines = [cmdline] | |
call self.reader.get() | |
while s:TRUE | |
if self.reader.peek() ==# '<EOF>' | |
break | |
endif | |
let line = self.reader.getn(-1) | |
call add(lines, line) | |
if line ==# m | |
break | |
endif | |
call self.reader.get() | |
endwhile | |
else | |
call self.reader.setpos(self.ea.linepos) | |
let cmdline = self.reader.getn(-1) | |
let lines = [cmdline] | |
endif | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = join(lines, "\n") | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_mzscheme() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_perl() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_python() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000005 function! s:VimLParser.parse_cmd_python3() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_ruby() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_tcl() abort | |
call self.parse_cmd_lua() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_finish() abort | |
call self.parse_cmd_common() | |
if self.context[0].type == s:NODE_TOPLEVEL | |
call self.reader.seek_end(0) | |
endif | |
endfunction | |
" FIXME | |
1 0.000002 function! s:VimLParser.parse_cmd_usercmd() abort | |
call self.parse_cmd_common() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_function() abort | |
let pos = self.reader.tell() | |
call self.reader.skip_white() | |
" :function | |
if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :function /pattern | |
if self.reader.peekn(1) ==# '/' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
let left = self.parse_lvalue_func() | |
call self.reader.skip_white() | |
if left.type == s:NODE_IDENTIFIER | |
let s = left.value | |
let ss = split(s, '\zs') | |
if ss[0] !=# '<' && !s:isupper(ss[0]) && stridx(s, ':') == -1 && stridx(s, '#') == -1 | |
throw s:Err(printf('E128: Function name must start with a capital or contain a colon: %s', s), left.pos) | |
endif | |
endif | |
" :function {name} | |
if self.reader.peekn(1) !=# '(' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :function[!] {name}([arguments]) [range] [abort] [dict] [closure] | |
let node = s:Node(s:NODE_FUNCTION) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.left = left | |
let node.rlist = [] | |
let node.attr = {'range': 0, 'abort': 0, 'dict': 0, 'closure': 0} | |
let node.endfunction = s:NIL | |
call self.reader.getn(1) | |
let tokenizer = s:ExprTokenizer.new(self.reader) | |
if tokenizer.peek().type == s:TOKEN_PCLOSE | |
call tokenizer.get() | |
else | |
let named = {} | |
while s:TRUE | |
let varnode = s:Node(s:NODE_IDENTIFIER) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_IDENTIFIER | |
if !s:isargname(token.value) || token.value ==# 'firstline' || token.value ==# 'lastline' | |
throw s:Err(printf('E125: Illegal argument: %s', token.value), token.pos) | |
elseif has_key(named, token.value) | |
throw s:Err(printf('E853: Duplicate argument name: %s', token.value), token.pos) | |
endif | |
let named[token.value] = 1 | |
let varnode.pos = token.pos | |
let varnode.value = token.value | |
call add(node.rlist, varnode) | |
" XXX: Vim doesn't skip white space before comma. F(a ,b) => E475 | |
if s:iswhite(self.reader.p(0)) && tokenizer.peek().type == s:TOKEN_COMMA | |
throw s:Err('E475: Invalid argument: White space is not allowed before comma', self.reader.getpos()) | |
endif | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_COMMA | |
" XXX: Vim allows last comma. F(a, b, ) => OK | |
if tokenizer.peek().type == s:TOKEN_PCLOSE | |
call tokenizer.get() | |
break | |
endif | |
elseif token.type == s:TOKEN_PCLOSE | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
elseif token.type == s:TOKEN_DOTDOTDOT | |
let varnode.pos = token.pos | |
let varnode.value = token.value | |
call add(node.rlist, varnode) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_PCLOSE | |
break | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('unexpected token: %s', token.value), token.pos) | |
endif | |
endwhile | |
endif | |
while s:TRUE | |
call self.reader.skip_white() | |
let epos = self.reader.getpos() | |
let key = self.reader.read_alpha() | |
if key ==# '' | |
break | |
elseif key ==# 'range' | |
let node.attr.range = s:TRUE | |
elseif key ==# 'abort' | |
let node.attr.abort = s:TRUE | |
elseif key ==# 'dict' | |
let node.attr.dict = s:TRUE | |
elseif key ==# 'closure' | |
let node.attr.closure = s:TRUE | |
else | |
throw s:Err(printf('unexpected token: %s', key), epos) | |
endif | |
endwhile | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_endfunction() abort | |
call self.check_missing_endif('ENDFUNCTION', self.ea.cmdpos) | |
call self.check_missing_endtry('ENDFUNCTION', self.ea.cmdpos) | |
call self.check_missing_endwhile('ENDFUNCTION', self.ea.cmdpos) | |
call self.check_missing_endfor('ENDFUNCTION', self.ea.cmdpos) | |
if self.context[0].type !=# s:NODE_FUNCTION | |
throw s:Err('E193: :endfunction not inside a function', self.ea.cmdpos) | |
endif | |
call self.reader.getn(-1) | |
let node = s:Node(s:NODE_ENDFUNCTION) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endfunction = node | |
call self.pop_context() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_delfunction() abort | |
let node = s:Node(s:NODE_DELFUNCTION) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.left = self.parse_lvalue_func() | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_return() abort | |
if self.find_context(s:NODE_FUNCTION) == -1 | |
throw s:Err('E133: :return not inside a function', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_RETURN) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.left = s:NIL | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if c ==# '"' || !self.ends_excmds(c) | |
let node.left = self.parse_expr() | |
endif | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_call() abort | |
let node = s:Node(s:NODE_EXCALL) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if self.ends_excmds(c) | |
throw s:Err('E471: Argument required', self.reader.getpos()) | |
endif | |
let node.left = self.parse_expr() | |
if node.left.type !=# s:NODE_CALL | |
throw s:Err('Not an function call', node.left.pos) | |
endif | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_let() abort | |
let pos = self.reader.tell() | |
call self.reader.skip_white() | |
" :let | |
if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
let lhs = self.parse_letlhs() | |
call self.reader.skip_white() | |
let s1 = self.reader.peekn(1) | |
let s2 = self.reader.peekn(2) | |
" TODO check scriptversion? | |
if s2 ==# '..' | |
let s2 = self.reader.peekn(3) | |
endif | |
" :let {var-name} .. | |
if self.ends_excmds(s1) || (s2 !=# '+=' && s2 !=# '-=' && s2 !=# '.=' && s2 !=# '..=' && s2 !=# '*=' && s2 !=# '/=' && s2 !=# '%=' && s1 !=# '=') | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :let left op right | |
let node = s:Node(s:NODE_LET) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.op = '' | |
let node.left = lhs.left | |
let node.list = lhs.list | |
let node.rest = lhs.rest | |
let node.right = s:NIL | |
if s2 ==# '+=' || s2 ==# '-=' || s2 ==# '.=' || s2 ==# '..=' || s2 ==# '*=' || s2 ==# '/=' || s2 ==# '%=' | |
call self.reader.getn(len(s2)) | |
let node.op = s2 | |
elseif s1 ==# '=' | |
call self.reader.getn(1) | |
let node.op = s1 | |
else | |
throw 'NOT REACHED' | |
endif | |
let node.right = self.parse_expr() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_const() abort | |
let pos = self.reader.tell() | |
call self.reader.skip_white() | |
" :const | |
if self.ends_excmds(self.reader.peek()) | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
let lhs = self.parse_constlhs() | |
call self.reader.skip_white() | |
let s1 = self.reader.peekn(1) | |
" :const {var-name} | |
if self.ends_excmds(s1) || s1 !=# '=' | |
call self.reader.seek_set(pos) | |
call self.parse_cmd_common() | |
return | |
endif | |
" :const left op right | |
let node = s:Node(s:NODE_CONST) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.reader.getn(1) | |
let node.op = s1 | |
let node.left = lhs.left | |
let node.list = lhs.list | |
let node.rest = lhs.rest | |
let node.right = self.parse_expr() | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_unlet() abort | |
let node = s:Node(s:NODE_UNLET) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_lvaluelist() | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_lockvar() abort | |
let node = s:Node(s:NODE_LOCKVAR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.depth = s:NIL | |
let node.list = [] | |
call self.reader.skip_white() | |
if s:isdigit(self.reader.peekn(1)) | |
let node.depth = str2nr(self.reader.read_digit(), 10) | |
endif | |
let node.list = self.parse_lvaluelist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_unlockvar() abort | |
let node = s:Node(s:NODE_UNLOCKVAR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.depth = s:NIL | |
let node.list = [] | |
call self.reader.skip_white() | |
if s:isdigit(self.reader.peekn(1)) | |
let node.depth = str2nr(self.reader.read_digit(), 10) | |
endif | |
let node.list = self.parse_lvaluelist() | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_if() abort | |
let node = s:Node(s:NODE_IF) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.cond = self.parse_expr() | |
let node.elseif = [] | |
let node.else = s:NIL | |
let node.endif = s:NIL | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_elseif() abort | |
if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF | |
throw s:Err('E582: :elseif without :if', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_IF | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ELSEIF) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.cond = self.parse_expr() | |
call add(self.context[0].elseif, node) | |
call self.push_context(node) | |
endfunction | |
1 0.000003 function! s:VimLParser.parse_cmd_else() abort | |
if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF | |
throw s:Err('E581: :else without :if', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_IF | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ELSE) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let self.context[0].else = node | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_endif() abort | |
if self.context[0].type !=# s:NODE_IF && self.context[0].type !=# s:NODE_ELSEIF && self.context[0].type !=# s:NODE_ELSE | |
throw s:Err('E580: :endif without :if', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_IF | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ENDIF) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endif = node | |
call self.pop_context() | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_while() abort | |
let node = s:Node(s:NODE_WHILE) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.cond = self.parse_expr() | |
let node.endwhile = s:NIL | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000006 function! s:VimLParser.parse_cmd_endwhile() abort | |
if self.context[0].type !=# s:NODE_WHILE | |
throw s:Err('E588: :endwhile without :while', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_ENDWHILE) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endwhile = node | |
call self.pop_context() | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_for() abort | |
let node = s:Node(s:NODE_FOR) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.left = s:NIL | |
let node.right = s:NIL | |
let node.endfor = s:NIL | |
let lhs = self.parse_letlhs() | |
let node.left = lhs.left | |
let node.list = lhs.list | |
let node.rest = lhs.rest | |
call self.reader.skip_white() | |
let epos = self.reader.getpos() | |
if self.reader.read_alpha() !=# 'in' | |
throw s:Err('Missing "in" after :for', epos) | |
endif | |
let node.right = self.parse_expr() | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_endfor() abort | |
if self.context[0].type !=# s:NODE_FOR | |
throw s:Err('E588: :endfor without :for', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_ENDFOR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endfor = node | |
call self.pop_context() | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_continue() abort | |
if self.find_context(s:NODE_WHILE) == -1 && self.find_context(s:NODE_FOR) == -1 | |
throw s:Err('E586: :continue without :while or :for', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_CONTINUE) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_break() abort | |
if self.find_context(s:NODE_WHILE) == -1 && self.find_context(s:NODE_FOR) == -1 | |
throw s:Err('E587: :break without :while or :for', self.ea.cmdpos) | |
endif | |
let node = s:Node(s:NODE_BREAK) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
call self.add_node(node) | |
endfunction | |
1 0.000007 function! s:VimLParser.parse_cmd_try() abort | |
let node = s:Node(s:NODE_TRY) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.catch = [] | |
let node.finally = s:NIL | |
let node.endtry = s:NIL | |
call self.add_node(node) | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_catch() abort | |
if self.context[0].type == s:NODE_FINALLY | |
throw s:Err('E604: :catch after :finally', self.ea.cmdpos) | |
elseif self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH | |
throw s:Err('E603: :catch without :try', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_TRY | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_CATCH) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let node.pattern = s:NIL | |
call self.reader.skip_white() | |
if !self.ends_excmds(self.reader.peek()) | |
let [node.pattern, _] = self.parse_pattern(self.reader.get()) | |
endif | |
call add(self.context[0].catch, node) | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_finally() abort | |
if self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH | |
throw s:Err('E606: :finally without :try', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_TRY | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_FINALLY) | |
let node.pos = self.ea.cmdpos | |
let node.body = [] | |
let node.ea = self.ea | |
let self.context[0].finally = node | |
call self.push_context(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_endtry() abort | |
if self.context[0].type !=# s:NODE_TRY && self.context[0].type !=# s:NODE_CATCH && self.context[0].type !=# s:NODE_FINALLY | |
throw s:Err('E602: :endtry without :try', self.ea.cmdpos) | |
endif | |
if self.context[0].type !=# s:NODE_TRY | |
call self.pop_context() | |
endif | |
let node = s:Node(s:NODE_ENDTRY) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let self.context[0].endtry = node | |
call self.pop_context() | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_throw() abort | |
let node = s:Node(s:NODE_THROW) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.left = self.parse_expr() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_echo() abort | |
let node = s:Node(s:NODE_ECHO) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_cmd_echon() abort | |
let node = s:Node(s:NODE_ECHON) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_echohl() abort | |
let node = s:Node(s:NODE_ECHOHL) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = '' | |
while !self.ends_excmds(self.reader.peek()) | |
let node.str .= self.reader.get() | |
endwhile | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_echomsg() abort | |
let node = s:Node(s:NODE_ECHOMSG) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_echoerr() abort | |
let node = s:Node(s:NODE_ECHOERR) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_cmd_execute() abort | |
let node = s:Node(s:NODE_EXECUTE) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.list = self.parse_exprlist() | |
call self.add_node(node) | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_expr() abort | |
return s:ExprParser.new(self.reader).parse() | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_exprlist() abort | |
let list = [] | |
while s:TRUE | |
call self.reader.skip_white() | |
let c = self.reader.peek() | |
if c !=# '"' && self.ends_excmds(c) | |
break | |
endif | |
let node = self.parse_expr() | |
call add(list, node) | |
endwhile | |
return list | |
endfunction | |
1 0.000002 function! s:VimLParser.parse_lvalue_func() abort | |
let p = s:LvalueParser.new(self.reader) | |
let node = p.parse() | |
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG | |
return node | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
endfunction | |
" FIXME: | |
1 0.000001 function! s:VimLParser.parse_lvalue() abort | |
let p = s:LvalueParser.new(self.reader) | |
let node = p.parse() | |
if node.type == s:NODE_IDENTIFIER | |
if !s:isvarname(node.value) | |
throw s:Err(printf('E461: Illegal variable name: %s', node.value), node.pos) | |
endif | |
endif | |
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME || node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_SLICE || node.type == s:NODE_DOT || node.type == s:NODE_OPTION || node.type == s:NODE_ENV || node.type == s:NODE_REG | |
return node | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
endfunction | |
" TODO: merge with s:VimLParser.parse_lvalue() | |
1 0.000002 function! s:VimLParser.parse_constlvalue() abort | |
let p = s:LvalueParser.new(self.reader) | |
let node = p.parse() | |
if node.type == s:NODE_IDENTIFIER | |
if !s:isvarname(node.value) | |
throw s:Err(printf('E461: Illegal variable name: %s', node.value), node.pos) | |
endif | |
endif | |
if node.type == s:NODE_IDENTIFIER || node.type == s:NODE_CURLYNAME | |
return node | |
elseif node.type == s:NODE_SUBSCRIPT || node.type == s:NODE_SLICE || node.type == s:NODE_DOT | |
throw s:Err('E996: Cannot lock a list or dict', node.pos) | |
elseif node.type == s:NODE_OPTION | |
throw s:Err('E996: Cannot lock an option', node.pos) | |
elseif node.type == s:NODE_ENV | |
throw s:Err('E996: Cannot lock an environment variable', node.pos) | |
elseif node.type == s:NODE_REG | |
throw s:Err('E996: Cannot lock a register', node.pos) | |
endif | |
throw s:Err('Invalid Expression', node.pos) | |
endfunction | |
1 0.000001 function! s:VimLParser.parse_lvaluelist() abort | |
let list = [] | |
let node = self.parse_expr() | |
call add(list, node) | |
while s:TRUE | |
call self.reader.skip_white() | |
if self.ends_excmds(self.reader.peek()) | |
break | |
endif | |
let node = self.parse_lvalue() | |
call add(list, node) | |
endwhile | |
return list | |
endfunction | |
" FIXME: | |
1 0.000002 function! s:VimLParser.parse_letlhs() abort | |
let lhs = {'left': s:NIL, 'list': s:NIL, 'rest': s:NIL} | |
let tokenizer = s:ExprTokenizer.new(self.reader) | |
if tokenizer.peek().type == s:TOKEN_SQOPEN | |
call tokenizer.get() | |
let lhs.list = [] | |
while s:TRUE | |
let node = self.parse_lvalue() | |
call add(lhs.list, node) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
elseif token.type == s:TOKEN_COMMA | |
continue | |
elseif token.type == s:TOKEN_SEMICOLON | |
let node = self.parse_lvalue() | |
let lhs.rest = node | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
endwhile | |
else | |
let lhs.left = self.parse_lvalue() | |
endif | |
return lhs | |
endfunction | |
" TODO: merge with s:VimLParser.parse_letlhs() ? | |
1 0.000001 function! s:VimLParser.parse_constlhs() abort | |
let lhs = {'left': s:NIL, 'list': s:NIL, 'rest': s:NIL} | |
let tokenizer = s:ExprTokenizer.new(self.reader) | |
if tokenizer.peek().type == s:TOKEN_SQOPEN | |
call tokenizer.get() | |
let lhs.list = [] | |
while s:TRUE | |
let node = self.parse_lvalue() | |
call add(lhs.list, node) | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
elseif token.type == s:TOKEN_COMMA | |
continue | |
elseif token.type == s:TOKEN_SEMICOLON | |
let node = self.parse_lvalue() | |
let lhs.rest = node | |
let token = tokenizer.get() | |
if token.type == s:TOKEN_SQCLOSE | |
break | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
else | |
throw s:Err(printf('E475 Invalid argument: %s', token.value), token.pos) | |
endif | |
endwhile | |
else | |
let lhs.left = self.parse_constlvalue() | |
endif | |
return lhs | |
endfunction | |
1 0.000002 function! s:VimLParser.ends_excmds(c) abort | |
return a:c ==# '' || a:c ==# '|' || a:c ==# '"' || a:c ==# '<EOF>' || a:c ==# '<EOL>' | |
endfunction | |
" FIXME: validate argument | |
1 0.000001 function! s:VimLParser.parse_wincmd() abort | |
let c = self.reader.getn(1) | |
if c ==# '' | |
throw s:Err('E471: Argument required', self.reader.getpos()) | |
elseif c ==# 'g' || c ==# "\x07" " <C-G> | |
let c2 = self.reader.getn(1) | |
if c2 ==# '' || s:iswhite(c2) | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
endif | |
endif | |
let end = self.reader.getpos() | |
call self.reader.skip_white() | |
if !self.ends_excmds(self.reader.peek()) | |
throw s:Err('E474: Invalid Argument', self.reader.getpos()) | |
endif | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, end) | |
call self.add_node(node) | |
endfunction | |
" FIXME: validate argument | |
1 0.000002 function! s:VimLParser.parse_cmd_syntax() abort | |
let end = self.reader.getpos() | |
while s:TRUE | |
let end = self.reader.getpos() | |
let c = self.reader.peek() | |
if c ==# '/' || c ==# "'" || c ==# '"' | |
call self.reader.getn(1) | |
call self.parse_pattern(c) | |
elseif c ==# '=' | |
call self.reader.getn(1) | |
call self.parse_pattern(' ') | |
elseif self.ends_excmds(c) | |
break | |
endif | |
call self.reader.getn(1) | |
endwhile | |
let node = s:Node(s:NODE_EXCMD) | |
let node.pos = self.ea.cmdpos | |
let node.ea = self.ea | |
let node.str = self.reader.getstr(self.ea.linepos, end) | |
call self.add_node(node) | |
endfunction | |
1 0.000014 let s:VimLParser.neovim_additional_commands = [ | |
\ {'name': 'rshada', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wshada', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}] | |
1 0.000026 let s:VimLParser.neovim_removed_commands = [ | |
\ {'name': 'Print', 'minlen':1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'fixdel', 'minlen':3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helpfind', 'minlen':5, 'flags': 'EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'open', 'minlen':1, 'flags': 'RANGE|BANG|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'shell', 'minlen':2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tearoff', 'minlen':2, 'flags': 'NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'gvim', 'minlen':2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}] | |
" To find new builtin_commands, run the below script. | |
" $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h | |
1 0.001917 let s:VimLParser.builtin_commands = [ | |
\ {'name': 'append', 'minlen': 1, 'flags': 'BANG|RANGE|ZEROR|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_append'}, | |
\ {'name': 'abbreviate', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'abclear', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'aboveleft', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'all', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'amenu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'anoremenu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'args', 'minlen': 2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argadd', 'minlen': 4, 'flags': 'BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argdelete', 'minlen': 4, 'flags': 'BANG|RANGE|NOTADR|FILES|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argedit', 'minlen': 4, 'flags': 'BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argdo', 'minlen': 5, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argglobal', 'minlen': 4, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'arglocal', 'minlen': 4, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'argument', 'minlen': 4, 'flags': 'BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ascii', 'minlen': 2, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'autocmd', 'minlen': 2, 'flags': 'BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'augroup', 'minlen': 3, 'flags': 'BANG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'aunmenu', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'buffer', 'minlen': 1, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bNext', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ball', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'badd', 'minlen': 3, 'flags': 'NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bdelete', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'behave', 'minlen': 2, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'belowright', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bfirst', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'blast', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bmodified', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bnext', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'botright', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bprevious', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'brewind', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'break', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_break'}, | |
\ {'name': 'breakadd', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'breakdel', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'breaklist', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'browse', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bufdo', 'minlen': 5, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'buffers', 'minlen': 7, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bunload', 'minlen': 3, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'bwipeout', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'change', 'minlen': 1, 'flags': 'BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cNext', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cNfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cabbrev', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cabclear', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'caddbuffer', 'minlen': 3, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'caddexpr', 'minlen': 5, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'caddfile', 'minlen': 5, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'call', 'minlen': 3, 'flags': 'RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_call'}, | |
\ {'name': 'catch', 'minlen': 3, 'flags': 'EXTRA|SBOXOK|CMDWIN', 'parser': 'parse_cmd_catch'}, | |
\ {'name': 'cbuffer', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cc', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cclose', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cd', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'center', 'minlen': 2, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cexpr', 'minlen': 3, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cfirst', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cgetbuffer', 'minlen': 5, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cgetexpr', 'minlen': 5, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cgetfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'changes', 'minlen': 7, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'chdir', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'checkpath', 'minlen': 3, 'flags': 'TRLBAR|BANG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'checktime', 'minlen': 6, 'flags': 'RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'clist', 'minlen': 2, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'clast', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'close', 'minlen': 3, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnext', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnewer', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnoremap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnoreabbrev', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'copy', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'colder', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'colorscheme', 'minlen': 4, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'command', 'minlen': 3, 'flags': 'EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'comclear', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'compiler', 'minlen': 4, 'flags': 'BANG|TRLBAR|WORD1|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'continue', 'minlen': 3, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_continue'}, | |
\ {'name': 'confirm', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'copen', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cpfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cquit', 'minlen': 2, 'flags': 'TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'crewind', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cscope', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cstag', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cunabbrev', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'cwindow', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delete', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delmarks', 'minlen': 4, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'debug', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'debuggreedy', 'minlen': 6, 'flags': 'RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delcommand', 'minlen': 4, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'delfunction', 'minlen': 4, 'flags': 'BANG|NEEDARG|WORD1|CMDWIN', 'parser': 'parse_cmd_delfunction'}, | |
\ {'name': 'diffupdate', 'minlen': 3, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffget', 'minlen': 5, 'flags': 'RANGE|EXTRA|TRLBAR|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffoff', 'minlen': 5, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffpatch', 'minlen': 5, 'flags': 'EXTRA|FILE1|TRLBAR|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffput', 'minlen': 6, 'flags': 'RANGE|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffsplit', 'minlen': 5, 'flags': 'EXTRA|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'diffthis', 'minlen': 5, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'digraphs', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'display', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'djump', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'dlist', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'doautocmd', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'doautoall', 'minlen': 7, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'drop', 'minlen': 2, 'flags': 'FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'dsearch', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'dsplit', 'minlen': 3, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'edit', 'minlen': 1, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'earlier', 'minlen': 2, 'flags': 'TRLBAR|EXTRA|NOSPC|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'echo', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echo'}, | |
\ {'name': 'echoerr', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echoerr'}, | |
\ {'name': 'echohl', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echohl'}, | |
\ {'name': 'echomsg', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echomsg'}, | |
\ {'name': 'echon', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_echon'}, | |
\ {'name': 'else', 'minlen': 2, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_else'}, | |
\ {'name': 'elseif', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_elseif'}, | |
\ {'name': 'emenu', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'endif', 'minlen': 2, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endif'}, | |
\ {'name': 'endfor', 'minlen': 5, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endfor'}, | |
\ {'name': 'endfunction', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_endfunction'}, | |
\ {'name': 'endtry', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endtry'}, | |
\ {'name': 'endwhile', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_endwhile'}, | |
\ {'name': 'enew', 'minlen': 3, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ex', 'minlen': 2, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'execute', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_execute'}, | |
\ {'name': 'exit', 'minlen': 3, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'exusage', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'file', 'minlen': 1, 'flags': 'RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'files', 'minlen': 5, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'filetype', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'find', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'finally', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_finally'}, | |
\ {'name': 'finish', 'minlen': 4, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_finish'}, | |
\ {'name': 'first', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'fixdel', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'fold', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'foldclose', 'minlen': 5, 'flags': 'RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'folddoopen', 'minlen': 5, 'flags': 'RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'folddoclosed', 'minlen': 7, 'flags': 'RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'foldopen', 'minlen': 5, 'flags': 'RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'for', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_for'}, | |
\ {'name': 'function', 'minlen': 2, 'flags': 'EXTRA|BANG|CMDWIN', 'parser': 'parse_cmd_function'}, | |
\ {'name': 'global', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'goto', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'grep', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'grepadd', 'minlen': 5, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'gui', 'minlen': 2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'gvim', 'minlen': 2, 'flags': 'BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'hardcopy', 'minlen': 2, 'flags': 'RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'help', 'minlen': 1, 'flags': 'BANG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helpfind', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helpgrep', 'minlen': 5, 'flags': 'EXTRA|NOTRLCOM|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'helptags', 'minlen': 5, 'flags': 'NEEDARG|FILES|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'highlight', 'minlen': 2, 'flags': 'BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'hide', 'minlen': 3, 'flags': 'BANG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'history', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'insert', 'minlen': 1, 'flags': 'BANG|RANGE|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_insert'}, | |
\ {'name': 'iabbrev', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iabclear', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'if', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_if'}, | |
\ {'name': 'ijump', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ilist', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'imap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'imapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'imenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'inoremap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'inoreabbrev', 'minlen': 6, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'inoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'intro', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'isearch', 'minlen': 2, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'isplit', 'minlen': 3, 'flags': 'BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iunabbrev', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'iunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'join', 'minlen': 1, 'flags': 'BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'jumps', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'k', 'minlen': 1, 'flags': 'RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keepalt', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keepmarks', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keepjumps', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'keeppatterns', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lNext', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lNfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'list', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'laddexpr', 'minlen': 3, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'laddbuffer', 'minlen': 5, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'laddfile', 'minlen': 5, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'last', 'minlen': 2, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'language', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'later', 'minlen': 3, 'flags': 'TRLBAR|EXTRA|NOSPC|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lbuffer', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lcd', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lchdir', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lclose', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lcscope', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'left', 'minlen': 2, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'leftabove', 'minlen': 5, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'let', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_let'}, | |
\ {'name': 'const', 'minlen': 4, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_const'}, | |
\ {'name': 'lexpr', 'minlen': 3, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lfirst', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgetbuffer', 'minlen': 5, 'flags': 'RANGE|NOTADR|WORD1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgetexpr', 'minlen': 5, 'flags': 'NEEDARG|WORD1|NOTRLCOM|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgetfile', 'minlen': 2, 'flags': 'TRLBAR|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgrep', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lgrepadd', 'minlen': 6, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lhelpgrep', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'll', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'llast', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'list', 'minlen': 3, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lmake', 'minlen': 4, 'flags': 'BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnext', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnewer', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'loadkeymap', 'minlen': 5, 'flags': 'CMDWIN', 'parser': 'parse_cmd_loadkeymap'}, | |
\ {'name': 'loadview', 'minlen': 2, 'flags': 'FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lockmarks', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lockvar', 'minlen': 5, 'flags': 'BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_lockvar'}, | |
\ {'name': 'lolder', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lopen', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lpfile', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lrewind', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR|BANG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ls', 'minlen': 2, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ltag', 'minlen': 2, 'flags': 'NOTADR|TRLBAR|BANG|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lua', 'minlen': 3, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_lua'}, | |
\ {'name': 'luado', 'minlen': 4, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'luafile', 'minlen': 4, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lvimgrep', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lvimgrepadd', 'minlen': 9, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'lwindow', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'move', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mark', 'minlen': 2, 'flags': 'RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'make', 'minlen': 3, 'flags': 'BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'map', 'minlen': 3, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mapclear', 'minlen': 4, 'flags': 'EXTRA|BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'marks', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'match', 'minlen': 3, 'flags': 'RANGE|NOTADR|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'menu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'menutranslate', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'messages', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkexrc', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mksession', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkspell', 'minlen': 4, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkvimrc', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mkview', 'minlen': 5, 'flags': 'BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mode', 'minlen': 3, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'mzscheme', 'minlen': 2, 'flags': 'RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK', 'parser': 'parse_cmd_mzscheme'}, | |
\ {'name': 'mzfile', 'minlen': 3, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nbclose', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nbkey', 'minlen': 2, 'flags': 'EXTRA|NOTADR|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nbstart', 'minlen': 3, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'next', 'minlen': 1, 'flags': 'RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'new', 'minlen': 3, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noautocmd', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noremap', 'minlen': 2, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nohlsearch', 'minlen': 3, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noreabbrev', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'noremenu', 'minlen': 6, 'flags': 'RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'normal', 'minlen': 4, 'flags': 'RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'number', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nunmap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'nunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'oldfiles', 'minlen': 2, 'flags': 'BANG|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'open', 'minlen': 1, 'flags': 'RANGE|BANG|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'omap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'omapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'omenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'only', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'onoremap', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'onoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'options', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ounmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ounmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ownsyntax', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pclose', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pedit', 'minlen': 3, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'perl', 'minlen': 2, 'flags': 'RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_perl'}, | |
\ {'name': 'print', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'profdel', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'profile', 'minlen': 4, 'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'promptfind', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'promptrepl', 'minlen': 7, 'flags': 'EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'perldo', 'minlen': 5, 'flags': 'RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pop', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'popup', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ppop', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'preserve', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'previous', 'minlen': 4, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'psearch', 'minlen': 2, 'flags': 'BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptag', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptNext', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptfirst', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptjump', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptlast', 'minlen': 3, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptnext', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptprevious', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptrewind', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ptselect', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'put', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pwd', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'py3', 'minlen': 3, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_python3'}, | |
\ {'name': 'python3', 'minlen': 7, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_python3'}, | |
\ {'name': 'py3file', 'minlen': 4, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'python', 'minlen': 2, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_python'}, | |
\ {'name': 'pyfile', 'minlen': 3, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'pydo', 'minlen': 3, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'py3do', 'minlen': 4, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'quit', 'minlen': 1, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'quitall', 'minlen': 5, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'qall', 'minlen': 2, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'read', 'minlen': 1, 'flags': 'BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'recover', 'minlen': 3, 'flags': 'BANG|FILE1|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redo', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redir', 'minlen': 4, 'flags': 'BANG|FILES|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redraw', 'minlen': 4, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'redrawstatus', 'minlen': 7, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'registers', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'resize', 'minlen': 3, 'flags': 'RANGE|NOTADR|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'retab', 'minlen': 3, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'return', 'minlen': 4, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_return'}, | |
\ {'name': 'rewind', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'right', 'minlen': 2, 'flags': 'TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rightbelow', 'minlen': 6, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'ruby', 'minlen': 3, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_ruby'}, | |
\ {'name': 'rubydo', 'minlen': 5, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rubyfile', 'minlen': 5, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rundo', 'minlen': 4, 'flags': 'NEEDARG|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'runtime', 'minlen': 2, 'flags': 'BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'rviminfo', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'substitute', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sNext', 'minlen': 2, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sandbox', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sargument', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sall', 'minlen': 3, 'flags': 'BANG|RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'saveas', 'minlen': 3, 'flags': 'BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbuffer', 'minlen': 2, 'flags': 'BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbNext', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sball', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbfirst', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sblast', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbmodified', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbnext', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbprevious', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sbrewind', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'scriptnames', 'minlen': 3, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'scriptencoding', 'minlen': 7, 'flags': 'WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'scscope', 'minlen': 3, 'flags': 'EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'set', 'minlen': 2, 'flags': 'TRLBAR|EXTRA|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'setfiletype', 'minlen': 4, 'flags': 'TRLBAR|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'setglobal', 'minlen': 4, 'flags': 'TRLBAR|EXTRA|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'setlocal', 'minlen': 4, 'flags': 'TRLBAR|EXTRA|CMDWIN|SBOXOK', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sfind', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sfirst', 'minlen': 4, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'shell', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'simalt', 'minlen': 3, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sign', 'minlen': 3, 'flags': 'NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'silent', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sleep', 'minlen': 2, 'flags': 'RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'slast', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smagic', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smap', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'smenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sniff', 'minlen': 3, 'flags': 'EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snomagic', 'minlen': 3, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snoremap', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'snoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sort', 'minlen': 3, 'flags': 'RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'source', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spelldump', 'minlen': 6, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellgood', 'minlen': 3, 'flags': 'BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellinfo', 'minlen': 6, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellrepall', 'minlen': 6, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellundo', 'minlen': 6, 'flags': 'BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'spellwrong', 'minlen': 6, 'flags': 'BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'split', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sprevious', 'minlen': 3, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'srewind', 'minlen': 3, 'flags': 'EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stop', 'minlen': 2, 'flags': 'TRLBAR|BANG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stag', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'startinsert', 'minlen': 4, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'startgreplace', 'minlen': 6, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'startreplace', 'minlen': 6, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stopinsert', 'minlen': 5, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stjump', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'stselect', 'minlen': 3, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sunhide', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sunmap', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'suspend', 'minlen': 3, 'flags': 'TRLBAR|BANG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'sview', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'swapname', 'minlen': 2, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'syntax', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_syntax'}, | |
\ {'name': 'syntime', 'minlen': 5, 'flags': 'NEEDARG|WORD1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'syncbind', 'minlen': 4, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 't', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tNext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabNext', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabclose', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabdo', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabedit', 'minlen': 4, 'flags': 'BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabfind', 'minlen': 4, 'flags': 'BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabfirst', 'minlen': 6, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tablast', 'minlen': 4, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabmove', 'minlen': 4, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabnew', 'minlen': 6, 'flags': 'BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabnext', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabonly', 'minlen': 4, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabprevious', 'minlen': 4, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabrewind', 'minlen': 4, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tabs', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tab', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tag', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tags', 'minlen': 4, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tcl', 'minlen': 2, 'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_tcl'}, | |
\ {'name': 'tcldo', 'minlen': 4, 'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tclfile', 'minlen': 4, 'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tearoff', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tfirst', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'throw', 'minlen': 2, 'flags': 'EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_throw'}, | |
\ {'name': 'tjump', 'minlen': 2, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tlast', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tmenu', 'minlen': 2, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tnext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'topleft', 'minlen': 2, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'trewind', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|TRLBAR|ZEROR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'try', 'minlen': 3, 'flags': 'TRLBAR|SBOXOK|CMDWIN', 'parser': 'parse_cmd_try'}, | |
\ {'name': 'tselect', 'minlen': 2, 'flags': 'BANG|TRLBAR|WORD1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'tunmenu', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'undo', 'minlen': 1, 'flags': 'RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'undojoin', 'minlen': 5, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'undolist', 'minlen': 5, 'flags': 'TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unabbreviate', 'minlen': 3, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unhide', 'minlen': 3, 'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unlet', 'minlen': 3, 'flags': 'BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_unlet'}, | |
\ {'name': 'unlockvar', 'minlen': 4, 'flags': 'BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN', 'parser': 'parse_cmd_unlockvar'}, | |
\ {'name': 'unmap', 'minlen': 3, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unmenu', 'minlen': 4, 'flags': 'BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'unsilent', 'minlen': 3, 'flags': 'NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'update', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vglobal', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|DFLALL|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'version', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'verbose', 'minlen': 4, 'flags': 'NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vertical', 'minlen': 4, 'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vimgrep', 'minlen': 3, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vimgrepadd', 'minlen': 8, 'flags': 'RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'visual', 'minlen': 2, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'viusage', 'minlen': 3, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'view', 'minlen': 3, 'flags': 'BANG|FILE1|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vnew', 'minlen': 3, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vsplit', 'minlen': 2, 'flags': 'BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'vunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'windo', 'minlen': 5, 'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'write', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wNext', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wall', 'minlen': 2, 'flags': 'BANG|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'while', 'minlen': 2, 'flags': 'EXTRA|NOTRLCOM|SBOXOK|CMDWIN', 'parser': 'parse_cmd_while'}, | |
\ {'name': 'winsize', 'minlen': 2, 'flags': 'EXTRA|NEEDARG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wincmd', 'minlen': 4, 'flags': 'NEEDARG|WORD1|RANGE|NOTADR', 'parser': 'parse_wincmd'}, | |
\ {'name': 'winpos', 'minlen': 4, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wnext', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wprevious', 'minlen': 2, 'flags': 'RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wq', 'minlen': 2, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wqall', 'minlen': 3, 'flags': 'BANG|FILE1|ARGOPT|DFLALL|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wsverb', 'minlen': 2, 'flags': 'EXTRA|NOTADR|NEEDARG', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wundo', 'minlen': 2, 'flags': 'BANG|NEEDARG|FILE1', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'wviminfo', 'minlen': 2, 'flags': 'BANG|FILE1|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xit', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xall', 'minlen': 2, 'flags': 'BANG|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xmapclear', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xmenu', 'minlen': 3, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xnoremap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xnoremenu', 'minlen': 7, 'flags': 'RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xunmap', 'minlen': 2, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'xunmenu', 'minlen': 5, 'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'yank', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'z', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '!', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|BANG|FILES|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '#', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '&', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': '*', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '<', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': '=', 'minlen': 1, 'flags': 'RANGE|TRLBAR|DFLALL|EXFLAGS|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': '>', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ {'name': '@', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'Next', 'minlen': 1, 'flags': 'EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'Print', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN', 'parser': 'parse_cmd_common'}, | |
\ {'name': 'X', 'minlen': 1, 'flags': 'TRLBAR', 'parser': 'parse_cmd_common'}, | |
\ {'name': '~', 'minlen': 1, 'flags': 'RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY', 'parser': 'parse_cmd_common'}, | |
\ | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'cbottom', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 3, 'name': 'cdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 3, 'name': 'cfdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'chistory', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR|CMDWIN', 'minlen': 3, 'name': 'clearjumps', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM', 'minlen': 4, 'name': 'filter', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|NOTADR|COUNT|TRLBAR', 'minlen': 5, 'name': 'helpclose', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'lbottom', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 2, 'name': 'ldo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL', 'minlen': 3, 'name': 'lfdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR', 'minlen': 3, 'name': 'lhistory', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|EXTRA|TRLBAR|CMDWIN', 'minlen': 3, 'name': 'llist', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'NEEDARG|EXTRA|NOTRLCOM', 'minlen': 3, 'name': 'noswapfile', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|FILE1|NEEDARG|TRLBAR|SBOXOK|CMDWIN', 'minlen': 2, 'name': 'packadd', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'BANG|TRLBAR|SBOXOK|CMDWIN', 'minlen': 5, 'name': 'packloadall', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'TRLBAR|CMDWIN|SBOXOK', 'minlen': 3, 'name': 'smile', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'minlen': 3, 'name': 'pyx', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN', 'minlen': 4, 'name': 'pyxdo', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|EXTRA|NEEDARG|CMDWIN', 'minlen': 7, 'name': 'pythonx', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|FILE1|NEEDARG|CMDWIN', 'minlen': 4, 'name': 'pyxfile', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'RANGE|BANG|FILES|CMDWIN', 'minlen': 3, 'name': 'terminal', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'minlen': 3, 'name': 'tmap', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|CMDWIN', 'minlen': 5, 'name': 'tmapclear', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'minlen': 3, 'name': 'tnoremap', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN', 'minlen': 5, 'name': 'tunmap', 'parser': 'parse_cmd_common'}, | |
\ | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 4, 'name': 'cabove', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'cafter', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'cbefore', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 4, 'name': 'cbelow', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_EXTRA|EX_NOTRLCOM|EX_SBOXOK|EX_CMDWIN', 'minlen': 4, 'name': 'const', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'labove', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'lafter', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 3, 'name': 'lbefore', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_COUNT|EX_TRLBAR', 'minlen': 4, 'name': 'lbelow', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_TRLBAR|EX_CMDWIN', 'minlen': 7, 'name': 'redrawtabline', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_WORD1|EX_TRLBAR|EX_CMDWIN', 'minlen': 7, 'name': 'scriptversion', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_BANG|EX_FILE1|EX_TRLBAR|EX_CMDWIN', 'minlen': 2, 'name': 'tcd', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_BANG|EX_FILE1|EX_TRLBAR|EX_CMDWIN', 'minlen': 3, 'name': 'tchdir', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN', 'minlen': 3, 'name': 'tlmenu', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN', 'minlen': 3, 'name': 'tlnoremenu', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN', 'minlen': 3, 'name': 'tlunmenu', 'parser': 'parse_cmd_common'}, | |
\ {'flags': 'EX_EXTRA|EX_TRLBAR|EX_CMDWIN', 'minlen': 2, 'name': 'xrestore', 'parser': 'parse_cmd_common'}, | |
\] | |
1 0.001144 let s:VimLParser.builtin_functions = [ | |
\ {'name': 'abs', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'acos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'add', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'and', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'append', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'appendbufline', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'argc', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'argidx', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'arglistid', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'argv', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'asin', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'assert_beeps', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'assert_equal', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_equalfile', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'assert_exception', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'assert_fails', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'assert_false', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'assert_inrange', 'min_argc': 3, 'max_argc': 4}, | |
\ {'name': 'assert_match', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_notequal', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_notmatch', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'assert_report', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'assert_true', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'atan', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'atan2', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'balloon_gettext', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'balloon_show', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'balloon_split', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'browse', 'min_argc': 4, 'max_argc': 4}, | |
\ {'name': 'browsedir', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'bufadd', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufexists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buffer_exists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buffer_name', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buffer_number', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'buflisted', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufload', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufloaded', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufname', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufnr', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'bufwinid', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'bufwinnr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'byte2line', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'byteidx', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'byteidxcomp', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'call', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ceil', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_canread', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_close', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_close_in', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_evalexpr', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_evalraw', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_getbufnr', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'ch_getjob', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_info', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'ch_log', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_logfile', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_open', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_read', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_readblob', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_readraw', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'ch_sendexpr', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_sendraw', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'ch_setoptions', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'ch_status', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'changenr', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'char2nr', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'chdir', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'cindent', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'clearmatches', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'col', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'complete', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'complete_add', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'complete_check', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'complete_info', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'confirm', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'copy', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'cos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'cosh', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'count', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'cscope_connection', 'min_argc': 0, 'max_argc': 3}, | |
\ {'name': 'cursor', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'debugbreak', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'deepcopy', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'delete', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'deletebufline', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'did_filetype', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'diff_filler', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'diff_hlID', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'empty', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'environ', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'escape', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'eval', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'eventhandler', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'executable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'execute', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'exepath', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'exists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'exp', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'expand', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'expandcmd', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'extend', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'feedkeys', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'file_readable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'filereadable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'filewritable', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'filter', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'finddir', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'findfile', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'float2nr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'floor', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'fmod', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'fnameescape', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'fnamemodify', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'foldclosed', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foldclosedend', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foldlevel', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foldtext', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'foldtextresult', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'foreground', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'funcref', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'function', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'garbagecollect', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'get', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'get_lazy', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getbufinfo', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getbufline', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getbufvar', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getchangelist', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getchar', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getcharmod', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcharsearch', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdline', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdpos', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdtype', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcmdwintype', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcompletion', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'getcurpos', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getcwd', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'getenv', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getfontname', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getfperm', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getfsize', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getftime', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getftype', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getjumplist', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'getline', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'getloclist', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'getmatches', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getpid', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getpos', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'getqflist', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getreg', 'min_argc': 0, 'max_argc': 3}, | |
\ {'name': 'getregtype', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'gettabinfo', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'gettabvar', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'gettabwinvar', 'min_argc': 3, 'max_argc': 4}, | |
\ {'name': 'gettagstack', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getwininfo', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getwinpos', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'getwinposx', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getwinposy', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'getwinvar', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'glob', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'glob2regpat', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'globpath', 'min_argc': 2, 'max_argc': 5}, | |
\ {'name': 'has', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'has_key', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'haslocaldir', 'min_argc': 0, 'max_argc': 2}, | |
\ {'name': 'hasmapto', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'highlightID', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'highlight_exists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'histadd', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'histdel', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'histget', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'histnr', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'hlID', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'hlexists', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'hostname', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'iconv', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'indent', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'index', 'min_argc': 2, 'max_argc': 4}, | |
\ {'name': 'input', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'inputdialog', 'min_argc': 1, 'max_argc': 3}, | |
\ {'name': 'inputlist', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'inputrestore', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'inputsave', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'inputsecret', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'insert', 'min_argc': 2, 'max_argc': 3}, | |
\ {'name': 'invert', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'isdirectory', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'isinf', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'islocked', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'isnan', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'items', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'job_getchannel', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'job_info', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'job_setoptions', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'job_start', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'job_status', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'job_stop', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'join', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'js_decode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'js_encode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'json_decode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'json_encode', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'keys', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'last_buffer_nr', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'len', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'libcall', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'libcallnr', 'min_argc': 3, 'max_argc': 3}, | |
\ {'name': 'line', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'line2byte', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'lispindent', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'list2str', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'listener_add', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'listener_flush', 'min_argc': 0, 'max_argc': 1}, | |
\ {'name': 'listener_remove', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'localtime', 'min_argc': 0, 'max_argc': 0}, | |
\ {'name': 'log', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'log10', 'min_argc': 1, 'max_argc': 1}, | |
\ {'name': 'luaeval', 'min_argc': 1, 'max_argc': 2}, | |
\ {'name': 'map', 'min_argc': 2, 'max_argc': 2}, | |
\ {'name': 'maparg', 'min_argc': 1, 'max_argc': 4}, | |
\ {'name': 'mapcheck', |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment