mirror of
https://github.com/zoriya/vim.git
synced 2025-12-06 07:16:15 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ba2738f06 | |||
|
|
663d18d610 | ||
|
|
fd771613b3 | ||
|
|
0c3e57b403 | ||
|
|
e80f345b5d | ||
|
|
8dc98bf427 | ||
|
|
d4088edae2 | ||
|
|
34e271b321 | ||
|
|
39a4eb0b2c | ||
|
|
f27e80a6e1 | ||
|
|
2bee7e43e1 | ||
|
|
810785c689 | ||
|
|
48fa3198b7 | ||
|
|
6de7191c31 | ||
|
|
80ed8b8761 | ||
|
|
2e1f757f7b | ||
|
|
32b7e3a8c9 |
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2024 Dec 03
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -67,6 +67,8 @@ autocmd_get([{opts}]) List return a list of autocmds
|
||||
balloon_gettext() String current text in the balloon
|
||||
balloon_show({expr}) none show {expr} inside the balloon
|
||||
balloon_split({msg}) List split {msg} as used for a balloon
|
||||
base64_decode({string}) Blob base64 decode {string} characters
|
||||
base64_encode({blob}) String base64 encode the bytes in {blob}
|
||||
bindtextdomain({package}, {path})
|
||||
Bool bind text domain to specified path
|
||||
blob2list({blob}) List convert {blob} into a list of numbers
|
||||
@@ -277,6 +279,7 @@ getregionpos({pos1}, {pos2} [, {opts}])
|
||||
List get a list of positions for a region
|
||||
getregtype([{regname}]) String type of a register
|
||||
getscriptinfo([{opts}]) List list of sourced scripts
|
||||
getstacktrace() List get current stack trace of Vim scripts
|
||||
gettabinfo([{expr}]) List list of tab pages
|
||||
gettabvar({nr}, {varname} [, {def}])
|
||||
any variable {varname} in tab {nr} or {def}
|
||||
@@ -1225,6 +1228,43 @@ balloon_split({msg}) *balloon_split()*
|
||||
|
||||
Return type: list<any> or list<string>
|
||||
|
||||
base64_decode({string}) *base64_decode()*
|
||||
Return a Blob containing the bytes decoded from the base64
|
||||
encoded characters in {string}.
|
||||
|
||||
The {string} argument should contain only base64-encoded
|
||||
characters and should have a length that is a multiple of 4.
|
||||
|
||||
Returns an empty blob on error.
|
||||
|
||||
Examples: >
|
||||
" Write the decoded contents to a binary file
|
||||
call writefile(base64_decode(s), 'tools.bmp')
|
||||
" Decode a base64-encoded string
|
||||
echo list2str(blob2list(base64_decode(encodedstr)))
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetEncodedString()->base64_decode()
|
||||
<
|
||||
Return type: |Blob|
|
||||
|
||||
|
||||
base64_encode({blob}) *base64_encode()*
|
||||
Return a base64-encoded String representing the bytes in
|
||||
{blob}. The base64 alphabet defined in RFC 4648 is used.
|
||||
|
||||
Examples: >
|
||||
" Encode the contents of a binary file
|
||||
echo base64_encode(readblob('somefile.bin'))
|
||||
" Encode a string
|
||||
echo base64_encode(list2blob(str2list(somestr)))
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetBinaryData()->base64_encode()
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
|
||||
bindtextdomain({package}, {path}) *bindtextdomain()*
|
||||
Bind a specific {package} to a {path} so that the
|
||||
|gettext()| function can be used to get language-specific
|
||||
@@ -1857,10 +1897,15 @@ complete_info([{what}]) *complete_info()*
|
||||
See |complete_info_mode| for the values.
|
||||
pum_visible |TRUE| if popup menu is visible.
|
||||
See |pumvisible()|.
|
||||
items List of completion matches. Each item is a
|
||||
dictionary containing the entries "word",
|
||||
items List of all completion candidates. Each item
|
||||
is a dictionary containing the entries "word",
|
||||
"abbr", "menu", "kind", "info" and "user_data".
|
||||
See |complete-items|.
|
||||
matches Same as "items", but only returns items that
|
||||
are matching current query. If both "matches"
|
||||
and "items" are in "what", the returned list
|
||||
will still be named "items", but each item
|
||||
will have an additional "match" field.
|
||||
selected Selected item index. First index is zero.
|
||||
Index is -1 if no item is selected (showing
|
||||
typed text only, or the last completion after
|
||||
@@ -4953,6 +4998,21 @@ getscriptinfo([{opts}]) *getscriptinfo()*
|
||||
Return type: list<dict<any>>
|
||||
|
||||
|
||||
getstacktrace() *getstacktrace()*
|
||||
Returns the current stack trace of Vim scripts.
|
||||
Stack trace is a |List|, of which each item is a |Dictionary|
|
||||
with the following items:
|
||||
funcref The funcref if the stack is at the function,
|
||||
otherwise this item is not exist.
|
||||
event The string of the event description if the
|
||||
stack is at autocmd event, otherwise this item
|
||||
is not exist.
|
||||
lnum The line number of the script on the stack.
|
||||
filepath The file path of the script on the stack.
|
||||
|
||||
Return type: list<dict<any>>
|
||||
|
||||
|
||||
gettabinfo([{tabnr}]) *gettabinfo()*
|
||||
If {tabnr} is not specified, then information about all the
|
||||
tab pages is returned as a |List|. Each List item is a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.1. Last change: 2024 Dec 23
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1953,7 +1953,8 @@ variables for each buffer. Use local buffer variables instead |b:var|.
|
||||
|
||||
PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
|
||||
*E963* *E1063*
|
||||
Some variables can be set by the user, but the type cannot be changed.
|
||||
Most variables are read-only, when a variable can be set by the user, it will
|
||||
be mentioned at the variable description below. The type cannot be changed.
|
||||
|
||||
*v:argv* *argv-variable*
|
||||
v:argv The command line arguments Vim was invoked with. This is a
|
||||
@@ -2172,7 +2173,8 @@ v:event Dictionary containing information about the current
|
||||
<
|
||||
*v:exception* *exception-variable*
|
||||
v:exception The value of the exception most recently caught and not
|
||||
finished. See also |v:throwpoint| and |throw-variables|.
|
||||
finished. See also |v:stacktrace|, |v:throwpoint|, and
|
||||
|throw-variables|.
|
||||
Example: >
|
||||
:try
|
||||
: throw "oops"
|
||||
@@ -2548,6 +2550,12 @@ v:sizeofpointer Number of bytes in a pointer. Depends on how Vim was compiled.
|
||||
This is only useful for deciding whether a test will give the
|
||||
expected result.
|
||||
|
||||
*v:stacktrace* *stacktrace-variable*
|
||||
v:stacktrace The stack trace of the exception most recently caught and
|
||||
not finished. Refer to |getstacktrace()| for the structure of
|
||||
stack trace. See also |v:exception|, |v:throwpoint|, and
|
||||
|throw-variables|.
|
||||
|
||||
*v:statusmsg* *statusmsg-variable*
|
||||
v:statusmsg Last given status message. It's allowed to set this variable.
|
||||
|
||||
@@ -2676,7 +2684,7 @@ v:this_session Full filename of the last loaded or saved session file. See
|
||||
*v:throwpoint* *throwpoint-variable*
|
||||
v:throwpoint The point where the exception most recently caught and not
|
||||
finished was thrown. Not set when commands are typed. See
|
||||
also |v:exception| and |throw-variables|.
|
||||
also |v:exception|, |v:stacktrace|, and |throw-variables|.
|
||||
Example: >
|
||||
:try
|
||||
: throw "oops"
|
||||
@@ -3856,7 +3864,8 @@ in the variable |v:exception|: >
|
||||
: echo "Number thrown. Value is" v:exception
|
||||
|
||||
You may also be interested where an exception was thrown. This is stored in
|
||||
|v:throwpoint|. Note that "v:exception" and "v:throwpoint" are valid for the
|
||||
|v:throwpoint|. And you can obtain the stack trace from |v:stacktrace|.
|
||||
Note that "v:exception", "v:stacktrace" and "v:throwpoint" are valid for the
|
||||
exception most recently caught as long it is not finished.
|
||||
Example: >
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.1. Last change: 2024 Dec 15
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1185,6 +1185,7 @@ tag command action ~
|
||||
|:abbreviate| :ab[breviate] enter abbreviation
|
||||
|:abclear| :abc[lear] remove all abbreviations
|
||||
|:aboveleft| :abo[veleft] make split window appear left or above
|
||||
|:abstract| :abstract declare a Vim9 abstract class
|
||||
|:all| :al[l] open a window for each file in the argument
|
||||
list
|
||||
|:amenu| :am[enu] enter new menu item for all modes
|
||||
@@ -1224,7 +1225,7 @@ tag command action ~
|
||||
|:breakdel| :breakd[el] delete a debugger breakpoint
|
||||
|:breaklist| :breakl[ist] list debugger breakpoints
|
||||
|:browse| :bro[wse] use file selection dialog
|
||||
|:bufdo| :bufdo execute command in each listed buffer
|
||||
|:bufdo| :bufd[o] execute command in each listed buffer
|
||||
|:buffers| :buffers list all files in the buffer list
|
||||
|:bunload| :bun[load] unload a specific buffer
|
||||
|:bwipeout| :bw[ipeout] really delete a buffer
|
||||
@@ -1240,7 +1241,7 @@ tag command action ~
|
||||
|:cafter| :caf[ter] go to error after current cursor
|
||||
|:call| :cal[l] call a function
|
||||
|:catch| :cat[ch] part of a :try command
|
||||
|:cbefore| :cbef[ore] go to error before current cursor
|
||||
|:cbefore| :cbe[fore] go to error before current cursor
|
||||
|:cbelow| :cbel[ow] go to error below current line
|
||||
|:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
|
||||
|:cbuffer| :cb[uffer] parse error messages and jump to first error
|
||||
@@ -1300,7 +1301,7 @@ tag command action ~
|
||||
|:debuggreedy| :debugg[reedy] read debug mode commands from normal input
|
||||
|:def| :def define a Vim9 user function
|
||||
|:defcompile| :defc[ompile] compile Vim9 user functions in current script
|
||||
|:defer| :defer call function when current function is done
|
||||
|:defer| :defe[r] call function when current function is done
|
||||
|:delcommand| :delc[ommand] delete user-defined command
|
||||
|:delfunction| :delf[unction] delete a user function
|
||||
|:delmarks| :delm[arks] delete marks
|
||||
@@ -1310,7 +1311,7 @@ tag command action ~
|
||||
|:diffpatch| :diffp[atch] apply a patch and show differences
|
||||
|:diffput| :diffpu[t] remove differences in other buffer
|
||||
|:diffsplit| :diffs[plit] show differences with another file
|
||||
|:diffthis| :diffthis make current window a diff window
|
||||
|:diffthis| :difft[his] make current window a diff window
|
||||
|:digraphs| :dig[raphs] show or enter digraphs
|
||||
|:display| :di[splay] display registers
|
||||
|:disassemble| :disa[ssemble] disassemble Vim9 user function
|
||||
@@ -1338,12 +1339,15 @@ tag command action ~
|
||||
|:emenu| :em[enu] execute a menu by name
|
||||
|:endclass| :endclass end of a class specification
|
||||
|:enddef| :enddef end of a user function started with :def
|
||||
|:endenum| :endenum end of an enum specification
|
||||
|:endif| :en[dif] end previous :if
|
||||
|:endinterface| :endinterface end of an interface specification
|
||||
|:endfor| :endfo[r] end previous :for
|
||||
|:endfunction| :endf[unction] end of a user function started with :function
|
||||
|:endtry| :endt[ry] end previous :try
|
||||
|:endwhile| :endw[hile] end previous :while
|
||||
|:enew| :ene[w] edit a new, unnamed buffer
|
||||
|:enum| :enum start of an enum declaration
|
||||
|:eval| :ev[al] evaluate an expression and discard the result
|
||||
|:ex| :ex same as ":edit"
|
||||
|:execute| :exe[cute] execute result of expressions
|
||||
@@ -1397,6 +1401,7 @@ tag command action ~
|
||||
|:inoreabbrev| :inorea[bbrev] like ":noreabbrev" but for Insert mode
|
||||
|:inoremenu| :inoreme[nu] like ":noremenu" but for Insert mode
|
||||
|:intro| :int[ro] print the introductory message
|
||||
|:interface| :interface start of an interface declaration
|
||||
|:isearch| :is[earch] list one line where identifier matches
|
||||
|:isplit| :isp[lit] split window and jump to definition of
|
||||
identifier
|
||||
@@ -1421,7 +1426,7 @@ tag command action ~
|
||||
|:last| :la[st] go to the last file in the argument list
|
||||
|:language| :lan[guage] set the language (locale)
|
||||
|:later| :lat[er] go to newer change, redo
|
||||
|:lbefore| :lbef[ore] go to location before current cursor
|
||||
|:lbefore| :lbe[fore] go to location before current cursor
|
||||
|:lbelow| :lbel[ow] go to location below current line
|
||||
|:lbottom| :lbo[ttom] scroll to the bottom of the location window
|
||||
|:lbuffer| :lb[uffer] parse locations and jump to first location
|
||||
@@ -1461,7 +1466,7 @@ tag command action ~
|
||||
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|
||||
|:lockvar| :lockv[ar] lock variables
|
||||
|:lolder| :lol[der] go to older location list
|
||||
|:lopen| :lope[n] open location window
|
||||
|:lopen| :lop[en] open location window
|
||||
|:lprevious| :lp[revious] go to previous location
|
||||
|:lpfile| :lpf[ile] go to last location in previous file
|
||||
|:lrewind| :lr[ewind] go to the specified location, default first one
|
||||
@@ -1496,7 +1501,7 @@ tag command action ~
|
||||
|:mzfile| :mzf[ile] execute MzScheme script file
|
||||
|:nbclose| :nbc[lose] close the current Netbeans session
|
||||
|:nbkey| :nb[key] pass a key to Netbeans
|
||||
|:nbstart| :nbs[art] start a new Netbeans session
|
||||
|:nbstart| :nbs[tart] start a new Netbeans session
|
||||
|:next| :n[ext] go to next file in the argument list
|
||||
|:new| :new create a new empty window
|
||||
|:nmap| :nm[ap] like ":map" but for Normal mode
|
||||
@@ -1682,7 +1687,7 @@ tag command action ~
|
||||
|:tNext| :tN[ext] jump to previous matching tag
|
||||
|:tabNext| :tabN[ext] go to previous tab page
|
||||
|:tabclose| :tabc[lose] close current tab page
|
||||
|:tabdo| :tabdo execute command in each tab page
|
||||
|:tabdo| :tabd[o] execute command in each tab page
|
||||
|:tabedit| :tabe[dit] edit a file in a new tab page
|
||||
|:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page
|
||||
|:tabfirst| :tabfir[st] go to first tab page
|
||||
@@ -1706,6 +1711,8 @@ tag command action ~
|
||||
|:terminal| :ter[minal] open a terminal window
|
||||
|:tfirst| :tf[irst] jump to first matching tag
|
||||
|:throw| :th[row] throw an exception
|
||||
|:this| :this prefix for an object member during
|
||||
initialization (e.g. on |new()|)
|
||||
|:tjump| :tj[ump] like ":tselect", but jump directly when there
|
||||
is only one match
|
||||
|:tlast| :tl[ast] jump to last matching tag
|
||||
@@ -1724,6 +1731,7 @@ tag command action ~
|
||||
|:tselect| :ts[elect] list matching tags and select one
|
||||
|:tunmap| :tunma[p] like ":unmap" but for Terminal-Job mode
|
||||
|:tunmenu| :tu[nmenu] remove menu tooltip
|
||||
|:type| :type create a type alias
|
||||
|:undo| :u[ndo] undo last change(s)
|
||||
|:undojoin| :undoj[oin] join next change with previous undo block
|
||||
|:undolist| :undol[ist] list leafs of the undo tree
|
||||
@@ -1757,7 +1765,7 @@ tag command action ~
|
||||
|:vsplit| :vs[plit] split current window vertically
|
||||
|:vunmap| :vu[nmap] like ":unmap" but for Visual+Select mode
|
||||
|:vunmenu| :vunme[nu] remove menu for Visual+Select mode
|
||||
|:windo| :windo execute command in each window
|
||||
|:windo| :wind[o] execute command in each window
|
||||
|:write| :w[rite] write to a file
|
||||
|:wNext| :wN[ext] write to a file and go to previous file in
|
||||
argument list
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 28
|
||||
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1195,6 +1195,7 @@ items:
|
||||
|hl-PmenuKind| highlight group, allowing for the
|
||||
customization of ctermfg and guifg properties for the
|
||||
completion kind
|
||||
match See "matches" in |complete_info()|.
|
||||
|
||||
All of these except "icase", "equal", "dup" and "empty" must be a string. If
|
||||
an item does not meet these requirements then an error message is given and
|
||||
|
||||
@@ -3058,9 +3058,9 @@ $quote eval.txt /*$quote*
|
||||
:promptrepl change.txt /*:promptrepl*
|
||||
:ps windows.txt /*:ps*
|
||||
:psearch windows.txt /*:psearch*
|
||||
:pt windows.txt /*:pt*
|
||||
:ptN tagsrch.txt /*:ptN*
|
||||
:ptNext tagsrch.txt /*:ptNext*
|
||||
:pta windows.txt /*:pta*
|
||||
:ptag windows.txt /*:ptag*
|
||||
:ptf tagsrch.txt /*:ptf*
|
||||
:ptfirst tagsrch.txt /*:ptfirst*
|
||||
@@ -6164,6 +6164,8 @@ balloon_show() builtin.txt /*balloon_show()*
|
||||
balloon_split() builtin.txt /*balloon_split()*
|
||||
bar motion.txt /*bar*
|
||||
bars help.txt /*bars*
|
||||
base64_decode() builtin.txt /*base64_decode()*
|
||||
base64_encode() builtin.txt /*base64_encode()*
|
||||
base_font_name_list mbyte.txt /*base_font_name_list*
|
||||
basic.vim syntax.txt /*basic.vim*
|
||||
beep options.txt /*beep*
|
||||
@@ -7906,6 +7908,7 @@ getscript-history pi_getscript.txt /*getscript-history*
|
||||
getscript-plugins pi_getscript.txt /*getscript-plugins*
|
||||
getscript-start pi_getscript.txt /*getscript-start*
|
||||
getscriptinfo() builtin.txt /*getscriptinfo()*
|
||||
getstacktrace() builtin.txt /*getstacktrace()*
|
||||
gettabinfo() builtin.txt /*gettabinfo()*
|
||||
gettabvar() builtin.txt /*gettabvar()*
|
||||
gettabwinvar() builtin.txt /*gettabwinvar()*
|
||||
@@ -10216,6 +10219,7 @@ sqrt() builtin.txt /*sqrt()*
|
||||
squirrel.vim syntax.txt /*squirrel.vim*
|
||||
srand() builtin.txt /*srand()*
|
||||
sscanf eval.txt /*sscanf*
|
||||
stacktrace-variable eval.txt /*stacktrace-variable*
|
||||
standard-plugin usr_05.txt /*standard-plugin*
|
||||
standard-plugin-list help.txt /*standard-plugin-list*
|
||||
standout syntax.txt /*standout*
|
||||
@@ -11036,6 +11040,7 @@ v:shell_error eval.txt /*v:shell_error*
|
||||
v:sizeofint eval.txt /*v:sizeofint*
|
||||
v:sizeoflong eval.txt /*v:sizeoflong*
|
||||
v:sizeofpointer eval.txt /*v:sizeofpointer*
|
||||
v:stacktrace eval.txt /*v:stacktrace*
|
||||
v:statusmsg eval.txt /*v:statusmsg*
|
||||
v:swapchoice eval.txt /*v:swapchoice*
|
||||
v:swapcommand eval.txt /*v:swapcommand*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
*term.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -688,10 +688,11 @@ The default values are set like this: >
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
|
||||
Some terminals accept the same sequences, but with all semicolons replaced by
|
||||
colons (this is actually more compatible, but less widely supported): >
|
||||
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
||||
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
||||
Some terminals accept similar sequences, with semicolons replaced by colons
|
||||
and an extra colon after the number 2 (this is conformant to the ISO 8613-6
|
||||
standard, but less widely supported): >
|
||||
let &t_8f = "\<Esc>[38:2::%lu:%lu:%lum"
|
||||
let &t_8b = "\<Esc>[48:2::%lu:%lu:%lum"
|
||||
|
||||
These options contain printf strings, with |printf()| (actually, its C
|
||||
equivalent hence `l` modifier) invoked with the t_ option value and three
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2024 Dec 03
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2024 Dec 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -197,6 +197,9 @@ Command syntax ~
|
||||
if [command] is NONE no job is started, the pty of the
|
||||
terminal can be used by a command like gdb.
|
||||
|
||||
If [command] outputs NUL bytes, those will be
|
||||
converted to new lines |NL-used-for-Nul|.
|
||||
|
||||
*terminal-nospecial*
|
||||
Vim itself only recognizes |cmdline-special|
|
||||
characters inside [command]. Everything else will be
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.1. Last change: 2024 Dec 16
|
||||
*todo.txt* For Vim version 9.1. Last change: 2024 Dec 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4198,8 +4198,6 @@ Vim script language:
|
||||
char2hex() convert char string to hex string.
|
||||
crypt() encrypt string
|
||||
decrypt() decrypt string
|
||||
base64enc() base 64 encoding
|
||||
base64dec() base 64 decoding
|
||||
attributes() return file protection flags "drwxrwxrwx"
|
||||
shorten(fname) shorten a file name, like home_replace()
|
||||
perl(cmd) call Perl and return string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2024 Nov 11
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -1263,6 +1263,8 @@ Inter-process communication: *channel-functions*
|
||||
json_decode() decode a JSON string to Vim types
|
||||
js_encode() encode an expression to a JSON string
|
||||
js_decode() decode a JSON string to Vim types
|
||||
base64_encode() encode a blob into a base64 string
|
||||
base64_decode() decode a base64 string into a blob
|
||||
err_teapot() give error 418 or 503
|
||||
|
||||
Jobs: *job-functions*
|
||||
@@ -1397,7 +1399,8 @@ Various: *various-functions*
|
||||
eventhandler() check if invoked by an event handler
|
||||
getcellpixels() get List of cell pixel size
|
||||
getpid() get process ID of Vim
|
||||
getscriptinfo() get list of sourced vim scripts
|
||||
getscriptinfo() get list of sourced Vim scripts
|
||||
getstacktrace() get current stack trace of Vim scripts
|
||||
getimstatus() check if IME status is active
|
||||
interrupt() interrupt script execution
|
||||
windowsversion() get MS-Windows version
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2024 Dec 29
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -31849,14 +31849,14 @@ Autocommands: ~
|
||||
|
||||
Commands: ~
|
||||
|
||||
|:abstract| define a Vim9 abstract class
|
||||
|:class| start of a class specification
|
||||
|:abstract| declare a Vim9 abstract class
|
||||
|:class| start of a class declaration
|
||||
|:defer| call function when current function is done
|
||||
|:echowindow| same as :echomsg, but use a popup window
|
||||
|:endinterface| end of an interface specification
|
||||
|:endclass| end of a class specification
|
||||
|:endinterface| end of an interface declaration
|
||||
|:endclass| end of a class declaration
|
||||
|:horizontal| following window command works horizontally
|
||||
|:interface| start of an interface specification
|
||||
|:interface| start of an interface declaration
|
||||
|:public| prefix for a class or object member
|
||||
|:static| prefix for a class member or function
|
||||
|:this| prefix for an object member
|
||||
@@ -41621,6 +41621,10 @@ Changed~
|
||||
instead of the "sh" filetype
|
||||
- the default value of the 'keyprotocol' option has been updated by support
|
||||
for the ghostty terminal emulator (using kitty protocol)
|
||||
- |complete_info()| returns the list of matches shown in the poppu menu via
|
||||
the "matches" key
|
||||
- |v:stacktrace| The stack trace of the exception most recently caught and
|
||||
not finished
|
||||
|
||||
*added-9.2*
|
||||
Added ~
|
||||
@@ -41629,15 +41633,18 @@ Various syntax, indent and other plugins were added.
|
||||
|
||||
Functions: ~
|
||||
|
||||
|base64_decode()| decode a base64 string into a blob
|
||||
|base64_encode()| encode a blob into a base64 string
|
||||
|bindtextdomain()| set message lookup translation base path
|
||||
|diff()| diff two Lists of strings
|
||||
|filecopy()| copy a file {from} to {to}
|
||||
|foreach()| apply function to List items
|
||||
|getcellpixels()| get List of terminal cell pixel size
|
||||
|getcmdcomplpat()| Shell command line completion
|
||||
|getcmdprompt()| get prompt for input()/confirm()
|
||||
|getcellpixels()| get List of terminal cell pixel size
|
||||
|getregion()| get a region of text from a buffer
|
||||
|getregionpos()| get a list of positions for a region
|
||||
|getstacktrace()| get current stack trace of Vim scripts
|
||||
|id()| get unique identifier for a Dict, List, Object,
|
||||
Channel or Blob variable
|
||||
|matchbufline()| all the matches of a pattern in a buffer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 9.1. Last change: 2024 Dec 29
|
||||
*windows.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -968,8 +968,8 @@ A few peculiarities:
|
||||
trigger the ATTENTION and responding "A" for Abort, the preview window will
|
||||
become empty.
|
||||
|
||||
*:pta* *:ptag*
|
||||
:pta[g][!] [tagname]
|
||||
*:pt* *:ptag*
|
||||
:pt[ag][!] [tagname]
|
||||
Does ":tag[!] [tagname]" and shows the found tag in a
|
||||
"Preview" window without changing the current buffer or cursor
|
||||
position. If a "Preview" window already exists, it is re-used
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2024 Dec 12
|
||||
" Last Change: 2024 Dec 31
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
@@ -240,9 +240,17 @@ au BufNewFile,BufRead *.fb setf freebasic
|
||||
|
||||
" Batch file for MSDOS. See dist#ft#FTsys for *.sys
|
||||
au BufNewFile,BufRead *.bat setf dosbatch
|
||||
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
|
||||
" *.cmd is close to a Batch file, but on OS/2 Rexx files and TI linker command files also use *.cmd.
|
||||
" lnk: `/* comment */`, `// comment`, and `--linker-option=value`
|
||||
" rexx: `/* comment */`, `-- comment`
|
||||
au BufNewFile,BufRead *.cmd
|
||||
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
|
||||
\ if join(getline(1, 20), "\n") =~ 'MEMORY\|SECTIONS\|\%(^\|\n\)--\S\|\%(^\|\n\)//'
|
||||
\| setf lnk
|
||||
\| elseif getline(1) =~ '^/\*'
|
||||
\| setf rexx
|
||||
\| else
|
||||
\| setf dosbatch
|
||||
\| endif
|
||||
" ABB RAPID or Batch file for MSDOS.
|
||||
au BufNewFile,BufRead *.sys call dist#ft#FTsys()
|
||||
if has("fname_case")
|
||||
@@ -334,7 +342,7 @@ au BufNewFile,BufRead *.capnp setf capnp
|
||||
au BufNewFile,BufRead cgdbrc setf cgdbrc
|
||||
|
||||
" C#
|
||||
au BufNewFile,BufRead *.cs,*.csx setf cs
|
||||
au BufNewFile,BufRead *.cs,*.csx,*.cake setf cs
|
||||
|
||||
" CSDL
|
||||
au BufNewFile,BufRead *.csdl setf csdl
|
||||
@@ -2916,6 +2924,9 @@ au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml
|
||||
" VBPROJ files are Visual Studio.NET's XML-based Visual Basic project config files
|
||||
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
|
||||
|
||||
" MSBUILD configuration files are also XML
|
||||
au BufNewFile,BufRead Directory.Packages.props,Directory.Build.targets,Directory.Build.props setf xml
|
||||
|
||||
" Unison Language
|
||||
au BufNewFile,BufRead *.u,*.uu setf unison
|
||||
|
||||
|
||||
14
runtime/ftplugin/lnk.vim
Normal file
14
runtime/ftplugin/lnk.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: TI linker command file
|
||||
" Document: https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
|
||||
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
||||
" Last Change: 2024 Dec 31
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
|
||||
setlocal commentstring=/*\ %s\ */
|
||||
setlocal iskeyword+=.
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring< comments< iskeyword<"
|
||||
@@ -2,6 +2,7 @@
|
||||
" Language: ChordPro 6 (https://www.chordpro.org)
|
||||
" Maintainer: Niels Bo Andersen <niels@niboan.dk>
|
||||
" Last Change: 2022-04-15
|
||||
" 2024 Dec 31: add "keys" as syntax keyword (via: https://groups.google.com/g/vim_dev/c/vP4epus0euM/m/mNoDY6hsCQAJ)
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -104,7 +105,7 @@ syn match chordproStandardMetadata /instrument\.description/ contained
|
||||
syn match chordproStandardMetadata /user\.name/ contained
|
||||
syn match chordproStandardMetadata /user\.fullname/ contained
|
||||
|
||||
syn keyword chordproDefineKeyword contained frets fingers
|
||||
syn keyword chordproDefineKeyword contained frets fingers keys
|
||||
syn match chordproDefineKeyword /base-fret/ contained
|
||||
|
||||
syn match chordproArgumentsNumber /\d\+/ contained
|
||||
|
||||
77
runtime/syntax/cmacro.vim
Normal file
77
runtime/syntax/cmacro.vim
Normal file
@@ -0,0 +1,77 @@
|
||||
" Vim syntax file
|
||||
" Language: C macro for C preprocessor
|
||||
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
||||
" Last Change: 2024 Dec 31
|
||||
" modified from syntax/c.vim
|
||||
|
||||
" C compiler has a preprocessor: `cpp -P test.txt`
|
||||
" test.txt doesn't need to be a C file
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Accept %: for # (C99)
|
||||
syn region cmacroPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cmacroCppParen,cmacroNumbers
|
||||
syn match cmacroPreConditMatch display "^\s*\zs\%(%:\|#\)\s*\%(else\|endif\)\>"
|
||||
if !exists("c_no_if0")
|
||||
syn cluster cmacroCppOutInGroup contains=cmacroCppInIf,cmacroCppInElse,cmacroCppInElse2,cmacroCppOutIf,cmacroCppOutIf2,cmacroCppOutElse,cmacroCppInSkip,cmacroCppOutSkip
|
||||
syn region cmacroCppOutWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=cmacroCppOutIf,cmacroCppOutElse,@NoSpell fold
|
||||
syn region cmacroCppOutIf contained start="0\+" matchgroup=cmacroCppOutWrapper end="^\s*\%(%:\|#\)\s*endif\>" contains=cmacroCppOutIf2,cmacroCppOutElse
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cmacroCppOutIf2 contained matchgroup=cmacroCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cmacroCppOutSkip,@Spell fold
|
||||
else
|
||||
syn region cmacroCppOutIf2 contained matchgroup=cmacroCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cmacroCppOutSkip,@Spell
|
||||
endif
|
||||
syn region cmacroCppOutElse contained matchgroup=cmacroCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cmacroPreCondit
|
||||
syn region cmacroCppInWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=cmacroCppInIf,cmacroCppInElse fold
|
||||
syn region cmacroCppInIf contained matchgroup=cmacroCppInWrapper start="\d\+" end="^\s*\%(%:\|#\)\s*endif\>" contains=TOP,cmacroPreCondit
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cmacroCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cmacroCppInIf contains=cmacroCppInElse2 fold
|
||||
else
|
||||
syn region cmacroCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cmacroCppInIf contains=cmacroCppInElse2
|
||||
endif
|
||||
syn region cmacroCppInElse2 contained matchgroup=cmacroCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cmacroCppOutSkip,@Spell
|
||||
syn region cmacroCppOutSkip contained start="^\s*\%(%:\|#\)\s*\%(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" contains=cmacroCppOutSkip
|
||||
syn region cmacroCppInSkip contained matchgroup=cmacroCppInWrapper start="^\s*\%(%:\|#\)\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" containedin=cmacroCppOutElse,cmacroCppInIf,cmacroCppInSkip contains=TOP,cmacroPreProc
|
||||
endif
|
||||
syn region cmacroIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match cmacroIncluded display contained "<[^>]*>"
|
||||
syn match cmacroInclude display "^\s*\zs\%(%:\|#\)\s*include\>\s*["<]" contains=cmacroIncluded
|
||||
"syn match cmacroLineSkip "\\$"
|
||||
syn cluster cmacroPreProcmacroGroup contains=cmacroPreCondit,cmacroIncluded,cmacroInclude,cmacroDefine,cmacroCppOutWrapper,cmacroCppInWrapper,@cmacroCppOutInGroup,cmacroNumbersCom,@cmacroCommentGroup,cmacroParen,cmacroBracket,cmacroMulti,cmacroBadBlock
|
||||
syn region cmacroDefine start="^\s*\zs\%(%:\|#\)\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cmacroPreProcmacroGroup,@Spell
|
||||
syn region cmacroPreProc start="^\s*\zs\%(%:\|#\)\s*\%(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cmacroPreProcmacroGroup,@Spell
|
||||
|
||||
" be able to fold #pragma regions
|
||||
syn region cmacroPragma start="^\s*#pragma\s\+region\>" end="^\s*#pragma\s\+endregion\>" transparent keepend extend fold
|
||||
|
||||
syn keyword cmacroTodo contained TODO FIXME XXX NOTE
|
||||
syn region cmacroComment start='/\*' end='\*/' contains=cmacroTodo,@Spell
|
||||
syn match cmacroCommentError "\*/"
|
||||
syn region cmacroComment start='//' end='$' contains=cmacroTodo,@Spell
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only used when an item doesn't have highlighting yet
|
||||
hi def link cmacroInclude Include
|
||||
hi def link cmacroPreProc PreProc
|
||||
hi def link cmacroDefine Macro
|
||||
hi def link cmacroIncluded cmacroString
|
||||
hi def link cmacroCppInWrapper cmacroCppOutWrapper
|
||||
hi def link cmacroCppOutWrapper cmacroPreCondit
|
||||
hi def link cmacroPreConditMatch cmacroPreCondit
|
||||
hi def link cmacroPreCondit PreCondit
|
||||
hi def link cmacroCppOutSkip cmacroCppOutIf2
|
||||
hi def link cmacroCppInElse2 cmacroCppOutIf2
|
||||
hi def link cmacroCppOutIf2 cmacroCppOut
|
||||
hi def link cmacroCppOut Comment
|
||||
hi def link cmacroTodo Todo
|
||||
hi def link cmacroComment Comment
|
||||
hi def link cmacroCommentError Error
|
||||
|
||||
let b:current_syntax = "cmacro"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -134,9 +134,6 @@ function s:parse_vim_command(cmd)
|
||||
for idx in range(1, strlen(lcmd[key][my]))
|
||||
let matched = 0
|
||||
for pre in range(my - 1, 0, -1)
|
||||
if pre == my
|
||||
continue
|
||||
endif
|
||||
" Avoiding conflicts shortened command and special commands
|
||||
" - weird abbreviations for delete. (See :help :d)
|
||||
" - k{char} is used as mark. (See :help :k)
|
||||
@@ -197,6 +194,16 @@ function s:parse_vim_command(cmd)
|
||||
let item.syn_str = item.name
|
||||
call add(a:cmd, copy(item))
|
||||
|
||||
" ":fina" means ":finally" in legacy script, for backwards compatibility.
|
||||
" (From Vim source code find_ex_command() in ex_docmd.c)
|
||||
call map(a:cmd, {_, v ->
|
||||
\ v.name ==# 'final' ?
|
||||
\ extend(copy(v), {'omit_idx': -1, 'syn_str': v.name}) :
|
||||
\ v.name ==# 'finally' ?
|
||||
\ extend(copy(v), {'omit_idx': 3, 'syn_str': 'fina[lly]'}) :
|
||||
\ v
|
||||
\ })
|
||||
|
||||
if empty(a:cmd)
|
||||
throw 'cmd is empty'
|
||||
endif
|
||||
|
||||
40
runtime/syntax/lnk.vim
Normal file
40
runtime/syntax/lnk.vim
Normal file
@@ -0,0 +1,40 @@
|
||||
" Vim syntax file
|
||||
" Language: TI linker command file
|
||||
" Document: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html
|
||||
" Document: https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
|
||||
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
||||
" Last Change: 2024 Dec 31
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/cmacro.vim
|
||||
|
||||
syn case ignore
|
||||
syn match lnkNumber "0x[0-9a-f]\+"
|
||||
" Linker command files are ASCII files that contain one or more of the following:
|
||||
" Input filenames, which specify object files, archive libraries, or other command files.
|
||||
" Linker options, which can be used in the command file in the same manner that they are used on the command line
|
||||
syn match lnkOption "^[-+][-_a-zA-Z#@]\+"
|
||||
syn match lnkOption "^--[^ \t$=`'"|);]\+"
|
||||
syn match lnkFile '[^ =]\+\%(\.\S\+\)\+\>'
|
||||
syn match lnkLibFile '[^ =]\+\.lib\>'
|
||||
" The MEMORY and SECTIONS linker directives. The MEMORY directive defines the target memory configuration (see Section 8.5.4). The SECTIONS directive controls how sections are built and allocated (see Section 8.5.5.)
|
||||
syn keyword lnkKeyword ADDRESS_MASK f LOAD ORIGIN START ALGORITHM FILL LOAD_END PAGE TABLE ALIGN GROUP LOAD_SIZE PALIGN TYPE ATTR HAMMING_MASK LOAD_START PARITY_MASK UNION BLOCK HIGH MEMORY RUN UNORDERED COMPRESSION INPUT_PAGE MIRRORING RUN_END VFILL COPY INPUT_RANGE NOINIT RUN_SIZE DSECT l NOLOAD RUN_START ECC LEN o SECTIONS END LENGTH ORG SIZE
|
||||
syn region lnkLibrary start=+<+ end=+>+
|
||||
syn match lnkAttrib '\<[RWXI]\+\>'
|
||||
syn match lnkSections '\<\.\k\+'
|
||||
" Assignment statements, which define and assign values to global symbols
|
||||
syn case match
|
||||
|
||||
hi def link lnkNumber Number
|
||||
hi def link lnkOption Special
|
||||
hi def link lnkKeyword Keyword
|
||||
hi def link lnkLibrary String
|
||||
hi def link lnkFile String
|
||||
hi def link lnkLibFile Special
|
||||
hi def link lnkAttrib Type
|
||||
hi def link lnkSections Macro
|
||||
|
||||
let b:current_syntax = "lnk"
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: TI Linker map
|
||||
" Document: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html
|
||||
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
||||
" Last Change: 2024 Dec 25
|
||||
" Last Change: 2024 Dec 30
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -19,7 +19,7 @@ syn match lnkmapFile '[^ =]\+\%(\.\S\+\)\+\>'
|
||||
syn match lnkmapLibFile '[^ =]\+\.lib\>'
|
||||
syn match lnkmapAttrib '\<[RWIX]\+\>'
|
||||
syn match lnkmapAttrib '\s\zs--HOLE--\ze\%\(\s\|$\)'
|
||||
syn keyword lnkmapAttrib UNINITIALIZED
|
||||
syn keyword lnkmapAttrib UNINITIALIZED DESCT
|
||||
|
||||
|
||||
hi def link lnkmapTime Comment
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
" Previous Maintainers: Charles E. Campbell
|
||||
" Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: 2024 Mar 04 by Vim Project
|
||||
" 2024 Nov 03 by Aliaksei Budavei <0x000c70 AT gmail DOT com> (improved bracket expressions, #15941)
|
||||
" Version: 208
|
||||
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
@@ -127,6 +128,50 @@ else
|
||||
com! -nargs=* ShFoldIfDoFor <args>
|
||||
endif
|
||||
|
||||
" Generate bracket expression items {{{1
|
||||
" =================================
|
||||
" Note that the following function can be invoked as many times as necessary
|
||||
" provided that these constraints hold for the passed dictionary argument:
|
||||
" - every time a unique group-name value is assigned to the "itemGroup" key;
|
||||
" - only ONCE either the "extraArgs" key is not entered or it is entered and
|
||||
" its value does not have "contained" among other optional arguments (":help
|
||||
" :syn-arguments").
|
||||
fun! s:GenerateBracketExpressionItems(dict) abort
|
||||
let itemGroup = a:dict.itemGroup
|
||||
let bracketGroup = a:dict.bracketGroup
|
||||
let invGroup = itemGroup . 'Inv'
|
||||
let skipLeftBracketGroup = itemGroup . 'SkipLeftBracket'
|
||||
let skipRightBracketGroup = itemGroup . 'SkipRightBracket'
|
||||
let extraArgs = has_key(a:dict, 'extraArgs') ? a:dict.extraArgs : ''
|
||||
|
||||
" Make the leading "[!^]" stand out in a NON-matching expression.
|
||||
exec 'syn match ' . invGroup . ' contained "\[\@<=[!^]"'
|
||||
|
||||
" Set up indirections for unbalanced-bracket highlighting.
|
||||
exec 'syn region ' . skipRightBracketGroup . ' contained matchgroup=' . bracketGroup . ' start="\[\%([!^]\=\\\=\]\)\@=" matchgroup=shCollSymb end="\[\.[^]]\{-}\][^]]\{-}\.\]" matchgroup=' . itemGroup . ' end="\]" contains=@shBracketExprList,shDoubleQuote,' . invGroup
|
||||
exec 'syn region ' . skipLeftBracketGroup . ' contained matchgroup=' . bracketGroup . ' start="\[\%([!^]\=\\\=\]\)\@=" skip="[!^]\=\\\=\]\%(\[[^]]\+\]\|[^]]\)\{-}\%(\[[:.=]\@!\)\@=" matchgroup=' . itemGroup . ' end="\[[:.=]\@!" contains=@shBracketExprList,shDoubleQuote,' . invGroup
|
||||
|
||||
" Look for a general matching expression.
|
||||
exec 'syn region ' . itemGroup . ' matchgroup=' . bracketGroup . ' start="\[\S\@=" end="\]" contains=@shBracketExprList,shDoubleQuote ' . extraArgs
|
||||
" Look for a general NON-matching expression.
|
||||
exec 'syn region ' . itemGroup . ' matchgroup=' . bracketGroup . ' start="\[[!^]\@=" end="\]" contains=@shBracketExprList,shDoubleQuote,' . invGroup . ' ' . extraArgs
|
||||
|
||||
" Accommodate unbalanced brackets in bracket expressions. The supported
|
||||
" syntax for a plain "]" can be: "[]ws]" and "[^]ws]"; or, "[ws[.xs]ys.]zs]"
|
||||
" and "[^ws[.xs]ys.]zs]"; see §9.3.5 RE Bracket Expression (in XBD).
|
||||
exec 'syn region ' . itemGroup . ' matchgroup=NONE start="\[[!^]\=\\\=\]" matchgroup=' . bracketGroup . ' end="\]" contains=@shBracketExprList,shDoubleQuote,' . skipRightBracketGroup . ' ' . extraArgs
|
||||
" Strive to handle "[]...[]" etc.
|
||||
exec 'syn region ' . itemGroup . ' matchgroup=NONE start="\[[!^]\=\\\=\]\%(\[[^]]\+\]\|[^]]\)\{-}\[[:.=]\@!" matchgroup=' . bracketGroup . ' end="\]" contains=@shBracketExprList,shDoubleQuote,' . skipLeftBracketGroup . ' ' . extraArgs
|
||||
|
||||
if !exists("g:skip_sh_syntax_inits")
|
||||
exec 'hi def link ' . skipLeftBracketGroup . ' ' . itemGroup
|
||||
exec 'hi def link ' . skipRightBracketGroup . ' ' . itemGroup
|
||||
exec 'hi def link ' . invGroup . ' Underlined'
|
||||
endif
|
||||
endfun
|
||||
|
||||
call s:GenerateBracketExpressionItems({'itemGroup': 'shBracketExpr', 'bracketGroup': 'shBracketExprDelim'})
|
||||
|
||||
" sh syntax is case sensitive {{{1
|
||||
syn case match
|
||||
|
||||
@@ -136,23 +181,24 @@ syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsa
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster ErrorList add=shDTestError
|
||||
endif
|
||||
syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDerefVarArray,shDo,shDerefSimple,shEcho,shEscape,shExpr,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn cluster shArithList contains=@shArithParenList,shParenError
|
||||
syn cluster shBracketExprList contains=shCharClassOther,shCharClass,shCollSymb,shEqClass
|
||||
syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
|
||||
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shComment,shDblBrace,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shCaseList add=shForPP,shDblParen
|
||||
endif
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shBracketExpr,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
|
||||
" COMBAK: removing shEscape from shDblQuoteList fails ksh04:43 -- Jun 09, 2022: I don't see the problem with ksh04, so am reinstating shEscape
|
||||
syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ
|
||||
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
|
||||
syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
|
||||
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
|
||||
syn cluster shEchoList contains=shArithmetic,shBracketExpr,shCommandSub,shCommandSubBQ,shDerefVarArray,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
|
||||
syn cluster shExprList1 contains=shBracketExpr,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
|
||||
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
|
||||
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
|
||||
syn cluster shFunctionList contains=shBracketExpr,@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shFunctionList add=shRepeat,shDblBrace,shDblParen,shForPP
|
||||
syn cluster shDerefList add=shCommandSubList,shEchoDeref
|
||||
@@ -160,16 +206,16 @@ endif
|
||||
syn cluster shHereBeginList contains=@shCommandSubList
|
||||
syn cluster shHereList contains=shBeginHere,shHerePayload
|
||||
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
|
||||
syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
|
||||
syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDerefVarArray,shSubshare,shValsub,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
|
||||
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shLoopList add=shForPP,shDblParen
|
||||
endif
|
||||
syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shPPSLeftList contains=shAlias,shArithmetic,shBracketExpr,shCmdParenRegion,shCommandSub,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm
|
||||
syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shSubshare,shValsub,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
|
||||
syn cluster shSubShList contains=shBracketExpr,@shCommandSubList,shCommandSubBQ,shSubshare,shValsub,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shTestList contains=shArithmetic,shBracketExpr,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
|
||||
syn cluster shNoZSList contains=shSpecialNoZS
|
||||
syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shArithmetic
|
||||
|
||||
@@ -190,7 +236,7 @@ endif
|
||||
syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]'
|
||||
|
||||
" This must be after the strings, so that ... \" will be correct
|
||||
syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq
|
||||
syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shBracketExpr,shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCtrlSeq
|
||||
|
||||
" Alias: {{{1
|
||||
" =====
|
||||
@@ -240,7 +286,6 @@ syn match shRedir "\d<<-\="
|
||||
" ==========
|
||||
syn match shOperator "<<\|>>" contained
|
||||
syn match shOperator "[!&;|]" contained
|
||||
syn match shOperator "\[[[^:]\|\]]" contained
|
||||
syn match shOperator "[-=/*+%]\==" skipwhite nextgroup=shPattern
|
||||
syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref
|
||||
|
||||
@@ -251,9 +296,9 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")"
|
||||
|
||||
" Tests: {{{1
|
||||
"=======
|
||||
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
|
||||
syn region shExpr matchgroup=shRange start="\[\s\@=" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
|
||||
syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
|
||||
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' end="\ze['"]" contained contains=shDerefSimple,shDeref
|
||||
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' end="\ze['"]" contained contains=shBracketExpr,shDerefSimple,shDeref
|
||||
syn match shAstQuote contained '\*\ze"' nextgroup=shString
|
||||
syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
|
||||
syn match shTestOpr contained "<=\|>=\|!=\|==\|=\~\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
|
||||
@@ -262,13 +307,16 @@ syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\
|
||||
syn match shTestSingleQuote contained '\\.' nextgroup=shTestSingleQuote
|
||||
syn match shTestSingleQuote contained "'[^']*'"
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shAstQuote,shNoQuote,shComment
|
||||
syn region shDblBrace matchgroup=Delimiter start="\[\[\s\@=" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shAstQuote,shNoQuote,shComment
|
||||
syn region shDblParen matchgroup=Delimiter start="((" skip=+\%(\\\\\)*\\$+ end="))" contains=@shTestList,shComment
|
||||
endif
|
||||
|
||||
" Character Class In Range: {{{1
|
||||
" =========================
|
||||
syn match shCharClassOther contained "\[:\w\{-}:\]"
|
||||
syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]"
|
||||
syn match shCollSymb contained "\[\..\{-}\.\]"
|
||||
syn match shEqClass contained "\[=.\{-}=\]"
|
||||
|
||||
" Loops: do, if, while, until {{{1
|
||||
" ======
|
||||
@@ -298,7 +346,7 @@ syn match shComma contained ","
|
||||
" ====
|
||||
syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
|
||||
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
|
||||
syn match shCaseLabel contained skipwhite "\%(\\.\|[-a-zA-Z0-9_*.]\)\+" contains=shCharClass
|
||||
syn match shCaseLabel contained skipwhite "\%(\\.\|[-a-zA-Z0-9_*.]\)\+" contains=shBracketExpr
|
||||
if exists("b:is_bash")
|
||||
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
|
||||
elseif exists("b:is_kornshell")
|
||||
@@ -317,11 +365,9 @@ endif
|
||||
syn region shCaseSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseDoubleQuote matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
|
||||
syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained
|
||||
call s:GenerateBracketExpressionItems({'itemGroup': 'shCaseRange', 'bracketGroup': 'shBracketExprDelim', 'extraArgs': 'skip=+\\\\+ contained'})
|
||||
if exists("b:is_bash")
|
||||
syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained contains=shCharClass
|
||||
syn match shCharClass '\[:\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|or\|xdigit\):\]' contained
|
||||
else
|
||||
syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained
|
||||
endif
|
||||
" Misc: {{{1
|
||||
"======
|
||||
@@ -453,7 +499,18 @@ endif
|
||||
"=============
|
||||
syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained
|
||||
syn match shVariable "\<\h\w*\ze=" nextgroup=shVarAssign
|
||||
syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote,shVar
|
||||
if exists("b:is_bash")
|
||||
" The subscript form for array values, e.g. "foo=([2]=10 [4]=100)".
|
||||
syn region shArrayValue contained start="\[\%(..\{-}\]=\)\@=" end="\]=\@=" contains=@shArrayValueList nextgroup=shVarAssign
|
||||
syn cluster shArrayValueList contains=shArithmetic,shArithParen,shCommandSub,shDeref,shDerefSimple,shExpr,shNumber,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shSpecial,shParen,bashSpecialVariables,shParenError
|
||||
endif
|
||||
if exists("b:is_bash") || exists("b:is_kornshell")
|
||||
syn match shVariable "\<\h\w*\%(\[..\{-}\]\)\=\ze\%([|^&*/%+-]\|[<^]<\|[>^]>\)\==" contains=shDerefVarArray nextgroup=shVarAssign
|
||||
syn match shVarAssign contained "\%([|^&*/%+-]\|[<^]<\|[>^]>\)\==" nextgroup=shArrayRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote,shVar
|
||||
syn region shArrayRegion contained matchgroup=shShellVariables start="(" skip='\\\\\|\\.' end=")" contains=@shArrayValueList,shArrayValue,shComment
|
||||
else
|
||||
syn match shVarAssign contained "=" nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote,shVar
|
||||
endif
|
||||
syn match shVar contained "\h\w*"
|
||||
syn region shAtExpr contained start="@(" end=")" contains=@shIdList
|
||||
if exists("b:is_bash")
|
||||
@@ -571,8 +628,11 @@ syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList
|
||||
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
|
||||
syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern
|
||||
syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern skipnl
|
||||
syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
|
||||
" Match parametric bracket expressions with a leading whitespace character.
|
||||
syn region shDerefPattern contained matchgroup=shBracketExprDelim start="\[" end="\]" contains=@shBracketExprList,shDoubleQuote nextgroup=shDerefPattern
|
||||
call s:GenerateBracketExpressionItems({'itemGroup': 'shDerefPattern', 'bracketGroup': 'shBracketExprDelim', 'extraArgs': 'contained nextgroup=shDerefPattern'})
|
||||
syn match shDerefEscape contained '\%(\\\\\)*\\.'
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
@@ -592,15 +652,16 @@ if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
|
||||
endif
|
||||
|
||||
if exists("b:is_bash")
|
||||
" bash : ${parameter/pattern/string}
|
||||
" bash : ${parameter//pattern/string}
|
||||
" bash : ${parameter//pattern}
|
||||
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
|
||||
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' end='"' nextgroup=shDerefPPSright contains=@shPPSLeftList
|
||||
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList
|
||||
|
||||
" bash : ${parameter/#substring/replacement}
|
||||
syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft,shDoubleQuote,shSingleQuote
|
||||
syn region shDerefPSRleft contained start='[^"']' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright
|
||||
" bash : ${parameter/#pattern/string}
|
||||
" bash : ${parameter/%pattern/string}
|
||||
syn match shDerefPSR contained '/[#%]' nextgroup=shDerefPSRleft,shDoubleQuote,shSingleQuote
|
||||
syn region shDerefPSRleft contained start='[^"']' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright contains=shBracketExpr
|
||||
syn region shDerefPSRright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}'
|
||||
endif
|
||||
|
||||
@@ -670,6 +731,7 @@ syn sync match shWhileSync grouphere shRepeat "\<while\>"
|
||||
" =====================
|
||||
if !exists("skip_sh_syntax_inits")
|
||||
hi def link shArithRegion shShellVariables
|
||||
hi def link shArrayValue shDeref
|
||||
hi def link shAstQuote shDoubleQuote
|
||||
hi def link shAtExpr shSetList
|
||||
hi def link shBkslshSnglQuote shSingleQuote
|
||||
@@ -764,7 +826,10 @@ if !exists("skip_sh_syntax_inits")
|
||||
endif
|
||||
|
||||
hi def link shArithmetic Special
|
||||
hi def link shBracketExprDelim Delimiter
|
||||
hi def link shCharClass Identifier
|
||||
hi def link shCollSymb shCharClass
|
||||
hi def link shEqClass shCharClass
|
||||
hi def link shSnglCase Statement
|
||||
hi def link shCommandSub Special
|
||||
hi def link shCommandSubBQ shCommandSub
|
||||
@@ -814,6 +879,10 @@ delc ShFoldFunctions
|
||||
delc ShFoldHereDoc
|
||||
delc ShFoldIfDoFor
|
||||
|
||||
" Delete the bracket expression function {{{1
|
||||
" ======================================
|
||||
delfun s:GenerateBracketExpressionItems
|
||||
|
||||
" Set Current Syntax: {{{1
|
||||
" ===================
|
||||
if exists("b:is_bash")
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
|#+0#0000e05&| |T|h|i|s| |i|s| |O|K| +0#0000000&@62
|
||||
|:+0#0000e05&| +0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|-|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|-|e+0#0000000&|n|g|}+0#e000e06&@1| +0#0000000&@41
|
||||
|:+0#0000e05&| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|-|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|-|e+0#0000000&|n|g|}+0#e000e06&@1|"+0#af5f00255&| +0#0000000&@39
|
||||
@75
|
||||
|#+0#0000e05&| |F|i|r|s|t| |l|i|n|e| |i|s| |O|K| |e|x|c|e|p|t| |i|t|s| |m|i|s@1|i|n|g| |a| |c|l|o|s|i|n|g| |"|}|"|,| +0#0000000&@22
|
||||
|#+0#0000e05&| |s|o| |s|e|c|o|n|d| |l|i|n|e| |s|h|o|u|l|d| |h|a|v|e| |s|o|m|e| |e|r@1|o|r| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@22
|
||||
|V+0#00e0e07&|a|r|i|a|b|l|e|=+0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|=|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|=|{+0#0000000&|V|a|r|3|:|=|$+0#e000e06&|{|V|a|r|4|:+0#af5f00255&|-|e+0#0000000&|n|g|}+0#e000e06&|}+0#0000000&|}+0#e000e06&| +0#0000000&@18
|
||||
|V+0#ffffff16#ff404010|a|r|i|a|b|l|e|=|$+0#e000e06#ffffff0|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|-|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|-|{+0#0000000&|V|a|r|3|:|=|e|n|g|}|}+0#e000e06&| +0#0000000&@27
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|9|,|0|-|1| @7|B|o|t|
|
||||
|
||||
20
runtime/syntax/testdir/dumps/sh_12_00.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_00.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
>#+0#0000e05#ffffff0|!|/|b|i|n|/|b|a|s|h| +0#0000000&@63
|
||||
|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |s|h|A|r@1|a|y|V|a|l|u|e| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@19
|
||||
|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |s|h|B|r|a|c|k|e|t|E|x|p|r|D|e|l|i|m| |S|t|r|u|c|t|u|r|e| +0#0000000&@14
|
||||
|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |s|h|C|h|a|r|C|l|a|s@1| |T|o|d|o| +0#0000000&@26
|
||||
|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |s|h|R|a|n|g|e| |C|u|r|s|o|r|L|i|n|e| +0#0000000&@24
|
||||
@75
|
||||
@75
|
||||
@75
|
||||
@75
|
||||
|[+0#e000e06&@1| +0#0000000&|(+0#e000002&| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|1|"+0#af5f00255&| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|?+0#e000002&|(|-|)|+|(|[+0#00e0003&|0+0#0000000&|-|9|]+0#00e0003&|)+0#e000002&| +0#0000000&|&+0#e000002&@1| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|1|"+0#af5f00255&| +0#0000000&|=+0#af5f00255&|~| +0#0000000&|^+0#e000002&|-|?|[+0#00e0003&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|++0#e000002&|$| +0#0000000&|&+0#e000002&@1| +0#0000000&@18
|
||||
|'+0#af5f00255&|^+0#e000002&|?|(|-|)|+|(|[@1|:|d|i|g|i|t|:|]@1|)|$|'+0#af5f00255&| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|2|"+0#af5f00255&| +0#0000000&|&+0#e000002&@1| +0#0000000&|!+0#af5f00255&| +0#0000000&|"+0#af5f00255&|^+0#e000002&|-|?|[|0|-|9|]|+|$|"+0#af5f00255&| +0#0000000&|=+0#af5f00255&|~| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|2|"+0#af5f00255&| +0#0000000&|)+0#e000002&| +0#0000000&|]+0#e000e06&@1| +0#0000000&||@1| |:| @8
|
||||
@75
|
||||
|[+8&&| +0&&|\+0#e000e06&|(| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|1|"+0#af5f00255&| +0#0000000&|!+0#af5f00255&|=| +0#0000000&|"+0#af5f00255&|?+0#e000002&|(|-|)|+|(|[|0|-|9|]|)|"+0#af5f00255&| +0#0000000&|-+0#af5f00255&|a| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|1|"+0#af5f00255&| +0#0000000&|!+0#af5f00255&|=| +0#0000000&|'+0#af5f00255&|?+0#e000002&|(|-|)|+|(|[@1|:|d|i|g|i|t|:|]@1|)|'+0#af5f00255&| +0#0000000&|\+0#e000e06&|)| +0#0000000&|]+8&&| +0&&|&@1| @7
|
||||
|[+8&&| +0&&|\+0#e000e06&|(| +0#0000000&|"+0#af5f00255&|?+0#e000002&|(|-|)|+|(|[@1|:|d|i|g|i|t|:|]@1|)|"+0#af5f00255&| +0#0000000&|!+0#af5f00255&|=| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|2|"+0#af5f00255&| +0#0000000&|-+0#af5f00255&|a| +0#0000000&|'+0#af5f00255&|?+0#e000002&|(|-|)|+|(|[|0|-|9|]|)|'+0#af5f00255&| +0#0000000&|!+0#af5f00255&|=| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|2|"+0#af5f00255&| +0#0000000&|\+0#e000e06&|)| +0#0000000&|]+8&&| +0&&||@1| |:| @5
|
||||
@75
|
||||
|#+0#0000e05&| |M|a|t|c|h| |"|\|[|0|\|]|\|[|0|\|]|"|,| |"|{|0|}|{|0|}|"|,| |e|t|c|.| +0#0000000&@38
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@38
|
||||
|:| |[+0#00e0003&|\+0#0000000&| @70
|
||||
|[|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@41
|
||||
|i|s|_|b|a|s|h|:| |1|,| @45|1|,|1| @10|T|o|p|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_01.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_01.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|[+8&#ffffff0| +0&&|\+0#e000e06&|(| +0#0000000&|"+0#af5f00255&|?+0#e000002&|(|-|)|+|(|[@1|:|d|i|g|i|t|:|]@1|)|"+0#af5f00255&| +0#0000000&|!+0#af5f00255&|=| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|2|"+0#af5f00255&| +0#0000000&|-+0#af5f00255&|a| +0#0000000&|'+0#af5f00255&|?+0#e000002&|(|-|)|+|(|[|0|-|9|]|)|'+0#af5f00255&| +0#0000000&|!+0#af5f00255&|=| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|2|"+0#af5f00255&| +0#0000000&|\+0#e000e06&|)| +0#0000000&|]+8&&| +0&&||@1| |:| @5
|
||||
@75
|
||||
|#+0#0000e05&| |M|a|t|c|h| |"|\|[|0|\|]|\|[|0|\|]|"|,| |"|{|0|}|{|0|}|"|,| |e|t|c|.| +0#0000000&@38
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@38
|
||||
|:| |[+0#00e0003&|\+0#0000000&| @70
|
||||
>[|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@41
|
||||
|:| |[+0#00e0003&|[+0#0000000&|\| @69
|
||||
|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@42
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|\| @68
|
||||
|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@43
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|\+0#af5f00255&| +0#0000000&@67
|
||||
|[+0#00e0003&|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@44
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|\+0#0000000&| @66
|
||||
|0|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@45
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|\| @63
|
||||
|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@48
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|\+0#af5f00255&| +0#0000000&@62
|
||||
|*|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@49
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|\+0#af5f00255&| +0#0000000&@61
|
||||
@57|1|9|,|1| @10|6|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_02.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_02.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|:+0&#ffffff0| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|\+0#af5f00255&| +0#0000000&@61
|
||||
|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@50
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|\| @59
|
||||
|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@52
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|\| @58
|
||||
>]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@53
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|\+0#af5f00255&| +0#0000000&@57
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@54
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|\+0#0000000&| @56
|
||||
|[|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@55
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|\| @55
|
||||
|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@56
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|\| @54
|
||||
|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@57
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|\+0#af5f00255&| +0#0000000&@53
|
||||
|[+0#00e0003&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@58
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|\+0#0000000&| @52
|
||||
|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@59
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|\+0#0000000#ffffff0| @43
|
||||
@57|3|7|,|1| @9|1|6|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_03.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_03.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|:+0&#ffffff0| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|\+0#0000000#ffffff0| @43
|
||||
|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@68
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|\+0#af5f00255&| +0#0000000&@42
|
||||
|*|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@69
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|\+0#af5f00255&| +0#0000000&@41
|
||||
>[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&| +0#0000000&@70
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|\| @39
|
||||
|}|]+0#00e0003&| +0#0000000&@72
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|\| @38
|
||||
|]+0#00e0003&| +0#0000000&@73
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|]+0#00e0003&| +0#0000000&@34
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|\+0#0000000&| @40
|
||||
|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|]+0#00e0003&| +0#0000000&@67
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|\+0#0000000#ffffff0| @35
|
||||
|}|]+0#00e0003&| +0#0000000&@72
|
||||
|:| |[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|\| @34
|
||||
|]+0#00e0003&| +0#0000000&@73
|
||||
@75
|
||||
|#+0#0000e05&| |M|a|t|c|h| |"|\|[|0|\|]|\|[|0|\|]|"|,| |"|{|0|}|{|0|}|"|,| |e|t|c|.| +0#0000000&@38
|
||||
@57|5@1|,|1| @9|2|6|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_04.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_04.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|#+0#0000e05#ffffff0| |M|a|t|c|h| |"|\|[|0|\|]|\|[|0|\|]|"|,| |"|{|0|}|{|0|}|"|,| |e|t|c|.| +0#0000000&@38
|
||||
|c+0#af5f00255&|a|s|e| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|1|"+0#af5f00255&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&@62
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|0+0#0000000&|-|9|]+0#00e0003&|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|!+8#e000e06&|0+0#0000000&|-|9|]+0#00e0003&|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|^+8#e000e06&|0+0#0000000&|-|9|]+0#00e0003&|;+0#af5f00255&@1| +0#0000000&@8
|
||||
|[+0#00e0003&|\+0#0000000&| @72
|
||||
|[|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|0+0#0000000&|1|2|3|]+0#00e0003&|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|!+8#e000e06&|0+0#0000000&|1|2|3|]+0#00e0003&|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|^+8#e000e06&|0+0#0000000&|1|2|3|]+0#00e0003&|;+0#af5f00255&@1| +0#0000000&@6
|
||||
>[+0#00e0003&|[+0#0000000&|\| @71
|
||||
|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|1+0#0000000&|[+0#0000001#ffff4012|.|0|.|]|]+0#00e0003#ffffff0|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|!+8#e000e06&|[+0#0000001#ffff4012|.|0|.|]|]+0#00e0003#ffffff0|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|^+8#e000e06&|[+0#0000001#ffff4012|.|0|.|]|^+0#0000000#ffffff0|]+0#00e0003&|;+0#af5f00255&@1| +0#0000000&@2
|
||||
|[+0#00e0003&|[+0#0000000&|{|\| @70
|
||||
|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|1+0#0000000&|[+0#0000001#ffff4012|=|0|=|]|]+0#00e0003#ffffff0|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|!+8#e000e06&|[+0#0000001#ffff4012|=|0|=|]|!+0#0000000#ffffff0|]+0#00e0003&|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|^+8#e000e06&|[+0#0000001#ffff4012|=|0|=|]|]+0#00e0003#ffffff0|;+0#af5f00255&@1| +0#0000000&@3
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|\+0#0000000&| @69
|
||||
|[+0#00e0003&|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@39
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|\+0#0000000&| @68
|
||||
|0|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@40
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|\| @65
|
||||
|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |?|[+0#00e0003&|[+0#0000000&|:|f|o@1|:|]|]+0#00e0003&|?+0#0000000&|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|!+8#e000e06&|[+0#0000000&|:|f|o@1|:|]|]+0#00e0003&|?+0#0000000&|;+0#af5f00255&| +0#0000000&|:| |?|[+0#00e0003&|^+8#e000e06&|[+0#0000000&|:|f|o@1|:|]|]+0#00e0003&|;+0#af5f00255&@1| +0#0000000&
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|\+0#0000000&| @64
|
||||
|*|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|!+8#e000e06&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|;+0#af5f00255&| +0#0000000&|:| |[+0#00e0003&|^+8#e000e06&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|;+0#af5f00255&@1
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|\| @63
|
||||
|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|^+0#af5f00255&|[+0#00e0003&|[+0#0000001#ffff4012|:|l|o|w|e|r|:|]|]+0#00e0003#ffffff0|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|^+0#af5f00255&@1|[+0#00e0003&|a+0#0000000&|-|z|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&@8
|
||||
@57|7|3|,|1| @9|3|5|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_05.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_05.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|[+0#00e0003#ffffff0|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|^+0#af5f00255&|[+0#00e0003&|[+0#0000001#ffff4012|:|l|o|w|e|r|:|]|]+0#00e0003#ffffff0|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|^+0#af5f00255&@1|[+0#00e0003&|a+0#0000000&|-|z|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&@8
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|\| @61
|
||||
|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|,+0#af5f00255&|[+0#00e0003&|[+0#0000001#ffff4012|:|u|p@1|e|r|:|]|]+0#00e0003#ffffff0|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|,+0#af5f00255&@1|[+0#00e0003&|A+0#0000000&|-|Z|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&@10
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|\| @60
|
||||
|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@48
|
||||
>[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|\+0#0000000&| @59
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@49
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|\+0#0000000&| @58
|
||||
|[|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|[+0#00e0003&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&@1|[+0#00e0003&|0+0#0000000&|-|9|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&@13
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|\| @57
|
||||
|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&|[+0#00e0003&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&@1|[+0#00e0003&|0+0#0000000&|-|9|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&@14
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|\| @56
|
||||
|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|/+0#af5f00255&|[+0#00e0003&|]+0#0000000&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|[+0#0000000#ffffff0|]+0#00e0003&|/+0#af5f00255&|[+0#0000000&|0|-|9|]|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|/+0#af5f00255&@1|[+0#00e0003&|]+0#0000000&|0|-|9|[|]+0#00e0003&|/+0#af5f00255&|[+0#0000000&|0|-|9|]|}+0#e000e06&|"+0#af5f00255&|;@1
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|\+0#0000000&| @55
|
||||
|[+0#00e0003&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|/+0#af5f00255&|#|[+0#00e0003&|]+0#0000000&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|[+0#0000000#ffffff0|]+0#00e0003&|/+0#af5f00255&|[+0#0000000&|0|-|9|]|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|/+0#af5f00255&|%|[+0#00e0003&|]+0#0000000&|0|-|9|[|]+0#00e0003&|/+0#af5f00255&|[+0#0000000&|0|-|9|]|}+0#e000e06&|"+0#af5f00255&|;@1
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|\+0#0000000&| @54
|
||||
|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@54
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|\+0#0000000#ffffff0| @45
|
||||
|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@63
|
||||
@57|9|1|,|1| @9|4|5|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_06.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_06.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@63
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|\+0#0000000&| @44
|
||||
|*|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|[|.|]|[|.|]|.|]|]+0#00e0003#ffffff0|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|[|.|[|.|]|]+0#00e0003#ffffff0|*+0#0000000&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|"+0#af5f00255&| +0#e000002&|"+0#af5f00255&|[+0#00e0003&|]+0#0000000&|[|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;@1
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|\| @43
|
||||
|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|=|[|=|]|[|=|]|=|]|]+0#00e0003#ffffff0|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&|[+0#00e0003&|[+0#0000001#ffff4012|=|]|=|]|[|=|[|=|]|]+0#00e0003#ffffff0|*+0#0000000&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|\| |[+0#00e0003&|!+8#e000e06&|]+0#0000000&|[|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&
|
||||
>[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|\| @41
|
||||
|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|!+8#e000e06&|]+0#0000000&|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|^+8#e000e06&|]+0#0000000&|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&|[+0#00e0003&|!+8#e000e06&|[+0#0000000&|]+0#00e0003&|*+0#0000000&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&|[+0#00e0003&|^+8#e000e06&|[+0#0000000&|]+0#00e0003&|*+0#0000000&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&@5
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|\| @40
|
||||
|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|!+8#e000e06&|\+0#0000000&|]|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|^+8#e000e06&|\+0#0000000&|]|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&|[+0#00e0003&|!+8#e000e06&|\+0#0000000&|[|]+0#00e0003&|*+0#0000000&|}+0#e000e06&|"+0#af5f00255&|;| +0#0000000&|:| |"+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&|[+0#00e0003&|^+8#e000e06&|\+0#0000000&|[|]+0#00e0003&|*+0#0000000&|}+0#e000e06&|"+0#af5f00255&|;@1| +0#0000000&@2
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|\+0#0000000&| @39
|
||||
|*|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@69
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|]+0#00e0003&|\+0#0000000&| @35
|
||||
|*|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@69
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|\+0#0000000&| @42
|
||||
|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@62
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|\+0#0000000#ffffff0| @37
|
||||
|}|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@67
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|\| @36
|
||||
|]+0#00e0003&|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@68
|
||||
@57|1|0|9|,|1| @8|5@1|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_07.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_07.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|]+0#00e0003#ffffff0|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@68
|
||||
|[+0#00e0003&|!+8#e000e06&|]+0#0000000&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|[|:|x|d|i|g|i|t|:|]|\+0#0000000#ffffff0| |[|^|[+0#0000001#ffff4012|:|l|o|w|e|r|:|]|!+0#0000000#ffffff0|[+0#0000001#ffff4012|:|u|p@1|e|r|:|]|]+0#00e0003#ffffff0|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@23
|
||||
|[+0#00e0003&|^+8#e000e06&|]+0#0000000&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|0+0#0000000#ffffff0|-|9|a|-|f|A|-|F|\| |[|!|[+0#0000001#ffff4012|:|l|o|w|e|r|:|]|^+0#0000000#ffffff0|[+0#0000001#ffff4012|:|u|p@1|e|r|:|]|]+0#00e0003#ffffff0|*+0#0000000&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@24
|
||||
|[+0#00e0003&|!+8#e000e06&|!+0#0000000&|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|!+8#e000e06&|!+0#0000000&|[|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|!+8#e000e06&|]+0#0000000&|!|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|!+8#e000e06&|^+0#0000000&|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|!+8#e000e06&|^+0#0000000&|[|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|!+8#e000e06&|]+0#0000000&|^|]+0#00e0003&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@27
|
||||
|[+0#00e0003&|^+8#e000e06&|!+0#0000000&|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|^+8#e000e06&|!+0#0000000&|[|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|^+8#e000e06&|]+0#0000000&|!|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|^+8#e000e06&|^+0#0000000&|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|^+8#e000e06&|^+0#0000000&|[|]+0#00e0003&| +0#0000000&||+0#af5f00255&| +0#0000000&|[+0#00e0003&|^+8#e000e06&|]+0#0000000&|^|]+0#00e0003&|)+0#af5f00255&| +0#0000000&|;+0#af5f00255&@1| +0#0000000&@27
|
||||
>e+0#af5f00255&|s|a|c| +0#0000000&@70
|
||||
@75
|
||||
|#+0#0000e05&| |M|a|t|c|h| |"|\|[|0|\|]|\|[|0|\|]|"|,| |"|{|0|}|{|0|}|"|,| |e|t|c|.| +0#0000000&@38
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@30
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|\| @65
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@38
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|\+0#0000000&| @64
|
||||
|[|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@39
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|\| @63
|
||||
|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@40
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|\| @62
|
||||
|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@41
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|\+0#0000000&| @61
|
||||
|[+0#00e0003&|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@42
|
||||
@57|1|2|7|,|1| @8|6|4|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_08.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_08.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|[+0#00e0003#ffffff0|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@42
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|\+0#0000000&| @60
|
||||
|0|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@43
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|\| @57
|
||||
|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@46
|
||||
>:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|\+0#0000000&| @56
|
||||
|*|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@47
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|\| @55
|
||||
|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@48
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|\| @53
|
||||
|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@50
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|\| @52
|
||||
|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@51
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|\+0#0000000&| @51
|
||||
|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@52
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|\+0#0000000&| @50
|
||||
|[|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@53
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|\| @49
|
||||
|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@54
|
||||
@57|1|4|5|,|1| @8|7|4|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_09.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_09.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|{+0&#ffffff0|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@54
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|\| @48
|
||||
|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@55
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|\+0#0000000&| @47
|
||||
|[+0#00e0003&|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@56
|
||||
>:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|\+0#0000000&| @46
|
||||
|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@57
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|\+0#0000000#ffffff0| @37
|
||||
|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@66
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|\+0#0000000&| @36
|
||||
|*|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@67
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|\| @35
|
||||
|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@68
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|\| @33
|
||||
|}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@70
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|\| @32
|
||||
|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@71
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|\+0#0000000&| @31
|
||||
|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@72
|
||||
@57|1|6|3|,|1| @8|8|3|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_10.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_10.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|}+0#e000e06#ffffff0|"+0#af5f00255&| +0#0000000&@72
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@26
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|\+0#0000000&| @34
|
||||
|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@65
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|\+0#0000000#ffffff0| @29
|
||||
>}|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@70
|
||||
|:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|*+0#0000000&|[+0#00e0003&|[+0#0000000&|{|]+0#00e0003&|[|0+0#0000000&|-|9|]+0#00e0003&|*+0#0000000&|[+0#00e0003&|]+0#0000000&|}|]+0#00e0003&|[|[+0#0000000&|{|]+0#00e0003&|[|[+0#0000001#ffff4012|:|d|i|g|i|t|:|]|]+0#00e0003#ffffff0|*+0#0000000&|[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|}+0#0000000#ffffff0|]+0#00e0003&|\+0#0000000&| @27
|
||||
|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@72
|
||||
@75
|
||||
|:| |*|[+0#00e0003&|x+0#0000000&|[+0#0000001#ffff4012|=|[|=|]|[|=|]|=|]|]+0#00e0003#ffffff0|;+0#0000000&| |:| |[+0#00e0003&|x+0#0000000&|[+0#0000001#ffff4012|=|]|=|]|[|=|[|=|]|]+0#00e0003#ffffff0|*+0#0000000&|;| |:| |*|[+0#00e0003&|x+0#0000000&|[+0#0000001#ffff4012|.|[|.|]|[|.|]|.|]|]+0#00e0003#ffffff0|;+0#0000000&| |:| |[+0#00e0003&|x+0#0000000&|[+0#0000001#ffff4012|.|]|.|]|[|.|[|.|]|]+0#00e0003#ffffff0|*+0#0000000&| @4
|
||||
|:| |*|[+0#00e0003&|[+0#0000001#ffff4012|=|[|=|]|x+0#0000000#ffffff0|[+0#0000001#ffff4012|=|]|=|]|]+0#00e0003#ffffff0|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000001#ffff4012|=|]|=|]|x+0#0000000#ffffff0|[+0#0000001#ffff4012|=|[|=|]|]+0#00e0003#ffffff0|*+0#0000000&|;| |:| |*|[+0#00e0003&|[+0#0000001#ffff4012|.|[|.|]|x+0#0000000#ffffff0|[+0#0000001#ffff4012|.|]|.|]|]+0#00e0003#ffffff0|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|x+0#0000000#ffffff0|[+0#0000001#ffff4012|.|[|.|]|]+0#00e0003#ffffff0|*+0#0000000&| @4
|
||||
|:| |*|[+0#00e0003&|[+0#0000001#ffff4012|=|[|=|]|[|=|]|=|]|x+0#0000000#ffffff0|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000001#ffff4012|=|]|=|]|[|=|[|=|]|x+0#0000000#ffffff0|]+0#00e0003&|*+0#0000000&|;| |:| |*|[+0#00e0003&|[+0#0000001#ffff4012|.|[|.|]|[|.|]|.|]|x+0#0000000#ffffff0|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000001#ffff4012|.|]|.|]|[|.|[|.|]|x+0#0000000#ffffff0|]+0#00e0003&|*+0#0000000&| @4
|
||||
|:| |[+0#00e0003&|!+8#e000e06&|]+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|^+8#e000e06&|]+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|!+8#e000e06&|[+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|^+8#e000e06&|[+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|!+8#e000e06&|\+0#0000000&|]|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|^+8#e000e06&|\+0#0000000&|]|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|!+8#e000e06&|\+0#0000000&|[|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|^+8#e000e06&|\+0#0000000&|[|]+0#00e0003&| +0#0000000&@8
|
||||
|:| |[+0#00e0003&|$+0#0000000&|'|\|x|5|b|'|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|$+0#0000000&|'|\|x|5|d|'|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|]+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|\+0#0000000&|]|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|\+0#0000000&|[|]+0#00e0003&| +0#0000000&@20
|
||||
|:| |[+0#00e0003&|$+0#0000000&|'|\|x|2|0|'|[|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|"+0#af5f00255&| +0#e000002&|"+0#af5f00255&|[+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|'+0#0000000&| |'|[|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|\+0#0000000&| |[|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|\+0#0000000&| |\|[|]+0#00e0003&|;+0#0000000&| |:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|[+0#00e0003&| +0#0000000&@2|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@7
|
||||
|:| |[+0#00e0003&|[+0#0000000&|$|'|\|x|2|0|'|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000000&|"+0#af5f00255&| +0#e000002&|"+0#af5f00255&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000000&|'| |'|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|[+0#0000000&|\| |]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|\+0#0000000&|[|\| |]+0#00e0003&|;+0#0000000&| |:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|[+0#00e0003&| +0#0000000&@3|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@6
|
||||
|:| |[+0#00e0003&|^+8#e000e06&|$+0#0000000&|'|\|x|2|0|'|[|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|!+8#e000e06&|"+0#af5f00255&| +0#e000002&|"+0#af5f00255&|[+0#0000000&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|^+8#e000e06&|'+0#0000000&| |'|[|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|!+8#e000e06&|\+0#0000000&| |[|]+0#00e0003&|;+0#0000000&| |:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|[+0#00e0003&|^+8#e000e06&| +0#0000000&@7|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@7
|
||||
|:| |[+0#00e0003&|!+8#e000e06&|[+0#0000000&|$|'|\|x|2|0|'|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|^+8#e000e06&|[+0#0000000&|"+0#af5f00255&| +0#e000002&|"+0#af5f00255&|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|!+8#e000e06&|[+0#0000000&|'| |'|]+0#00e0003&|;+0#0000000&| |:| |[+0#00e0003&|^+8#e000e06&|[+0#0000000&|\| |]+0#00e0003&|;+0#0000000&| |:| |"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|[+0#00e0003&|!+8#e000e06&| +0#0000000&@8|]+0#00e0003&|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@6
|
||||
@75
|
||||
@57|1|8|1|,|1| @8|9|3|%|
|
||||
20
runtime/syntax/testdir/dumps/sh_12_11.dump
Normal file
20
runtime/syntax/testdir/dumps/sh_12_11.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
| +0&#ffffff0@74
|
||||
|n+0#00e0e07&|l|=+0#0000000&|'+0#af5f00255&| +0#0000000&@70
|
||||
|'+0#af5f00255&| +0#0000000&@73
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&@1|[+0#00e0003&|!+8#e000e06&|"+0#af5f00255&|$+0#e000e06&|{|n|l|}|"+0#af5f00255&|]+0#00e0003&|*+0#0000000&|}+0#e000e06&@1|"+0#af5f00255&|;+0#0000000&| |e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&@1|[+0#00e0003&|!+8#e000e06&|'+0#0000000&|$|{|n|l|}|'|]+0#00e0003&|*+0#0000000&|}+0#e000e06&@1|"+0#af5f00255&| +0#0000000&@14
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&@1|[+0#00e0003&|!+8#e000e06&|\+0#0000000&|"|$|{|n|l|}|]+0#00e0003&|*+0#0000000&|}+0#e000e06&@1|"+0#af5f00255&|;+0#0000000&| |e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&@1|[+0#00e0003&|!+8#e000e06&|\+0#0000000&|'|$|{|n|l|}|]+0#00e0003&|*+0#0000000&|}+0#e000e06&@1|"+0#af5f00255&| +0#0000000&@14
|
||||
>e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&@1|[+0#00e0003&|!+8#e000e06&|$+0#0000000&|{|n|l|}|\|"|]+0#00e0003&|*+0#0000000&|}+0#e000e06&@1|"+0#af5f00255&|;+0#0000000&| |e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|$+0#e000e06&|{|1|#+0#af5f00255&|$+0#e000e06&|{|1|%+0#af5f00255&@1|[+0#00e0003&|!+8#e000e06&|$+0#0000000&|{|n|l|}|\|'|]+0#00e0003&|*+0#0000000&|}+0#e000e06&@1|"+0#af5f00255&| +0#0000000&@14
|
||||
@75
|
||||
|b+0#00e0e07&|i|n|s|=+0#0000000&|(+0#e000e06&|)|;+0#0000000&| |b+0#00e0e07&|i|n|s|=+0#0000000&|(+0#e000e06&|0+0#e000002&| +0#0000000&|1+0#e000002&|)+0#e000e06&|;+0#0000000&| |e+0#af5f00255&|v|a|l| +0#0000000&|b+0#00e0e07&|i|n|s|++0#0000000&|=|(+0#e000e06&|{|0+0#e000002&|.+0#0000000&@1|1+0#e000002&|}+0#e000e06&|)| +0#0000000&@34
|
||||
|b+0#00e0e07&|i|n|s|[+0#e000e06&|0+0#e000002&|]+0#e000e06&|=+0#0000000&|0+0#e000002&|;+0#0000000&| |b+0#00e0e07&|i|n|s|[+0#e000e06&|1+0#e000002&|]+0#e000e06&|=+0#0000000&|1+0#e000002&|;+0#0000000&| |e+0#af5f00255&|v|a|l| +0#0000000&|b+0#00e0e07&|i|n|s|++0#0000000&|=|(+0#e000e06&|\+0#0000000&|$+0#e000e06&|{|b|i|n|s|[|{|1+0#e000002&|.+0#0000000&@1|0+0#e000002&|}+0#e000e06&|]|}|)|;+0#0000000&| |u+0#af5f00255&|n|s|e|t| +0#00e0e07&|b|i|n|s|[+0#e000e06&|3+0#e000002&|]+0#e000e06&| +0#00e0e07&|b|i|n|s|[+0#e000e06&|2+0#e000002&|]+0#e000e06&| +0#0000000&
|
||||
|b+0#00e0e07&|i|n|s|=+0#0000000&|(+0#e000e06&|[+0#00e0e07&|8+0#e000002&|#|0|]+0#00e0e07&|=+0#0000000&|$+0#e000e06&|(@1|2+0#e000002&|#|1|0@1|)+0#e000e06&@1| +0#0000000&|[+0#00e0e07&|$+0#e000e06&|(@1|8+0#e000002&|#|1|)+0#e000e06&@1|]+0#00e0e07&|=+0#0000000&|$+0#e000e06&|(@1|2+0#e000002&|#|1|0|)+0#e000e06&@1| +0#0000000&|[+0#00e0e07&|3+0#e000002&|]+0#00e0e07&|=+0#0000000&|$+0#e000e06&|{|b|i|n|s|[|2+0#e000002&|#|1|]+0#e000e06&|}| +0#0000000&|$+0#e000e06&|{|b|i|n|s|[|0+0#e000002&|]+0#e000e06&|}|)| +0#0000000&@2
|
||||
|(+0#e000e06&|e+0#af5f00255&|c|h|o| +0#e000002&|s|u|m|[+0#e000e06&|$|(@1|b|i|n|s|[|1+0#e000002&|6|#|3|]+0#e000e06&| |+| |b|i|n|s|[|8+0#e000002&|#|2|]+0#e000e06&| |+| |b|i|n|s|[|2+0#e000002&|#|1|]+0#e000e06&| |+| |b|i|n|s|[|0+0#e000002&|]+0#e000e06&|)@1|]|)| +0#0000000&@13
|
||||
|e+0#af5f00255&|v|a|l| +0#0000000&|u+0#af5f00255&|n|s|e|t| +0#00e0e07&|b|i|n|s|[+0#e000e06&|{|0+0#e000002&|.+0#0000000&@1|$+0#e000e06&|(@1|$|{|#|b|i|n|s|[|*+0#0000000&|]+0#e000e06&|}| |-| |1+0#e000002&|)+0#e000e06&@1|}|]| +0#0000000&@32
|
||||
|:| @73
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|9@1|,|1| @8|B|o|t|
|
||||
@@ -20,8 +20,3 @@ Variable="${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}"
|
||||
# This is OK
|
||||
: ${VariableB:-${VariableC:-eng}}
|
||||
: "${VariableB:-${VariableC:-eng}}"
|
||||
|
||||
# First line is OK except its missing a closing "}",
|
||||
# so second line should have some error highlighting
|
||||
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}
|
||||
Variable=${VariableB:-${VariableC:-{Var3:=eng}}
|
||||
|
||||
206
runtime/syntax/testdir/input/sh_12.sh
Normal file
206
runtime/syntax/testdir/input/sh_12.sh
Normal file
@@ -0,0 +1,206 @@
|
||||
#!/bin/bash
|
||||
# VIM_TEST_SETUP highlight link shArrayValue Identifier
|
||||
# VIM_TEST_SETUP highlight link shBracketExprDelim Structure
|
||||
# VIM_TEST_SETUP highlight link shCharClass Todo
|
||||
# VIM_TEST_SETUP highlight link shRange CursorLine
|
||||
|
||||
|
||||
|
||||
|
||||
[[ ( "$1" == ?(-)+([0-9]) && "$1" =~ ^-?[[:digit:]]+$ &&
|
||||
'^?(-)+([[:digit:]])$' == "$2" && ! "^-?[0-9]+$" =~ "$2" ) ]] || :
|
||||
|
||||
[ \( "$1" != "?(-)+([0-9])" -a "$1" != '?(-)+([[:digit:]])' \) ] &&
|
||||
[ \( "?(-)+([[:digit:]])" != "$2" -a '?(-)+([0-9])' != "$2" \) ] || :
|
||||
|
||||
# Match "\[0\]\[0\]", "{0}{0}", etc.
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*[]}]
|
||||
: [\
|
||||
[{][0-9]*[]}][[{][[:digit:]]*[]}]
|
||||
: [[\
|
||||
{][0-9]*[]}][[{][[:digit:]]*[]}]
|
||||
: [[{\
|
||||
][0-9]*[]}][[{][[:digit:]]*[]}]
|
||||
: [[{]\
|
||||
[0-9]*[]}][[{][[:digit:]]*[]}]
|
||||
: [[{][\
|
||||
0-9]*[]}][[{][[:digit:]]*[]}]
|
||||
: [[{][0-9\
|
||||
]*[]}][[{][[:digit:]]*[]}]
|
||||
: [[{][0-9]\
|
||||
*[]}][[{][[:digit:]]*[]}]
|
||||
: [[{][0-9]*\
|
||||
[]}][[{][[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]\
|
||||
}][[{][[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}\
|
||||
][[{][[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}]\
|
||||
[[{][[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}][\
|
||||
[{][[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}][[\
|
||||
{][[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}][[{\
|
||||
][[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}][[{]\
|
||||
[[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}][[{][\
|
||||
[:digit:]]*[]}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]\
|
||||
]*[]}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]\
|
||||
*[]}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*\
|
||||
[]}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*[]\
|
||||
}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*[]}\
|
||||
]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*[[.].]}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*[\
|
||||
[.].]}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*[[.].]\
|
||||
}]
|
||||
: [[{][0-9]*[]}][[{][[:digit:]]*[[.].]}\
|
||||
]
|
||||
|
||||
# Match "\[0\]\[0\]", "{0}{0}", etc.
|
||||
case "$1" in
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[]}]*) : [0-9]; : [!0-9]; : [^0-9];;
|
||||
[\
|
||||
[{][0-9]*[]}][[{][[:digit:]]*[]}]*) : [0123]; : [!0123]; : [^0123];;
|
||||
[[\
|
||||
{][0-9]*[]}][[{][[:digit:]]*[]}]*) : [1[.0.]]; : [![.0.]]; : [^[.0.]^];;
|
||||
[[{\
|
||||
][0-9]*[]}][[{][[:digit:]]*[]}]*) : [1[=0=]]; : [![=0=]!]; : [^[=0=]];;
|
||||
[[{]\
|
||||
[0-9]*[]}][[{][[:digit:]]*[]}]*) ;;
|
||||
[[{][\
|
||||
0-9]*[]}][[{][[:digit:]]*[]}]*) ;;
|
||||
[[{][0-9\
|
||||
]*[]}][[{][[:digit:]]*[]}]*) : ?[[:foo:]]?; : [![:foo:]]?; : ?[^[:foo:]];;
|
||||
[[{][0-9]\
|
||||
*[]}][[{][[:digit:]]*[]}]*) : [[:digit:]]; : [![:digit:]]; : [^[:digit:]];;
|
||||
[[{][0-9]*\
|
||||
[]}][[{][[:digit:]]*[]}]*) : "${1^[[:lower:]]}"; : "${1^^[a-z]}";;
|
||||
[[{][0-9]*[]\
|
||||
}][[{][[:digit:]]*[]}]*) : "${1,[[:upper:]]}"; : "${1,,[A-Z]}";;
|
||||
[[{][0-9]*[]}\
|
||||
][[{][[:digit:]]*[]}]*) ;;
|
||||
[[{][0-9]*[]}]\
|
||||
[[{][[:digit:]]*[]}]*) ;;
|
||||
[[{][0-9]*[]}][\
|
||||
[{][[:digit:]]*[]}]*) : "${1#[[:digit:]]}"; : "${1##[0-9]}";;
|
||||
[[{][0-9]*[]}][[\
|
||||
{][[:digit:]]*[]}]*) : "${1%[[:digit:]]}"; : "${1%%[0-9]}";;
|
||||
[[{][0-9]*[]}][[{\
|
||||
][[:digit:]]*[]}]*) : "${1/[][:digit:][]/[0-9]}"; : "${1//[]0-9[]/[0-9]}";;
|
||||
[[{][0-9]*[]}][[{]\
|
||||
[[:digit:]]*[]}]*) : "${1/#[][:digit:][]/[0-9]}"; : "${1/%[]0-9[]/[0-9]}";;
|
||||
[[{][0-9]*[]}][[{][\
|
||||
[:digit:]]*[]}]*) ;;
|
||||
[[{][0-9]*[]}][[{][[:digit:]\
|
||||
]*[]}]*) ;;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]\
|
||||
*[]}]*) : "${1#*[[.[.][.].]]}"; : "${1%[[.].][.[.]]*}"; : "${1#*" "[][]}";;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*\
|
||||
[]}]*) : "${1#*[[=[=][=]=]]}"; : "${1%[[=]=][=[=]]*}"; : "${1#*\ [!][]}";;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[]\
|
||||
}]*) : "${1#*[!]]}"; : "${1#*[^]]}"; : "${1%[![]*}"; : "${1%[^[]*}";;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[]}\
|
||||
]*) : "${1#*[!\]]}"; : "${1#*[^\]]}"; : "${1%[!\[]*}"; : "${1%[^\[]*}";;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[]}]\
|
||||
*) ;;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[[.].]}]\
|
||||
*) ;;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[\
|
||||
[.].]}]*) ;;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[[.].]\
|
||||
}]*) ;;
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[[.].]}\
|
||||
]*) ;;
|
||||
[!][:digit:][:xdigit:]\ [^[:lower:]![:upper:]]*) ;;
|
||||
[^][:digit:]0-9a-fA-F\ [![:lower:]^[:upper:]]*) ;;
|
||||
[!!] | [!![] | [!]!] | [!^] | [!^[] | [!]^]) ;;
|
||||
[^!] | [^![] | [^]!] | [^^] | [^^[] | [^]^]) ;;
|
||||
esac
|
||||
|
||||
# Match "\[0\]\[0\]", "{0}{0}", etc.
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*\
|
||||
[[{][0-9]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[\
|
||||
[{][0-9]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[\
|
||||
{][0-9]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{\
|
||||
][0-9]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{]\
|
||||
[0-9]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][\
|
||||
0-9]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9\
|
||||
]*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]\
|
||||
*[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*\
|
||||
[]}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]\
|
||||
}][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}\
|
||||
][[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}]\
|
||||
[[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][\
|
||||
[{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[\
|
||||
{][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{\
|
||||
][[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{]\
|
||||
[[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][\
|
||||
[:digit:]]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]\
|
||||
]*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]\
|
||||
*[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*\
|
||||
[]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[]\
|
||||
}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[]}\
|
||||
]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[]}]\
|
||||
}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[[.].]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[\
|
||||
[.].]}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[[.].]\
|
||||
}]}"
|
||||
: "${1#*[[{][0-9]*[]}][[{][[:digit:]]*[[.].]}]\
|
||||
}"
|
||||
|
||||
: *[x[=[=][=]=]]; : [x[=]=][=[=]]*; : *[x[.[.][.].]]; : [x[.].][.[.]]*
|
||||
: *[[=[=]x[=]=]]; : [[=]=]x[=[=]]*; : *[[.[.]x[.].]]; : [[.].]x[.[.]]*
|
||||
: *[[=[=][=]=]x]; : [[=]=][=[=]x]*; : *[[.[.][.].]x]; : [[.].][.[.]x]*
|
||||
: [!]]; : [^]]; : [![]; : [^[]; : [!\]]; : [^\]]; : [!\[]; : [^\[]
|
||||
: [$'\x5b']; : [$'\x5d']; : []]; : [[]; : [\]]; : [\[]
|
||||
: [$'\x20'[]; : [" "[]; : [' '[]; : [\ []; : [\ \[]; : "${1#[ ]}"
|
||||
: [[$'\x20']; : [[" "]; : [[' ']; : [[\ ]; : [\[\ ]; : "${1#[ ]}"
|
||||
: [^$'\x20'[]; : [!" "[]; : [^' '[]; : [!\ []; : "${1#[^ ]}"
|
||||
: [![$'\x20']; : [^[" "]; : [![' ']; : [^[\ ]; : "${1#[! ]}"
|
||||
|
||||
nl='
|
||||
'
|
||||
echo "${1#${1%%[!"${nl}"]*}}"; echo "${1#${1%%[!'${nl}']*}}"
|
||||
echo "${1#${1%%[!\"${nl}]*}}"; echo "${1#${1%%[!\'${nl}]*}}"
|
||||
echo "${1#${1%%[!${nl}\"]*}}"; echo "${1#${1%%[!${nl}\']*}}"
|
||||
|
||||
bins=(); bins=(0 1); eval bins+=({0..1})
|
||||
bins[0]=0; bins[1]=1; eval bins+=(\${bins[{1..0}]}); unset bins[3] bins[2]
|
||||
bins=([8#0]=$((2#100)) [$((8#1))]=$((2#10)) [3]=${bins[2#1]} ${bins[0]})
|
||||
(echo sum[$((bins[16#3] + bins[8#2] + bins[2#1] + bins[0]))])
|
||||
eval unset bins[{0..$((${#bins[*]} - 1))}]
|
||||
:
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2024 Dec 29
|
||||
" Last Change: 2024 Dec 30
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@@ -28,7 +28,7 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
" regular vim commands {{{2
|
||||
" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR=''
|
||||
syn keyword vimCommand contained abo[veleft] abs[tract] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] comp[iler] con[tinue]
|
||||
syn keyword vimCommand contained conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] em[enu] en[dif] endfo[r] endt[ry] endw[hile] ene[w] ev[al] ex exi[t] exu[sage] f[ile] files filet[ype] filt[er] fin[d] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] ij[ump] il[ist] imp[ort]
|
||||
syn keyword vimCommand contained conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] em[enu] en[dif] endfo[r] endt[ry] endw[hile] ene[w] ev[al] ex exi[t] exu[sage] f[ile] files filet[ype] filt[er] fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] ij[ump] il[ist] imp[ort]
|
||||
syn keyword vimCommand contained int[ro] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow] ls m[ove] ma[rk] mak[e] marks menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile]
|
||||
syn keyword vimCommand contained n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas]
|
||||
syn keyword vimCommand contained sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sil[ent] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal]
|
||||
@@ -101,15 +101,15 @@ syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
" GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR=''
|
||||
syn keyword vimFuncName contained abs acos add and append appendbufline argc argidx arglistid argv asin assert_beeps assert_equal assert_equalfile assert_exception assert_fails assert_false assert_inrange assert_match assert_nobeep assert_notequal assert_notmatch assert_report assert_true atan atan2 autocmd_add autocmd_delete autocmd_get balloon_gettext balloon_show balloon_split bindtextdomain blob2list browse browsedir bufadd bufexists buflisted bufload bufloaded bufname bufnr bufwinid bufwinnr byte2line byteidx byteidxcomp call ceil ch_canread ch_close ch_close_in ch_evalexpr ch_evalraw ch_getbufnr ch_getjob ch_info ch_log ch_logfile ch_open ch_read ch_readblob ch_readraw ch_sendexpr ch_sendraw ch_setoptions ch_status changenr char2nr charclass charcol charidx
|
||||
syn keyword vimFuncName contained chdir cindent clearmatches col complete complete_add complete_check complete_info confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filecopy filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect get getbufinfo getbufline getbufoneline getbufvar getcellpixels getcellwidths
|
||||
syn keyword vimFuncName contained getchangelist getchar getcharmod getcharpos getcharsearch getcharstr getcmdcomplpat getcmdcompltype getcmdline getcmdpos getcmdprompt getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregionpos getregtype getscriptinfo gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname iconv id indent index indexof input inputdialog
|
||||
syn keyword vimFuncName contained inputlist inputrestore inputsave inputsecret insert instanceof interrupt invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank nr2char or pathshorten perleval popup_atcursor popup_beval popup_clear popup_close popup_create popup_dialog
|
||||
syn keyword vimFuncName contained popup_filter_menu popup_filter_yesno popup_findecho popup_findinfo popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setbuf popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime reltimefloat reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remote_startserver remove
|
||||
syn keyword vimFuncName contained rename repeat resolve reverse round rubyeval screenattr screenchar screenchars screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent sound_playfile sound_stop soundfold spellbadword spellsuggest split sqrt srand state str2float str2list
|
||||
syn keyword vimFuncName contained str2nr strcharlen strcharpart strchars strdisplaywidth strftime strgetchar stridx string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail test_autochdir test_feedinput
|
||||
syn keyword vimFuncName contained test_garbagecollect_now test_garbagecollect_soon test_getvalue test_gui_event test_ignore_error test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol windowsversion winheight winlayout
|
||||
syn keyword vimFuncName contained winline winnr winrestcmd winrestview winsaveview winwidth wordcount writefile xor
|
||||
syn keyword vimFuncName contained abs acos add and append appendbufline argc argidx arglistid argv asin assert_beeps assert_equal assert_equalfile assert_exception assert_fails assert_false assert_inrange assert_match assert_nobeep assert_notequal assert_notmatch assert_report assert_true atan atan2 autocmd_add autocmd_delete autocmd_get balloon_gettext balloon_show balloon_split base64_decode base64_encode bindtextdomain blob2list browse browsedir bufadd bufexists buflisted bufload bufloaded bufname bufnr bufwinid bufwinnr byte2line byteidx byteidxcomp call ceil ch_canread ch_close ch_close_in ch_evalexpr ch_evalraw ch_getbufnr ch_getjob ch_info ch_log ch_logfile ch_open ch_read ch_readblob ch_readraw ch_sendexpr ch_sendraw ch_setoptions ch_status changenr char2nr
|
||||
syn keyword vimFuncName contained charclass charcol charidx chdir cindent clearmatches col complete complete_add complete_check complete_info confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filecopy filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect get getbufinfo getbufline getbufoneline
|
||||
syn keyword vimFuncName contained getbufvar getcellpixels getcellwidths getchangelist getchar getcharmod getcharpos getcharsearch getcharstr getcmdcomplpat getcmdcompltype getcmdline getcmdpos getcmdprompt getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregionpos getregtype getscriptinfo gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname iconv
|
||||
syn keyword vimFuncName contained id indent index indexof input inputdialog inputlist inputrestore inputsave inputsecret insert instanceof interrupt invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank nr2char or pathshorten perleval popup_atcursor popup_beval
|
||||
syn keyword vimFuncName contained popup_clear popup_close popup_create popup_dialog popup_filter_menu popup_filter_yesno popup_findecho popup_findinfo popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setbuf popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime reltimefloat reltimestr remote_expr remote_foreground remote_peek
|
||||
syn keyword vimFuncName contained remote_read remote_send remote_startserver remove rename repeat resolve reverse round rubyeval screenattr screenchar screenchars screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent sound_playfile sound_stop soundfold spellbadword spellsuggest
|
||||
syn keyword vimFuncName contained split sqrt srand state str2float str2list str2nr strcharlen strcharpart strchars strdisplaywidth strftime strgetchar stridx string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail
|
||||
syn keyword vimFuncName contained test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon test_getvalue test_gui_event test_ignore_error test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol
|
||||
syn keyword vimFuncName contained windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview winwidth wordcount writefile xor
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
|
||||
23
src/dict.c
23
src/dict.c
@@ -531,6 +531,29 @@ dict_add_callback(dict_T *d, char *key, callback_T *cb)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a function entry to dictionary "d".
|
||||
* Returns FAIL when out of memory and when key already exists.
|
||||
*/
|
||||
int
|
||||
dict_add_func(dict_T *d, char *key, ufunc_T *fp)
|
||||
{
|
||||
dictitem_T *item;
|
||||
|
||||
item = dictitem_alloc((char_u *)key);
|
||||
if (item == NULL)
|
||||
return FAIL;
|
||||
item->di_tv.v_type = VAR_FUNC;
|
||||
item->di_tv.vval.v_string = vim_strsave(fp->uf_name);
|
||||
if (dict_add(d, item) == FAIL)
|
||||
{
|
||||
dictitem_free(item);
|
||||
return FAIL;
|
||||
}
|
||||
func_ref(item->di_tv.vval.v_string);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes "iter" for iterating over dictionary items with
|
||||
* dict_iterate_next().
|
||||
|
||||
184
src/evalfunc.c
184
src/evalfunc.c
@@ -28,6 +28,8 @@ static void f_balloon_show(typval_T *argvars, typval_T *rettv);
|
||||
static void f_balloon_split(typval_T *argvars, typval_T *rettv);
|
||||
# endif
|
||||
#endif
|
||||
static void f_base64_encode(typval_T *argvars, typval_T *rettv);
|
||||
static void f_base64_decode(typval_T *argvars, typval_T *rettv);
|
||||
static void f_bindtextdomain(typval_T *argvars, typval_T *rettv);
|
||||
static void f_byte2line(typval_T *argvars, typval_T *rettv);
|
||||
static void f_call(typval_T *argvars, typval_T *rettv);
|
||||
@@ -1834,6 +1836,10 @@ static funcentry_T global_functions[] =
|
||||
NULL
|
||||
#endif
|
||||
},
|
||||
{"base64_decode", 1, 1, FEARG_1, arg1_string,
|
||||
ret_blob, f_base64_decode},
|
||||
{"base64_encode", 1, 1, FEARG_1, arg1_blob,
|
||||
ret_string, f_base64_encode},
|
||||
{"bindtextdomain", 2, 2, 0, arg2_string,
|
||||
ret_bool, f_bindtextdomain},
|
||||
{"blob2list", 1, 1, FEARG_1, arg1_blob,
|
||||
@@ -2164,6 +2170,8 @@ static funcentry_T global_functions[] =
|
||||
ret_string, f_getregtype},
|
||||
{"getscriptinfo", 0, 1, 0, arg1_dict_any,
|
||||
ret_list_dict_any, f_getscriptinfo},
|
||||
{"getstacktrace", 0, 0, 0, NULL,
|
||||
ret_list_dict_any, f_getstacktrace},
|
||||
{"gettabinfo", 0, 1, FEARG_1, arg1_number,
|
||||
ret_list_dict_any, f_gettabinfo},
|
||||
{"gettabvar", 2, 3, FEARG_1, arg3_number_string_any,
|
||||
@@ -3479,6 +3487,182 @@ f_balloon_split(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Base64 character set
|
||||
static const char_u base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
// Base64 decoding table (initialized in init_base64_dec_table() below)
|
||||
static char_u base64_dec_table[256];
|
||||
|
||||
/*
|
||||
* Initialize the base64 decoding table
|
||||
*/
|
||||
static void
|
||||
init_base64_dec_table(void)
|
||||
{
|
||||
static int base64_dec_tbl_initialized = FALSE;
|
||||
|
||||
if (base64_dec_tbl_initialized)
|
||||
return;
|
||||
|
||||
// Unsupported characters are set to 0xFF
|
||||
vim_memset(base64_dec_table, 0xFF, sizeof(base64_dec_table));
|
||||
|
||||
// Initialize the index for the base64 alphabets
|
||||
for (size_t i = 0; i < sizeof(base64_table) - 1; i++)
|
||||
base64_dec_table[(char_u)base64_table[i]] = (char_u)i;
|
||||
|
||||
// base64 padding character
|
||||
base64_dec_table['='] = 0;
|
||||
|
||||
base64_dec_tbl_initialized = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Encode the bytes in "blob" using base-64 encoding.
|
||||
*/
|
||||
static char_u *
|
||||
base64_encode(blob_T *blob)
|
||||
{
|
||||
size_t input_len = blob->bv_ga.ga_len;
|
||||
size_t encoded_len = ((input_len + 2) / 3) * 4;
|
||||
char_u *data = blob->bv_ga.ga_data;
|
||||
|
||||
char_u *encoded = alloc(encoded_len + 1);
|
||||
if (encoded == NULL)
|
||||
return NULL;
|
||||
|
||||
size_t i, j;
|
||||
for (i = 0, j = 0; i < input_len;)
|
||||
{
|
||||
int_u octet_a = i < input_len ? data[i++] : 0;
|
||||
int_u octet_b = i < input_len ? data[i++] : 0;
|
||||
int_u octet_c = i < input_len ? data[i++] : 0;
|
||||
|
||||
int_u triple = (octet_a << 16) | (octet_b << 8) | octet_c;
|
||||
|
||||
encoded[j++] = base64_table[(triple >> 18) & 0x3F];
|
||||
encoded[j++] = base64_table[(triple >> 12) & 0x3F];
|
||||
encoded[j++] = (!octet_b && i >= input_len) ? '='
|
||||
: base64_table[(triple >> 6) & 0x3F];
|
||||
encoded[j++] = (!octet_c && i >= input_len) ? '='
|
||||
: base64_table[triple & 0x3F];
|
||||
}
|
||||
encoded[j] = NUL;
|
||||
|
||||
return encoded;
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode the string "data" using base-64 encoding.
|
||||
*/
|
||||
static void
|
||||
base64_decode(const char_u *data, blob_T *blob)
|
||||
{
|
||||
size_t input_len = STRLEN(data);
|
||||
|
||||
if (input_len == 0)
|
||||
return;
|
||||
|
||||
if (input_len % 4 != 0)
|
||||
{
|
||||
// Invalid input length
|
||||
semsg(_(e_invalid_argument_str), data);
|
||||
return;
|
||||
}
|
||||
|
||||
init_base64_dec_table();
|
||||
|
||||
size_t decoded_len = (input_len / 4) * 3;
|
||||
if (data[input_len - 1] == '=')
|
||||
decoded_len--;
|
||||
if (data[input_len - 2] == '=')
|
||||
decoded_len--;
|
||||
|
||||
size_t i, j;
|
||||
for (i = 0, j = 0; i < input_len;)
|
||||
{
|
||||
int_u sextet_a = base64_dec_table[(char_u)data[i++]];
|
||||
int_u sextet_b = base64_dec_table[(char_u)data[i++]];
|
||||
int_u sextet_c = base64_dec_table[(char_u)data[i++]];
|
||||
int_u sextet_d = base64_dec_table[(char_u)data[i++]];
|
||||
|
||||
if (sextet_a == 0xFF || sextet_b == 0xFF || sextet_c == 0xFF
|
||||
|| sextet_d == 0xFF)
|
||||
{
|
||||
// Invalid character
|
||||
semsg(_(e_invalid_argument_str), data);
|
||||
ga_clear(&blob->bv_ga);
|
||||
return;
|
||||
}
|
||||
|
||||
int_u triple = (sextet_a << 18) | (sextet_b << 12)
|
||||
| (sextet_c << 6) | sextet_d;
|
||||
|
||||
if (j < decoded_len)
|
||||
{
|
||||
ga_append(&blob->bv_ga, (triple >> 16) & 0xFF);
|
||||
j++;
|
||||
}
|
||||
if (j < decoded_len)
|
||||
{
|
||||
ga_append(&blob->bv_ga, (triple >> 8) & 0xFF);
|
||||
j++;
|
||||
}
|
||||
if (j < decoded_len)
|
||||
{
|
||||
ga_append(&blob->bv_ga, triple & 0xFF);
|
||||
j++;
|
||||
}
|
||||
|
||||
if (j == decoded_len)
|
||||
{
|
||||
// Check for invalid padding bytes (based on the
|
||||
// "Base64 Malleability in Practice" ACM paper).
|
||||
if ((data[input_len - 2] == '=' && ((sextet_b & 0xF) != 0))
|
||||
|| ((data[input_len - 1] == '=') && ((sextet_c & 0x3) != 0)))
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), data);
|
||||
ga_clear(&blob->bv_ga);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* "base64_decode(string)" function
|
||||
*/
|
||||
static void
|
||||
f_base64_decode(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
if (check_for_string_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
if (rettv_blob_alloc(rettv) == FAIL)
|
||||
return;
|
||||
|
||||
char_u *str = tv_get_string_chk(&argvars[0]);
|
||||
if (str != NULL)
|
||||
base64_decode(str, rettv->vval.v_blob);
|
||||
}
|
||||
|
||||
/*
|
||||
* "base64_encode(blob)" function
|
||||
*/
|
||||
static void
|
||||
f_base64_encode(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
if (check_for_blob_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
blob_T *blob = argvars->vval.v_blob;
|
||||
if (blob != NULL)
|
||||
rettv->vval.v_string = base64_encode(blob);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the buffer from "arg" and give an error and return NULL if it is not
|
||||
* valid.
|
||||
|
||||
@@ -160,7 +160,8 @@ static struct vimvar
|
||||
{VV_NAME("python3_version", VAR_NUMBER), NULL, VV_RO},
|
||||
{VV_NAME("t_typealias", VAR_NUMBER), NULL, VV_RO},
|
||||
{VV_NAME("t_enum", VAR_NUMBER), NULL, VV_RO},
|
||||
{VV_NAME("t_enumvalue", VAR_NUMBER), NULL, VV_RO}
|
||||
{VV_NAME("t_enumvalue", VAR_NUMBER), NULL, VV_RO},
|
||||
{VV_NAME("stacktrace", VAR_LIST), &t_list_string, VV_RO},
|
||||
};
|
||||
|
||||
// shorthand
|
||||
|
||||
@@ -562,6 +562,10 @@ throw_exception(void *value, except_type_T type, char_u *cmdname)
|
||||
excp->throw_lnum = SOURCING_LNUM;
|
||||
}
|
||||
|
||||
excp->stacktrace = stacktrace_create();
|
||||
if (excp->stacktrace != NULL)
|
||||
excp->stacktrace->lv_refcount = 1;
|
||||
|
||||
if (p_verbose >= 13 || debug_break_level > 0)
|
||||
{
|
||||
int save_msg_silent = msg_silent;
|
||||
@@ -647,6 +651,7 @@ discard_exception(except_T *excp, int was_finished)
|
||||
if (excp->type == ET_ERROR)
|
||||
free_msglist(excp->messages);
|
||||
vim_free(excp->throw_name);
|
||||
list_unref(excp->stacktrace);
|
||||
vim_free(excp);
|
||||
}
|
||||
|
||||
@@ -671,6 +676,7 @@ catch_exception(except_T *excp)
|
||||
excp->caught = caught_stack;
|
||||
caught_stack = excp;
|
||||
set_vim_var_string(VV_EXCEPTION, (char_u *)excp->value, -1);
|
||||
set_vim_var_list(VV_STACKTRACE, excp->stacktrace);
|
||||
if (*excp->throw_name != NUL)
|
||||
{
|
||||
if (excp->throw_lnum != 0)
|
||||
@@ -721,6 +727,7 @@ finish_exception(except_T *excp)
|
||||
if (caught_stack != NULL)
|
||||
{
|
||||
set_vim_var_string(VV_EXCEPTION, (char_u *)caught_stack->value, -1);
|
||||
set_vim_var_list(VV_STACKTRACE, caught_stack->stacktrace);
|
||||
if (*caught_stack->throw_name != NUL)
|
||||
{
|
||||
if (caught_stack->throw_lnum != 0)
|
||||
@@ -741,6 +748,7 @@ finish_exception(except_T *excp)
|
||||
{
|
||||
set_vim_var_string(VV_EXCEPTION, NULL, -1);
|
||||
set_vim_var_string(VV_THROWPOINT, NULL, -1);
|
||||
set_vim_var_list(VV_STACKTRACE, NULL);
|
||||
}
|
||||
|
||||
// Discard the exception, but use the finish message for 'verbose'.
|
||||
|
||||
@@ -106,6 +106,7 @@ struct compl_S
|
||||
int cp_flags; // CP_ values
|
||||
int cp_number; // sequence number
|
||||
int cp_score; // fuzzy match score
|
||||
int cp_in_match_array; // collected by compl_match_array
|
||||
int cp_user_abbr_hlattr; // highlight attribute for abbr
|
||||
int cp_user_kind_hlattr; // highlight attribute for kind
|
||||
};
|
||||
@@ -1282,6 +1283,7 @@ ins_compl_build_pum(void)
|
||||
|
||||
do
|
||||
{
|
||||
compl->cp_in_match_array = FALSE;
|
||||
// When 'completeopt' contains "fuzzy" and leader is not NULL or empty,
|
||||
// set the cp_score for later comparisons.
|
||||
if (compl_fuzzy_match && compl_leader.string != NULL && compl_leader.length > 0)
|
||||
@@ -1293,6 +1295,7 @@ ins_compl_build_pum(void)
|
||||
|| (compl_fuzzy_match && compl->cp_score > 0)))
|
||||
{
|
||||
++compl_match_arraysize;
|
||||
compl->cp_in_match_array = TRUE;
|
||||
if (match_head == NULL)
|
||||
match_head = compl;
|
||||
else
|
||||
@@ -3259,11 +3262,12 @@ get_complete_info(list_T *what_list, dict_T *retdict)
|
||||
#define CI_WHAT_ITEMS 0x04
|
||||
#define CI_WHAT_SELECTED 0x08
|
||||
#define CI_WHAT_INSERTED 0x10
|
||||
#define CI_WHAT_MATCHES 0x20
|
||||
#define CI_WHAT_ALL 0xff
|
||||
int what_flag;
|
||||
|
||||
if (what_list == NULL)
|
||||
what_flag = CI_WHAT_ALL;
|
||||
what_flag = CI_WHAT_ALL & ~CI_WHAT_MATCHES;
|
||||
else
|
||||
{
|
||||
what_flag = 0;
|
||||
@@ -3282,6 +3286,8 @@ get_complete_info(list_T *what_list, dict_T *retdict)
|
||||
what_flag |= CI_WHAT_SELECTED;
|
||||
else if (STRCMP(what, "inserted") == 0)
|
||||
what_flag |= CI_WHAT_INSERTED;
|
||||
else if (STRCMP(what, "matches") == 0)
|
||||
what_flag |= CI_WHAT_MATCHES;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3291,19 +3297,23 @@ get_complete_info(list_T *what_list, dict_T *retdict)
|
||||
if (ret == OK && (what_flag & CI_WHAT_PUM_VISIBLE))
|
||||
ret = dict_add_number(retdict, "pum_visible", pum_visible());
|
||||
|
||||
if (ret == OK && (what_flag & CI_WHAT_ITEMS || what_flag & CI_WHAT_SELECTED))
|
||||
if (ret == OK && (what_flag & CI_WHAT_ITEMS || what_flag & CI_WHAT_SELECTED
|
||||
|| what_flag & CI_WHAT_MATCHES))
|
||||
{
|
||||
list_T *li = NULL;
|
||||
dict_T *di;
|
||||
compl_T *match;
|
||||
int selected_idx = -1;
|
||||
int has_items = what_flag & CI_WHAT_ITEMS;
|
||||
int has_matches = what_flag & CI_WHAT_MATCHES;
|
||||
|
||||
if (what_flag & CI_WHAT_ITEMS)
|
||||
if (has_items || has_matches)
|
||||
{
|
||||
li = list_alloc();
|
||||
if (li == NULL)
|
||||
return;
|
||||
ret = dict_add_list(retdict, "items", li);
|
||||
ret = dict_add_list(retdict, (has_matches && !has_items)
|
||||
? "matches" : "items", li);
|
||||
}
|
||||
if (ret == OK && what_flag & CI_WHAT_SELECTED)
|
||||
if (compl_curr_match != NULL && compl_curr_match->cp_number == -1)
|
||||
@@ -3316,7 +3326,8 @@ get_complete_info(list_T *what_list, dict_T *retdict)
|
||||
{
|
||||
if (!match_at_original_text(match))
|
||||
{
|
||||
if (what_flag & CI_WHAT_ITEMS)
|
||||
if (has_items
|
||||
|| (has_matches && match->cp_in_match_array))
|
||||
{
|
||||
di = dict_alloc();
|
||||
if (di == NULL)
|
||||
@@ -3329,13 +3340,16 @@ get_complete_info(list_T *what_list, dict_T *retdict)
|
||||
dict_add_string(di, "menu", match->cp_text[CPT_MENU]);
|
||||
dict_add_string(di, "kind", match->cp_text[CPT_KIND]);
|
||||
dict_add_string(di, "info", match->cp_text[CPT_INFO]);
|
||||
if (has_matches && has_items)
|
||||
dict_add_bool(di, "match", match->cp_in_match_array);
|
||||
if (match->cp_user_data.v_type == VAR_UNKNOWN)
|
||||
// Add an empty string for backwards compatibility
|
||||
dict_add_string(di, "user_data", (char_u *)"");
|
||||
else
|
||||
dict_add_tv(di, "user_data", &match->cp_user_data);
|
||||
}
|
||||
if (compl_curr_match != NULL && compl_curr_match->cp_number == match->cp_number)
|
||||
if (compl_curr_match != NULL
|
||||
&& compl_curr_match->cp_number == match->cp_number)
|
||||
selected_idx = list_idx;
|
||||
list_idx += 1;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ typedef struct dsc$descriptor DESC;
|
||||
#endif
|
||||
|
||||
#ifndef XDG_VIMRC_FILE
|
||||
# define XDG_VIMRC_FILE (mch_getenv("XDG_CONFIG_HOME") \
|
||||
# define XDG_VIMRC_FILE (mch_getenv((char_u *)"XDG_CONFIG_HOME") \
|
||||
? "$XDG_CONFIG_HOME/vim/vimrc" \
|
||||
: "~/.config/vim/vimrc")
|
||||
#endif
|
||||
|
||||
@@ -22,6 +22,7 @@ int dict_add_string_len(dict_T *d, char *key, char_u *str, int len);
|
||||
int dict_add_list(dict_T *d, char *key, list_T *list);
|
||||
int dict_add_tv(dict_T *d, char *key, typval_T *tv);
|
||||
int dict_add_callback(dict_T *d, char *key, callback_T *cb);
|
||||
int dict_add_func(dict_T *d, char *key, ufunc_T *fp);
|
||||
void dict_iterate_start(typval_T *var, dict_iterator_T *iter);
|
||||
char_u *dict_iterate_next(dict_iterator_T *iter, typval_T **tv_result);
|
||||
int dict_add_dict(dict_T *d, char *key, dict_T *dict);
|
||||
|
||||
@@ -5,6 +5,8 @@ estack_T *estack_push_ufunc(ufunc_T *ufunc, long lnum);
|
||||
int estack_top_is_ufunc(ufunc_T *ufunc, long lnum);
|
||||
estack_T *estack_pop(void);
|
||||
char_u *estack_sfile(estack_arg_T which);
|
||||
list_T *stacktrace_create(void);
|
||||
void f_getstacktrace(typval_T *argvars, typval_T *rettv);
|
||||
void ex_runtime(exarg_T *eap);
|
||||
void set_context_in_runtime_cmd(expand_T *xp, char_u *arg);
|
||||
int find_script_by_name(char_u *name);
|
||||
|
||||
@@ -237,6 +237,89 @@ estack_sfile(estack_arg_T which UNUSED)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
static void
|
||||
stacktrace_push_item(
|
||||
list_T *l,
|
||||
ufunc_T *fp,
|
||||
char_u *event,
|
||||
linenr_T lnum,
|
||||
char_u *filepath)
|
||||
{
|
||||
dict_T *d;
|
||||
typval_T tv;
|
||||
|
||||
d = dict_alloc_lock(VAR_FIXED);
|
||||
if (d == NULL)
|
||||
return;
|
||||
|
||||
tv.v_type = VAR_DICT;
|
||||
tv.v_lock = VAR_LOCKED;
|
||||
tv.vval.v_dict = d;
|
||||
|
||||
if (fp != NULL)
|
||||
dict_add_func(d, "funcref", fp);
|
||||
if (event != NULL)
|
||||
dict_add_string(d, "event", event);
|
||||
dict_add_number(d, "lnum", lnum);
|
||||
dict_add_string(d, "filepath", filepath);
|
||||
|
||||
list_append_tv(l, &tv);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the stacktrace from exestack.
|
||||
*/
|
||||
list_T *
|
||||
stacktrace_create(void)
|
||||
{
|
||||
list_T *l;
|
||||
int i;
|
||||
|
||||
l = list_alloc();
|
||||
if (l == NULL)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < exestack.ga_len; ++i)
|
||||
{
|
||||
estack_T *entry = &((estack_T *)exestack.ga_data)[i];
|
||||
linenr_T lnum = entry->es_lnum;
|
||||
|
||||
if (entry->es_type == ETYPE_SCRIPT)
|
||||
stacktrace_push_item(l, NULL, NULL, lnum, entry->es_name);
|
||||
else if (entry->es_type == ETYPE_UFUNC)
|
||||
{
|
||||
ufunc_T *fp = entry->es_info.ufunc;
|
||||
sctx_T sctx = fp->uf_script_ctx;
|
||||
char_u *filepath = sctx.sc_sid > 0 ?
|
||||
get_scriptname(sctx.sc_sid) : (char_u *)"";
|
||||
|
||||
lnum += sctx.sc_lnum;
|
||||
stacktrace_push_item(l, fp, NULL, lnum, filepath);
|
||||
}
|
||||
else if (entry->es_type == ETYPE_AUCMD)
|
||||
{
|
||||
sctx_T sctx = *acp_script_ctx(entry->es_info.aucmd);
|
||||
char_u *filepath = sctx.sc_sid > 0 ?
|
||||
get_scriptname(sctx.sc_sid) : (char_u *)"";
|
||||
|
||||
lnum += sctx.sc_lnum;
|
||||
stacktrace_push_item(l, NULL, entry->es_name, lnum, filepath);
|
||||
}
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
/*
|
||||
* getstacktrace() function
|
||||
*/
|
||||
void
|
||||
f_getstacktrace(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
{
|
||||
rettv_list_set(rettv, stacktrace_create());
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Get DIP_ flags from the [where] argument of a :runtime command.
|
||||
* "*argp" is advanced to after the [where] argument if it is found.
|
||||
|
||||
@@ -63,6 +63,17 @@ typedef struct growarray
|
||||
|
||||
#define GA_EMPTY {0, 0, 0, 0, NULL}
|
||||
|
||||
// On rare systems "char" is unsigned, sometimes we really want a signed 8-bit
|
||||
// value.
|
||||
typedef signed char int8_T;
|
||||
typedef double float_T;
|
||||
|
||||
typedef struct typval_S typval_T;
|
||||
typedef struct listvar_S list_T;
|
||||
typedef struct dictvar_S dict_T;
|
||||
typedef struct partial_S partial_T;
|
||||
typedef struct blobvar_S blob_T;
|
||||
|
||||
typedef struct window_S win_T;
|
||||
typedef struct wininfo_S wininfo_T;
|
||||
typedef struct frame_S frame_T;
|
||||
@@ -1087,6 +1098,7 @@ struct vim_exception
|
||||
struct msglist *messages; // message(s) causing error exception
|
||||
char_u *throw_name; // name of the throw point
|
||||
linenr_T throw_lnum; // line number of the throw point
|
||||
list_T *stacktrace; // stacktrace
|
||||
except_T *caught; // next exception on the caught stack
|
||||
};
|
||||
|
||||
@@ -1447,18 +1459,6 @@ typedef long_u hash_T; // Type for hi_hash
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// On rare systems "char" is unsigned, sometimes we really want a signed 8-bit
|
||||
// value.
|
||||
typedef signed char int8_T;
|
||||
|
||||
typedef double float_T;
|
||||
|
||||
typedef struct typval_S typval_T;
|
||||
typedef struct listvar_S list_T;
|
||||
typedef struct dictvar_S dict_T;
|
||||
typedef struct partial_S partial_T;
|
||||
typedef struct blobvar_S blob_T;
|
||||
|
||||
// Struct that holds both a normal function name and a partial_T, as used for a
|
||||
// callback argument.
|
||||
// When used temporarily "cb_name" is not allocated. The refcounts to either
|
||||
|
||||
@@ -292,6 +292,7 @@ NEW_TESTS = \
|
||||
test_spell_utf8 \
|
||||
test_spellfile \
|
||||
test_spellrare \
|
||||
test_stacktrace \
|
||||
test_startup \
|
||||
test_startup_utf8 \
|
||||
test_stat \
|
||||
@@ -545,6 +546,7 @@ NEW_TESTS_RES = \
|
||||
test_spell_utf8.res \
|
||||
test_spellfile.res \
|
||||
test_spellrare.res \
|
||||
test_stacktrace.res \
|
||||
test_startup.res \
|
||||
test_stat.res \
|
||||
test_statusline.res \
|
||||
|
||||
@@ -88,8 +88,8 @@ let test_values = {
|
||||
\ 'numberwidth': [[1, 4, 8, 10, 11, 20], [-1, 0, 21]],
|
||||
\ 'regexpengine': [[0, 1, 2], [-1, 3, 999]],
|
||||
\ 'report': [[0, 1, 2, 9999], [-1]],
|
||||
\ 'scroll': [[0, 1, 2, 20], [-1, 999]],
|
||||
\ 'scrolljump': [[-100, -1, 0, 1, 2, 20], [-101, 999]],
|
||||
\ 'scroll': [[0, 1, 2, 15], [-1, 999]],
|
||||
\ 'scrolljump': [[-100, -1, 0, 1, 2, 15], [-101, 999]],
|
||||
\ 'scrolloff': [[0, 1, 8, 999], [-1]],
|
||||
\ 'shiftwidth': [[0, 1, 8, 999], [-1]],
|
||||
\ 'sidescroll': [[0, 1, 8, 999], [-1]],
|
||||
|
||||
@@ -196,7 +196,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
crm: ['file.crm'],
|
||||
crontab: ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],
|
||||
crystal: ['file.cr'],
|
||||
cs: ['file.cs', 'file.csx'],
|
||||
cs: ['file.cs', 'file.csx', 'file.cake'],
|
||||
csc: ['file.csc'],
|
||||
csdl: ['file.csdl'],
|
||||
csp: ['file.csp', 'file.fdr'],
|
||||
@@ -891,7 +891,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
xml: ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.fsproj', 'file.fsproj.user', 'file.vbproj', 'file.vbproj.user', 'file.ui',
|
||||
'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old',
|
||||
'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1', 'file.mpd', 'fonts.conf', 'file.xcu', 'file.xlb', 'file.xlc', 'file.xba', 'file.xpr',
|
||||
'file.xpfm', 'file.spfm', 'file.bxml', 'file.mmi', 'file.slnx'],
|
||||
'file.xpfm', 'file.spfm', 'file.bxml', 'file.mmi', 'file.slnx', 'Directory.Packages.props', 'Directory.Build.targets', 'Directory.Build.props'],
|
||||
xmodmap: ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
|
||||
xpm: ['file.xpm'],
|
||||
xpm2: ['file.xpm2'],
|
||||
@@ -2309,6 +2309,27 @@ func Test_cls_file()
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_cmd_file()
|
||||
filetype on
|
||||
|
||||
call writefile(['--rom_model'], 'Xfile.cmd')
|
||||
split Xfile.cmd
|
||||
call assert_equal('lnk', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['/* comment */'], 'Xfile.cmd')
|
||||
split Xfile.cmd
|
||||
call assert_equal('rexx', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['REM comment'], 'Xfile.cmd')
|
||||
split Xfile.cmd
|
||||
call assert_equal('dosbatch', &filetype)
|
||||
bwipe!
|
||||
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_sig_file()
|
||||
filetype on
|
||||
|
||||
@@ -2782,7 +2803,7 @@ func Test_map_file()
|
||||
call assert_equal('lnkmap', &filetype)
|
||||
bwipe!
|
||||
|
||||
" TI linker map file
|
||||
" UMN mapserver config file
|
||||
call writefile(['MAP', 'NAME "local-demo"', 'END'], 'Xfile.map', 'D')
|
||||
split Xfile.map
|
||||
call assert_equal('map', &filetype)
|
||||
|
||||
@@ -4206,4 +4206,55 @@ func Test_getcellpixels_gui()
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func Str2Blob(s)
|
||||
return list2blob(str2list(a:s))
|
||||
endfunc
|
||||
|
||||
func Blob2Str(b)
|
||||
return list2str(blob2list(a:b))
|
||||
endfunc
|
||||
|
||||
" Test for the base64_encode() and base64_decode() functions
|
||||
func Test_base64_encoding()
|
||||
let lines =<< trim END
|
||||
#" Test for encoding/decoding the RFC-4648 alphabets
|
||||
VAR s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
||||
for i in range(64)
|
||||
call assert_equal($'{s[i]}A==', base64_encode(list2blob([i << 2])))
|
||||
call assert_equal(list2blob([i << 2]), base64_decode($'{s[i]}A=='))
|
||||
endfor
|
||||
|
||||
#" Test for encoding with padding
|
||||
call assert_equal('TQ==', base64_encode(g:Str2Blob("M")))
|
||||
call assert_equal('TWE=', base64_encode(g:Str2Blob("Ma")))
|
||||
call assert_equal('TWFu', g:Str2Blob("Man")->base64_encode())
|
||||
call assert_equal('', base64_encode(0z))
|
||||
call assert_equal('', base64_encode(g:Str2Blob("")))
|
||||
|
||||
#" Test for decoding with padding
|
||||
call assert_equal('light work.', g:Blob2Str(base64_decode("bGlnaHQgd29yay4=")))
|
||||
call assert_equal('light work', g:Blob2Str(base64_decode("bGlnaHQgd29yaw==")))
|
||||
call assert_equal('light wor', g:Blob2Str("bGlnaHQgd29y"->base64_decode()))
|
||||
call assert_equal(0z00, base64_decode("===="))
|
||||
call assert_equal(0z, base64_decode(""))
|
||||
|
||||
#" Test for invalid padding
|
||||
call assert_equal('Hello', g:Blob2Str(base64_decode("SGVsbG8=")))
|
||||
call assert_fails('call base64_decode("SGVsbG9=")', 'E475:')
|
||||
call assert_fails('call base64_decode("SGVsbG9")', 'E475:')
|
||||
call assert_equal('Hell', g:Blob2Str(base64_decode("SGVsbA==")))
|
||||
call assert_fails('call base64_decode("SGVsbA=")', 'E475:')
|
||||
call assert_fails('call base64_decode("SGVsbA")', 'E475:')
|
||||
call assert_fails('call base64_decode("SGVsbA====")', 'E475:')
|
||||
|
||||
#" Error case
|
||||
call assert_fails('call base64_decode("b")', 'E475: Invalid argument: b')
|
||||
call assert_fails('call base64_decode("<<==")', 'E475: Invalid argument: <<==')
|
||||
|
||||
call assert_fails('call base64_encode([])', 'E1238: Blob required for argument 1')
|
||||
call assert_fails('call base64_decode([])', 'E1174: String required for argument 1')
|
||||
END
|
||||
call v9.CheckLegacyAndVim9Success(lines)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -2931,4 +2931,48 @@ func Test_complete_backwards_default()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_complete_info_matches()
|
||||
let g:what = ['matches']
|
||||
func ShownInfo()
|
||||
let g:compl_info = complete_info(g:what)
|
||||
return ''
|
||||
endfunc
|
||||
set completeopt+=noinsert
|
||||
|
||||
new
|
||||
call setline(1, ['aaa', 'aab', 'aba', 'abb'])
|
||||
inoremap <buffer><F5> <C-R>=ShownInfo()<CR>
|
||||
|
||||
call feedkeys("Go\<C-X>\<C-N>\<F5>\<Esc>dd", 'tx')
|
||||
call assert_equal([
|
||||
\ {'word': 'aaa', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
|
||||
\ {'word': 'aab', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
|
||||
\ {'word': 'aba', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
|
||||
\ {'word': 'abb', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
|
||||
\], g:compl_info['matches'])
|
||||
|
||||
call feedkeys("Goa\<C-X>\<C-N>b\<F5>\<Esc>dd", 'tx')
|
||||
call assert_equal([
|
||||
\ {'word': 'aba', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
|
||||
\ {'word': 'abb', 'menu': '', 'user_data': '', 'info': '', 'kind': '', 'abbr': ''},
|
||||
\], g:compl_info['matches'])
|
||||
|
||||
" items and matches both in what
|
||||
let g:what = ['items', 'matches']
|
||||
call feedkeys("Goa\<C-X>\<C-N>b\<F5>\<Esc>dd", 'tx')
|
||||
call assert_equal([
|
||||
\ {'word': 'aaa', 'menu': '', 'user_data': '', 'match': v:false, 'info': '', 'kind': '', 'abbr': ''},
|
||||
\ {'word': 'aab', 'menu': '', 'user_data': '', 'match': v:false, 'info': '', 'kind': '', 'abbr': ''},
|
||||
\ {'word': 'aba', 'menu': '', 'user_data': '', 'match': v:true, 'info': '', 'kind': '', 'abbr': ''},
|
||||
\ {'word': 'abb', 'menu': '', 'user_data': '', 'match': v:true, 'info': '', 'kind': '', 'abbr': ''},
|
||||
\], g:compl_info['items'])
|
||||
call assert_false(has_key(g:compl_info, 'matches'))
|
||||
|
||||
bw!
|
||||
bw!
|
||||
unlet g:what
|
||||
delfunc ShownInfo
|
||||
set cot&
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
|
||||
|
||||
107
src/testdir/test_stacktrace.vim
Normal file
107
src/testdir/test_stacktrace.vim
Normal file
@@ -0,0 +1,107 @@
|
||||
" Test for getstacktrace() and v:stacktrace
|
||||
|
||||
let s:thisfile = expand('%:p')
|
||||
let s:testdir = s:thisfile->fnamemodify(':h')
|
||||
|
||||
func Filepath(name)
|
||||
return s:testdir .. '/' .. a:name
|
||||
endfunc
|
||||
|
||||
func AssertStacktrace(expect, actual)
|
||||
call assert_equal(#{lnum: 617, filepath: Filepath('runtest.vim')}, a:actual[0])
|
||||
call assert_equal(a:expect, a:actual[-len(a:expect):])
|
||||
endfunc
|
||||
|
||||
func Test_getstacktrace()
|
||||
let g:stacktrace = []
|
||||
let lines1 =<< trim [SCRIPT]
|
||||
" Xscript1
|
||||
source Xscript2
|
||||
func Xfunc1()
|
||||
" Xfunc1
|
||||
call Xfunc2()
|
||||
endfunc
|
||||
[SCRIPT]
|
||||
let lines2 =<< trim [SCRIPT]
|
||||
" Xscript2
|
||||
func Xfunc2()
|
||||
" Xfunc2
|
||||
let g:stacktrace = getstacktrace()
|
||||
endfunc
|
||||
[SCRIPT]
|
||||
call writefile(lines1, 'Xscript1', 'D')
|
||||
call writefile(lines2, 'Xscript2', 'D')
|
||||
source Xscript1
|
||||
call Xfunc1()
|
||||
call AssertStacktrace([
|
||||
\ #{funcref: funcref('Test_getstacktrace'), lnum: 35, filepath: s:thisfile},
|
||||
\ #{funcref: funcref('Xfunc1'), lnum: 5, filepath: Filepath('Xscript1')},
|
||||
\ #{funcref: funcref('Xfunc2'), lnum: 4, filepath: Filepath('Xscript2')},
|
||||
\ ], g:stacktrace)
|
||||
unlet g:stacktrace
|
||||
endfunc
|
||||
|
||||
func Test_getstacktrace_event()
|
||||
let g:stacktrace = []
|
||||
let lines1 =<< trim [SCRIPT]
|
||||
" Xscript1
|
||||
func Xfunc()
|
||||
" Xfunc
|
||||
let g:stacktrace = getstacktrace()
|
||||
endfunc
|
||||
augroup test_stacktrace
|
||||
autocmd SourcePre * call Xfunc()
|
||||
augroup END
|
||||
[SCRIPT]
|
||||
let lines2 =<< trim [SCRIPT]
|
||||
" Xscript2
|
||||
[SCRIPT]
|
||||
call writefile(lines1, 'Xscript1', 'D')
|
||||
call writefile(lines2, 'Xscript2', 'D')
|
||||
source Xscript1
|
||||
source Xscript2
|
||||
call AssertStacktrace([
|
||||
\ #{funcref: funcref('Test_getstacktrace_event'), lnum: 62, filepath: s:thisfile},
|
||||
\ #{event: 'SourcePre Autocommands for "*"', lnum: 7, filepath: Filepath('Xscript1')},
|
||||
\ #{funcref: funcref('Xfunc'), lnum: 4, filepath: Filepath('Xscript1')},
|
||||
\ ], g:stacktrace)
|
||||
augroup test_stacktrace
|
||||
autocmd!
|
||||
augroup END
|
||||
unlet g:stacktrace
|
||||
endfunc
|
||||
|
||||
func Test_vstacktrace()
|
||||
let lines1 =<< trim [SCRIPT]
|
||||
" Xscript1
|
||||
source Xscript2
|
||||
func Xfunc1()
|
||||
" Xfunc1
|
||||
call Xfunc2()
|
||||
endfunc
|
||||
[SCRIPT]
|
||||
let lines2 =<< trim [SCRIPT]
|
||||
" Xscript2
|
||||
func Xfunc2()
|
||||
" Xfunc2
|
||||
throw 'Exception from Xfunc2'
|
||||
endfunc
|
||||
[SCRIPT]
|
||||
call writefile(lines1, 'Xscript1', 'D')
|
||||
call writefile(lines2, 'Xscript2', 'D')
|
||||
source Xscript1
|
||||
call assert_equal([], v:stacktrace)
|
||||
try
|
||||
call Xfunc1()
|
||||
catch
|
||||
let stacktrace = v:stacktrace
|
||||
endtry
|
||||
call assert_equal([], v:stacktrace)
|
||||
call AssertStacktrace([
|
||||
\ #{funcref: funcref('Test_vstacktrace'), lnum: 95, filepath: s:thisfile},
|
||||
\ #{funcref: funcref('Xfunc1'), lnum: 5, filepath: Filepath('Xscript1')},
|
||||
\ #{funcref: funcref('Xfunc2'), lnum: 4, filepath: Filepath('Xscript2')},
|
||||
\ ], stacktrace)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
@@ -704,6 +704,22 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
984,
|
||||
/**/
|
||||
983,
|
||||
/**/
|
||||
982,
|
||||
/**/
|
||||
981,
|
||||
/**/
|
||||
980,
|
||||
/**/
|
||||
979,
|
||||
/**/
|
||||
978,
|
||||
/**/
|
||||
977,
|
||||
/**/
|
||||
976,
|
||||
/**/
|
||||
|
||||
@@ -2190,7 +2190,8 @@ typedef int sock_T;
|
||||
#define VV_TYPE_TYPEALIAS 107
|
||||
#define VV_TYPE_ENUM 108
|
||||
#define VV_TYPE_ENUMVALUE 109
|
||||
#define VV_LEN 110 // number of v: vars
|
||||
#define VV_STACKTRACE 110
|
||||
#define VV_LEN 111 // number of v: vars
|
||||
|
||||
// used for v_number in VAR_BOOL and VAR_SPECIAL
|
||||
#define VVAL_FALSE 0L // VAR_BOOL
|
||||
|
||||
Reference in New Issue
Block a user