mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
a24f5be86d | |||
baa781a4c3 | |||
836e54f5de | |||
e85a66a4d4 | |||
d0bf380efa | |||
6865bdc914 | |||
ada6b27ff1 | |||
1341176e7b |
1
.github/MAINTAINERS
vendored
1
.github/MAINTAINERS
vendored
@ -510,6 +510,7 @@ runtime/syntax/hare.vim @selenebun
|
||||
runtime/syntax/haredoc.vim @selenebun
|
||||
runtime/syntax/haskell.vim @coot
|
||||
runtime/syntax/hcl.vim @gpanders
|
||||
runtime/syntax/help.vim @dkearns
|
||||
runtime/syntax/help_ru.vim @RestorerZ
|
||||
runtime/syntax/hgcommit.vim @k-takata
|
||||
runtime/syntax/hitest.vim @lacygoill
|
||||
|
@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 11
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -4333,6 +4333,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
messages |:messages| suboptions
|
||||
option options
|
||||
packadd optional package |pack-add| names
|
||||
retab |:retab| suboptions
|
||||
runtime |:runtime| completion
|
||||
scriptnames sourced script names |:scriptnames|
|
||||
shellcmd Shell command
|
||||
|
@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 9.1. Last change: 2025 Jun 26
|
||||
*change.txt* For Vim version 9.1. Last change: 2025 Jul 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -991,22 +991,26 @@ This replaces each 'E' character with a euro sign. Read more in |<Char->|.
|
||||
|
||||
4.4 Changing tabs *change-tabs*
|
||||
*:ret* *:retab* *:retab!*
|
||||
:[range]ret[ab][!] [new_tabstop]
|
||||
:[range]ret[ab][!] [-indentonly] [{new-tabstop}]
|
||||
Replace all sequences of white-space containing a
|
||||
<Tab> with new strings of white-space using the new
|
||||
tabstop value given. If you do not specify a new
|
||||
tabstop size or it is zero, Vim uses the current value
|
||||
of 'tabstop'.
|
||||
<Tab> with new strings of white-space using
|
||||
{new-tabstop}. If you do not specify {new-tabstop} or
|
||||
it is zero, Vim uses the current value of 'tabstop'.
|
||||
The current value of 'tabstop' is always used to
|
||||
compute the width of existing tabs.
|
||||
With !, Vim also replaces strings of only normal
|
||||
spaces with tabs where appropriate.
|
||||
With 'expandtab' on, Vim replaces all tabs with the
|
||||
appropriate number of spaces.
|
||||
This command sets 'tabstop' to the new value given,
|
||||
and if performed on the whole file, which is default,
|
||||
should not make any visible change.
|
||||
Careful: This command modifies any <Tab> characters
|
||||
This command sets 'tabstop' to {new-tabstop} and if
|
||||
performed on the whole file, which is default, should
|
||||
not make any visible change.
|
||||
|
||||
When [-indentonly] is specified, only the leading
|
||||
white-space will be targeted. Any other consecutive
|
||||
white-space will not be changed.
|
||||
|
||||
Warning: This command modifies any <Tab> characters
|
||||
inside of strings in a C program. Use "\t" to avoid
|
||||
this (that's a good habit anyway).
|
||||
`:retab!` may also change a sequence of spaces by
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Jun 28
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Jul 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -5210,7 +5210,7 @@ The |:Launch| user command uses shell completion for its first argument.
|
||||
|
||||
NOTE: escaping of <args> is left to the user
|
||||
|
||||
Examples: >vim
|
||||
Examples: >
|
||||
vim9script
|
||||
|
||||
import autoload 'dist/vim9.vim'
|
||||
|
@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 9.1. Last change: 2025 Jul 09
|
||||
*fold.txt* For Vim version 9.1. Last change: 2025 Jul 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -164,7 +164,7 @@ level is found.
|
||||
If this proves difficult, the next best thing could be to cache all fold
|
||||
levels in a buffer-local variable (b:foldlevels) that is only updated on
|
||||
|b:changedtick|:
|
||||
>vim
|
||||
>
|
||||
vim9script
|
||||
def MyFoldFunc(): number
|
||||
if b:lasttick == b:changedtick
|
||||
|
@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.1. Last change: 2024 Oct 08
|
||||
*map.txt* For Vim version 9.1. Last change: 2025 Jul 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1654,6 +1654,7 @@ completion can be enabled:
|
||||
-complete=messages |:messages| suboptions
|
||||
-complete=option options
|
||||
-complete=packadd optional package |pack-add| names
|
||||
-complete=retab |:retab| suboptions
|
||||
-complete=runtime file and directory names in |'runtimepath'|
|
||||
-complete=scriptnames sourced script names
|
||||
-complete=shellcmd Shell command
|
||||
|
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Jun 03
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1573,15 +1573,47 @@ ERLANG *erlang.vim* *ft-erlang-syntax*
|
||||
Erlang is a functional programming language developed by Ericsson. Files with
|
||||
the following extensions are recognized as Erlang files: erl, hrl, yaws.
|
||||
|
||||
The BIFs (built-in functions) are highlighted by default. To disable this,
|
||||
put the following line in your vimrc: >
|
||||
Vim highlights triple-quoted docstrings as comments by default.
|
||||
|
||||
:let g:erlang_highlight_bifs = 0
|
||||
If you want triple-quoted docstrings highlighted as Markdown, add the
|
||||
following line to your |.vimrc|: >
|
||||
|
||||
To enable highlighting some special atoms, put this in your vimrc: >
|
||||
:let g:erlang_use_markdown_for_docs = 1
|
||||
|
||||
:let g:erlang_highlight_special_atoms = 1
|
||||
The plain text inside the docstrings (that is, the characters that are not
|
||||
highlighted by the Markdown syntax) is still highlighted as a comment.
|
||||
|
||||
If you want to highlight the plain text inside the docstrings using a
|
||||
different highlight group, add the following line to your |.vimrc| (the
|
||||
example highlights plain text using the String highlight group): >
|
||||
|
||||
:let g:erlang_docstring_default_highlight = 'String'
|
||||
|
||||
If you don't enable Markdown, this line highlights the full docstrings
|
||||
according to the specified highlight group.
|
||||
|
||||
Use the following line to disable highlighting for the plain text: >
|
||||
|
||||
:let g:erlang_docstring_default_highlight = ''
|
||||
|
||||
Configuration examples: >
|
||||
|
||||
" Highlight docstrings as Markdown.
|
||||
:let g:erlang_use_markdown_for_docs = 1
|
||||
|
||||
" 1. Highlight Markdown elements in docstrings as Markdown.
|
||||
" 2. Highlight the plain text in docstrings as String.
|
||||
:let g:erlang_use_markdown_for_docs = 1
|
||||
:let g:erlang_docstring_default_highlight = 'String'
|
||||
|
||||
" Highlight docstrings as strings (no Markdown).
|
||||
:let g:erlang_docstring_default_highlight = 'String'
|
||||
|
||||
" 1. Highlight Markdown elements in docstrings as Markdown.
|
||||
" 2. Don't highlight the plain text in docstrings.
|
||||
:let g:erlang_use_markdown_for_docs = 1
|
||||
:let g:erlang_docstring_default_highlight = ''
|
||||
<
|
||||
|
||||
ELIXIR *elixir.vim* *ft-elixir-syntax*
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_25.txt* For Vim version 9.1. Last change: 2025 Jun 10
|
||||
*usr_25.txt* For Vim version 9.1. Last change: 2025 Jun 13
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -200,7 +200,7 @@ command: >vim
|
||||
|
||||
Or put this line in your |vimrc|: >vim
|
||||
|
||||
packadd! justify
|
||||
:packadd! justify
|
||||
|
||||
This Vim script file defines a new visual command "_j". To justify a block of
|
||||
text, highlight the text in Visual mode and then execute "_j".
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 10
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -41692,6 +41692,8 @@ Ex commands: ~
|
||||
documented and skips help buffers (if not run from a help buffer, else
|
||||
moves to the next/previous help buffer).
|
||||
- |:keeppatterns| preserves the last substitute pattern when used with |:s|
|
||||
- |:retab| accepts the new optional parameter -indentonly to only change
|
||||
whitespace in indented lines.
|
||||
|
||||
Functions: ~
|
||||
- provide information about function arguments using the get(func, "arity")
|
||||
|
@ -2,7 +2,8 @@
|
||||
" Language: Erlang (http://www.erlang.org)
|
||||
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
|
||||
" Contributor: Adam Rutkowski <hq@mtod.org>
|
||||
" Last Update: 2022-Sep-06
|
||||
" Johannes Christ <jc@jchri.st>
|
||||
" Last Update: 2025-Jul-06
|
||||
" License: Vim license
|
||||
" URL: https://github.com/vim-erlang/vim-erlang-runtime
|
||||
|
||||
@ -23,20 +24,121 @@
|
||||
" To use the old highlighting style, add this to your .vimrc:
|
||||
"
|
||||
" let g:erlang_old_style_highlight = 1
|
||||
"
|
||||
" To highlight further module attributes, add them to
|
||||
" ~/.vim/after/syntax/erlang.vim:
|
||||
"
|
||||
" syn keyword erlangAttribute myattr1 myattr2 contained
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('g:main_syntax')
|
||||
" This is an Erlang source file, and this is the main execution of
|
||||
" syntax/erlang.vim.
|
||||
let g:main_syntax = 'erlang'
|
||||
elseif g:main_syntax == 'erlang'
|
||||
" This is an Erlang source file, and this is an inner execution of
|
||||
" syntax/erlang.vim. For example:
|
||||
"
|
||||
" 1. The main execution of syntax/erlang.vim included syntax/markdown.vim
|
||||
" because "g:erlang_use_markdown_for_docs == 1".
|
||||
"
|
||||
" 2. syntax/markdown.vim included syntax/erlang.vim because
|
||||
" "g:markdown_fenced_languages == ['erlang']". This is the inner
|
||||
" execution of syntax/erlang.vim.
|
||||
"
|
||||
" To avoid infinite recursion with Markdown and Erlang including each other,
|
||||
" and to avoid the inner syntax/erlang.vim execution messing up the
|
||||
" variables of the outer erlang.vim execution, we finish executing the inner
|
||||
" erlang.vim.
|
||||
"
|
||||
" In the inner execution, we already have the Erlang syntax items included,
|
||||
" so the highlighting of Erlang within Markdown within Erlang will be
|
||||
" acceptable. It won't highlight Markdown inside Erlang inside Markdown
|
||||
" inside Erlang.
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" "g:erlang_old_style_highlight": Whether to use old style highlighting.
|
||||
"
|
||||
" * "g:erlang_old_style_highlight == 0" (default): Use new style
|
||||
" highlighting.
|
||||
"
|
||||
" * "g:erlang_old_style_highlight == 1": Use old style highlighting.
|
||||
let s:old_style = (exists("g:erlang_old_style_highlight") &&
|
||||
\g:erlang_old_style_highlight == 1)
|
||||
|
||||
" "g:erlang_use_markdown_for_docs": Whether to use Markdown highlighting in
|
||||
" docstrings.
|
||||
"
|
||||
" * "g:erlang_use_markdown_for_docs == 1": Enable Markdown highlighting in
|
||||
" docstrings.
|
||||
"
|
||||
" * "g:erlang_use_markdown_for_docs == 0" (default): Disable Markdown
|
||||
" highlighting in docstrings.
|
||||
"
|
||||
" If "g:main_syntax" is not 'erlang', this is not an Erlang source file but
|
||||
" for example a Markdown file, and syntax/markdown.vim is including
|
||||
" syntax/erlang.vim. To avoid infinite recursion with Markdown and Erlang
|
||||
" including each other, we disable sourcing syntax/markdown.vim in this case.
|
||||
if exists("g:erlang_use_markdown_for_docs") && g:main_syntax == 'erlang'
|
||||
let s:use_markdown = g:erlang_use_markdown_for_docs
|
||||
else
|
||||
let s:use_markdown = 0
|
||||
endif
|
||||
|
||||
" "g:erlang_docstring_default_highlight": How to highlight the text inside
|
||||
" docstrings (except the text which is highlighted by Markdown).
|
||||
"
|
||||
" If "g:erlang_use_markdown_for_docs == 1":
|
||||
"
|
||||
" * "g:erlang_docstring_default_highlight == 'Comment'" (default): the plugin
|
||||
" highlights the plain text inside Markdown as Markdown normally does,
|
||||
" with comment highlighting to regular text in the docstring.
|
||||
"
|
||||
" * If you set g:erlang_docstring_default_highlight to the name of highlight
|
||||
" group, for example "String", the plugin highlights the plain text inside
|
||||
" Markdown with the specified highlight group. See ":highlight" for the
|
||||
" available groups. You may also set it to an empty string to disable any
|
||||
" specific highlighting.
|
||||
"
|
||||
" If "g:erlang_use_markdown_for_docs == 0":
|
||||
"
|
||||
" * "g:erlang_docstring_default_highlight == 'Comment'" (default): the plugin
|
||||
" does not highlight the contents of the docstring as markdown, but
|
||||
" continues to display them in the style of comments.
|
||||
"
|
||||
" * If you set g:erlang_docstring_default_highlight to the name of highlight
|
||||
" group, for example "String", the plugin highlights the plain text inside
|
||||
" Markdown with the specified highlight group. See ":highlight" for the
|
||||
" available groups. You may also set it to an empty string to disable any
|
||||
" specific highlighting.
|
||||
"
|
||||
" Configuration examples:
|
||||
"
|
||||
" " Highlight docstrings as Markdown.
|
||||
" let g:erlang_use_markdown_for_docs = 1
|
||||
" let g:erlang_docstring_default_highlight = 'Comment'
|
||||
"
|
||||
" " 1. Highlight Markdown elements in docstrings as Markdown.
|
||||
" " 2. Highlight the plain text in docstrings as String.
|
||||
" let g:erlang_use_markdown_for_docs = 1
|
||||
" let g:erlang_docstring_default_highlight = 'String'
|
||||
"
|
||||
" " Highlight docstrings as strings.
|
||||
" let g:erlang_use_markdown_for_docs = 0
|
||||
" let g:erlang_docstring_default_highlight = 'String'
|
||||
"
|
||||
" " Highlight docstrings as comments (default).
|
||||
" let g:erlang_use_markdown_for_docs = 0
|
||||
" let g:erlang_docstring_default_highlight = 'Comment'
|
||||
if exists("g:erlang_docstring_default_highlight")
|
||||
let s:docstring_default_highlight = g:erlang_docstring_default_highlight
|
||||
else
|
||||
let s:docstring_default_highlight = 'Comment'
|
||||
endif
|
||||
|
||||
" Case sensitive
|
||||
syn case match
|
||||
|
||||
@ -55,6 +157,21 @@ syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
|
||||
|
||||
" Strings, atoms, characters
|
||||
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
|
||||
syn region erlangStringTripleQuoted matchgroup=String start=/"""/ end=/\%(^\s*\)\@<="""/ keepend
|
||||
|
||||
" Documentation
|
||||
syn region erlangDocString start=/^-\%(module\)\=doc\s*\~\="/ end=/"\.$/ contains=@erlangDocStringCluster keepend
|
||||
syn region erlangDocString start=/^-\%(module\)\=doc\s*<<"/ end=/">>\.$/ contains=@erlangDocStringCluster keepend
|
||||
syn region erlangDocString start=/^-\%(module\)\=doc\s*\~\="""/ end=/\%(^\s*\)\@<="""\.$/ contains=@erlangDocStringCluster keepend
|
||||
syn region erlangDocString start=/^-\%(module\)\=doc\s*<<"""/ end=/\%(^\s*\)\@<=""">>\.$/ contains=@erlangDocStringCluster keepend
|
||||
syn cluster erlangDocStringCluster contains=erlangInnerDocAttribute,erlangDocStringDelimiter
|
||||
syn region erlangDocStringDelimiter matchgroup=erlangString start=/"/ end=/"/ contains=@erlangDocStringContained contained
|
||||
syn region erlangDocStringDelimiter matchgroup=erlangString start=/"""/ end=/"""/ contains=@erlangDocStringContained contained
|
||||
|
||||
if s:use_markdown
|
||||
syn cluster erlangDocStringContained contains=@markdown
|
||||
endif
|
||||
|
||||
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
|
||||
syn match erlangStringModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\|\~\%([ni~]\|\%(-\=\d\+\|\*\)\=\.\=\%(\*\|\d\+\)\=\%(\..\)\=[tl]*[cfegswpWPBX#bx+]\)' contained
|
||||
syn match erlangQuotedAtomModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
|
||||
@ -94,12 +211,14 @@ syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary
|
||||
|
||||
" Constants and Directives
|
||||
syn match erlangUnknownAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment
|
||||
syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\(_type\)\=\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\|optional_callbacks\|feature\)\>' contains=erlangComment
|
||||
syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|dialyzer\|export\|export_type\|file\|import\|module\|author\|copyright\|vsn\|on_load\|optional_callbacks\|feature\|mode\)\>' contains=erlangComment
|
||||
syn match erlangDocAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(moduledoc\|doc\)\>' contains=erlangComment,erlangDocString
|
||||
syn match erlangInnerDocAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(moduledoc\|doc\)\>' contained
|
||||
syn match erlangInclude '^\s*-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment
|
||||
syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
|
||||
syn match erlangDefine '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment
|
||||
syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment
|
||||
syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
|
||||
syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|nominal\|callback\)\>' contains=erlangComment
|
||||
|
||||
" Keywords
|
||||
syn keyword erlangKeyword after begin case catch cond end fun if let of else
|
||||
@ -147,9 +266,21 @@ let b:erlang_syntax_synced = 1
|
||||
" Define the default highlighting. See ":help group-name" for the groups and
|
||||
" their colors.
|
||||
|
||||
let s:old_style = (exists("g:erlang_old_style_highlight") &&
|
||||
\g:erlang_old_style_highlight == 1)
|
||||
if s:use_markdown
|
||||
" Add markdown syntax elements for docstrings (actually, for all
|
||||
" triple-quoted strings).
|
||||
unlet! b:current_syntax
|
||||
|
||||
syn include @markdown syntax/markdown.vim
|
||||
let b:current_syntax = "erlang"
|
||||
|
||||
" markdown-erlang.vim includes html.vim, which includes css.vim, which adds
|
||||
" the dash character (-) to the list of syntax keywords, which causes
|
||||
" `-VarName` not to be highlighted as a variable in the Erlang code.
|
||||
"
|
||||
" Here we override that.
|
||||
syntax iskeyword @,48-57,192-255,$,_
|
||||
endif
|
||||
|
||||
" Comments
|
||||
hi def link erlangComment Comment
|
||||
@ -163,6 +294,12 @@ hi def link erlangNumberFloat Float
|
||||
|
||||
" Strings, atoms, characters
|
||||
hi def link erlangString String
|
||||
hi def link erlangStringTripleQuoted String
|
||||
|
||||
" Triple quoted strings
|
||||
if s:docstring_default_highlight != ''
|
||||
execute 'hi def link erlangDocStringDelimiter '. s:docstring_default_highlight
|
||||
endif
|
||||
|
||||
if s:old_style
|
||||
hi def link erlangQuotedAtom Type
|
||||
@ -232,6 +369,8 @@ hi def link erlangPreCondit Type
|
||||
hi def link erlangType Type
|
||||
else
|
||||
hi def link erlangAttribute Keyword
|
||||
hi def link erlangDocAttribute Keyword
|
||||
hi def link erlangInnerDocAttribute Keyword
|
||||
hi def link erlangMacroDef Macro
|
||||
hi def link erlangUnknownAttribute Normal
|
||||
hi def link erlangInclude Include
|
||||
@ -257,9 +396,12 @@ hi def link erlangExtra Statement
|
||||
hi def link erlangSignal Statement
|
||||
endif
|
||||
|
||||
|
||||
let b:current_syntax = "erlang"
|
||||
|
||||
if g:main_syntax ==# 'erlang'
|
||||
unlet g:main_syntax
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2024 Dec 25
|
||||
" Language: Vim help file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Jul 12
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
@ -12,6 +12,8 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn iskeyword @,48-57,_,192-255
|
||||
|
||||
if !exists('g:help_example_languages')
|
||||
let g:help_example_languages = #{ vim: 'vim' }
|
||||
endif
|
||||
@ -78,24 +80,32 @@ if has("conceal")
|
||||
else
|
||||
syn match helpIgnore "." contained
|
||||
endif
|
||||
syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes:
|
||||
syn match helpNote "\c(note\(:\|\>\)"ms=s+1
|
||||
syn keyword helpWarning WARNING WARNING: Warning:
|
||||
syn keyword helpDeprecated DEPRECATED DEPRECATED: Deprecated:
|
||||
syn match helpSpecial "\<N\>"
|
||||
syn match helpSpecial "\<N\.$"me=e-1
|
||||
syn match helpSpecial "\<N\.\s"me=e-2
|
||||
syn match helpSpecial "(N\>"ms=s+1
|
||||
|
||||
" match 'iskeyword' word boundaries, '!-~,^*,^|,^",192-255'
|
||||
let s:iskeyword = '!#-)+-{}~\d192-\d255'
|
||||
let s:start_word = $'\%(^\|[^{s:iskeyword}]\)\@1<='
|
||||
let s:end_word = $'\%([^{s:iskeyword}]\|$\)\@='
|
||||
|
||||
exec $'syn match helpNote "{s:start_word}\%(note\|Note\|NOTE\|Notes\):\={s:end_word}"'
|
||||
exec $'syn match helpNote "\c[[(]note\%(:\|{s:end_word}\)"ms=s+1'
|
||||
exec $'syn match helpWarning "{s:start_word}\%(WARNING:\=\|Warning:\){s:end_word}"'
|
||||
exec $'syn match helpDeprecated "{s:start_word}\%(DEPRECATED:\=\|Deprecated:\){s:end_word}"'
|
||||
exec $'syn match helpSpecial "{s:start_word}N{s:end_word}"'
|
||||
exec $'syn match helpSpecial "{s:start_word}N\.$"me=e-1'
|
||||
exec $'syn match helpSpecial "{s:start_word}N\.\s"me=e-2'
|
||||
exec $'syn match helpSpecial "(N{s:end_word}"ms=s+1'
|
||||
syn match helpSpecial "\[N]"
|
||||
" avoid highlighting N N in quickref.txt
|
||||
syn match helpSpecial "N N"he=s+1
|
||||
syn match helpSpecial "Nth"me=e-2
|
||||
syn match helpSpecial "N-1"me=e-2
|
||||
" highlighting N for :resize in windows.txt
|
||||
syn match helpSpecial "] -N\>"ms=s+3
|
||||
syn match helpSpecial "+N\>"ms=s+1
|
||||
syn match helpSpecial "\[+-]N\>"ms=s+4
|
||||
exec $'syn match helpSpecial "] -N{s:end_word}"ms=s+3'
|
||||
exec $'syn match helpSpecial "+N{s:end_word}"ms=s+1'
|
||||
exec $'syn match helpSpecial "\[+-]N{s:end_word}"ms=s+4'
|
||||
|
||||
unlet s:iskeyword s:start_word s:end_word
|
||||
|
||||
" highlighting N of cinoptions-values in indent.txt
|
||||
syn match helpSpecial "^\t-\?\zsNs\?\s"me=s+1
|
||||
" highlighting N of cinoptions-values in indent.txt
|
||||
@ -183,6 +193,7 @@ let s:i = match(expand("%"), '\.\a\ax$')
|
||||
if s:i > 0
|
||||
exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim"
|
||||
endif
|
||||
unlet s:i
|
||||
|
||||
syn sync minlines=40
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2023 Feb 28
|
||||
" Last Change: 2025 Jul 14
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
" Rob B
|
||||
"
|
||||
" This version is a major rewrite by Zvezdan Petkovic.
|
||||
"
|
||||
@ -144,24 +145,48 @@ syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
" Triple-quoted strings can contain doctests.
|
||||
syn region pythonString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=pythonEscape,@Spell
|
||||
\ contains=pythonEscape,pythonUnicodeEscape,@Spell
|
||||
syn region pythonString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
|
||||
\ contains=pythonEscape,pythonUnicodeEscape,pythonSpaceError,pythonDoctest,@Spell
|
||||
syn region pythonRawString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ start=+[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=@Spell
|
||||
syn region pythonRawString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
|
||||
\ start=+[rR]\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonSpaceError,pythonDoctest,@Spell
|
||||
|
||||
" Bytes
|
||||
syn region pythonBytes
|
||||
\ matchgroup=pythonQuotes
|
||||
\ start=+\cB\z(['"]\)+
|
||||
\ end="\z1"
|
||||
\ skip="\\\\\|\\\z1"
|
||||
\ contains=pythonEscape
|
||||
syn region pythonBytes
|
||||
\ matchgroup=pythonTripleQuotes
|
||||
\ start=+\cB\z('''\|"""\)+
|
||||
\ end="\z1"
|
||||
\ keepend
|
||||
\ contains=pythonEscape
|
||||
syn region pythonRawBytes
|
||||
\ matchgroup=pythonQuotes
|
||||
\ start=+\c\%(BR\|RB\)\z(['"]\)+
|
||||
\ end="\z1"
|
||||
\ skip="\\\\\|\\\z1"
|
||||
syn region pythonRawBytes
|
||||
\ matchgroup=pythonTripleQuotes
|
||||
\ start=+\c\%(BR\|RB\)\z('''\|"""\)+
|
||||
\ end="\z1"
|
||||
\ keepend
|
||||
|
||||
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
|
||||
syn match pythonEscape "\\\o\{1,3}" contained
|
||||
syn match pythonEscape "\\x\x\{2}" contained
|
||||
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
syn match pythonUnicodeEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
|
||||
" The specification: https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-4/#G135165
|
||||
syn match pythonEscape "\\N{\a\+\%(\%(\s\a\+[[:alnum:]]*\)\|\%(-[[:alnum:]]\+\)\)*}" contained
|
||||
syn match pythonUnicodeEscape "\\N{\a\+\%(\%(\s\a\+[[:alnum:]]*\)\|\%(-[[:alnum:]]\+\)\)*}" contained
|
||||
syn match pythonEscape "\\$"
|
||||
|
||||
" It is very important to understand all details before changing the
|
||||
@ -313,9 +338,12 @@ hi def link pythonComment Comment
|
||||
hi def link pythonTodo Todo
|
||||
hi def link pythonString String
|
||||
hi def link pythonRawString String
|
||||
hi def link pythonBytes String
|
||||
hi def link pythonRawBytes String
|
||||
hi def link pythonQuotes String
|
||||
hi def link pythonTripleQuotes pythonQuotes
|
||||
hi def link pythonEscape Special
|
||||
hi def link pythonUnicodeEscape pythonEscape
|
||||
if !exists("python_no_number_highlight")
|
||||
hi def link pythonNumber Number
|
||||
endif
|
||||
|
@ -2,8 +2,10 @@
|
||||
" Language: Python 2
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Oct 29
|
||||
" 2025 Jul 14 by Vim project: highlight unicode strings
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
" Rob B
|
||||
"
|
||||
" This version is a major rewrite by Zvezdan Petkovic.
|
||||
"
|
||||
@ -141,24 +143,53 @@ syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
|
||||
" Triple-quoted strings can contain doctests.
|
||||
syn region pythonString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ start=+\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=pythonEscape,@Spell
|
||||
syn region pythonString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
|
||||
\ start=+\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
|
||||
syn region pythonRawString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ start=+[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=@Spell
|
||||
syn region pythonRawString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
|
||||
\ start=+[rR]\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonSpaceError,pythonDoctest,@Spell
|
||||
|
||||
" Unicode strings
|
||||
syn region pythonString
|
||||
\ matchgroup=pythonQuotes
|
||||
\ start=+[uU]\z(['"]\)+
|
||||
\ end="\z1"
|
||||
\ skip="\\\\\|\\\z1"
|
||||
\ contains=pythonEscape,pythonUnicodeEscape,@Spell
|
||||
syn region pythonString
|
||||
\ matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\z('''\|"""\)+
|
||||
\ end="\z1"
|
||||
\ keepend
|
||||
\ contains=pythonEscape,pythonUnicodeEscape,pythonSpaceError,pythonDoctest,@Spell
|
||||
|
||||
" Raw Unicode strings recognize Unicode escape sequences
|
||||
" https://docs.python.org/2.7/reference/lexical_analysis.html#string-literals
|
||||
syn region pythonRawString
|
||||
\ matchgroup=pythonQuotes
|
||||
\ start=+[uU][rR]\z(['"]\)+
|
||||
\ end="\z1"
|
||||
\ skip="\\\\\|\\\z1"
|
||||
\ contains=pythonUnicodeEscape,@Spell
|
||||
syn region pythonRawString
|
||||
\ matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU][rR]\z('''\|"""\)+
|
||||
\ end="\z1"
|
||||
\ keepend
|
||||
\ contains=pythonUnicodeEscape,pythonSpaceError,pythonDoctest,@Spell
|
||||
|
||||
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
|
||||
syn match pythonEscape "\\\o\{1,3}" contained
|
||||
syn match pythonEscape "\\x\x\{2}" contained
|
||||
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
syn match pythonUnicodeEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
|
||||
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
|
||||
syn match pythonUnicodeEscape "\\N{\a\+\%(\s\a\+\)*}" contained
|
||||
syn match pythonEscape "\\$"
|
||||
|
||||
" It is very important to understand all details before changing the
|
||||
@ -320,6 +351,7 @@ hi def link pythonRawString String
|
||||
hi def link pythonQuotes String
|
||||
hi def link pythonTripleQuotes pythonQuotes
|
||||
hi def link pythonEscape Special
|
||||
hi def link pythonUnicodeEscape pythonEscape
|
||||
if !exists("python_no_number_highlight")
|
||||
hi def link pythonNumber Number
|
||||
endif
|
||||
|
20
runtime/syntax/testdir/dumps/help_00.dump
Normal file
20
runtime/syntax/testdir/dumps/help_00.dump
Normal file
@ -0,0 +1,20 @@
|
||||
>V+0#af5f00255#ffffff0|I|M| |H|E|L|P| |F|I|L|E| |F|O|R|M|A|T| +0#0000000&@54
|
||||
@75
|
||||
@75
|
||||
|I+0#e000e06&|s@1|u|e| |#|1|7@1|2|1| |(|S|t|r|a|n|g|e| |>|v|i|m| |h|i|g|h|l|i|g|h|t|i|n|g| |i|n| |h|e|l|p| |d|o|c|u|m|e|n|t|a|t|i|o|n|?|)|~+0#ffffff16&| +0#0000000&@10
|
||||
@75
|
||||
@32|*+0#ffffff16&|r+0#e000002&|e|s|t|o|r|e|-|c|u|r|s|o|r|*+0#ffffff16&| +0#0000000&|*+0#ffffff16&|l+0#e000002&|a|s|t|-|p|o|s|i|t|i|o|n|-|j|u|m|p|*+0#ffffff16&| +0#0000000&| +0#ffffff16&|>|v|i|m
|
||||
| +0#0000000&@3|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|R|e|s|t|o|r|e|C|u|r|s|o|r| @49
|
||||
@6|a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&@60
|
||||
@6|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d|P|o|s|t| +0#0000000&|*+0#e000e06&| +0#0000000&@47
|
||||
@8|\+0#e000e06&| +0#0000000&|l+0#af5f00255&|e|t| +0#0000000&|l|i|n|e| |=+0#af5f00255&| +0#0000000&|l+0#00e0e07&|i|n|e|(+0#e000e06&|"+0#e000002&|'|\+0#e000e06&|"|"+0#e000002&|)+0#e000e06&| +0#0000000&@42
|
||||
@8|\+0#e000e06&| +0#0000000&||| |i+0#af5f00255&|f| +0#0000000&|l|i|n|e| |>+0#af5f00255&|=| +0#0000000&|1+0#e000002&| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|l|i|n|e| |<+0#af5f00255&|=| +0#0000000&|l+0#00e0e07&|i|n|e|(+0#e000e06&|"+0#e000002&|$|"|)+0#e000e06&| +0#0000000&|&+0#af5f00255&@1| +0#0000000&|&+0#00e0e07&|f|i|l|e|t|y|p|e| +0#0000000&|!+0#af5f00255&|~|#| +0#0000000&|'+0#e000002&|c|o|m@1|i|t|'| +0#0000000&@3
|
||||
@8|\+0#e000e06&| +0#0000000&@5|&+0#af5f00255&@1| +0#0000000&|i+0#00e0e07&|n|d|e|x|(+0#e000e06&|[|'+0#e000002&|x@1|d|'|,+0#0000000&| |'+0#e000002&|g|i|t|r|e|b|a|s|e|'|]+0#e000e06&|,+0#0000000&| |&+0#00e0e07&|f|i|l|e|t|y|p|e|)+0#e000e06&| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|-+0#af5f00255&|1+0#e000002&| +0#0000000&@12
|
||||
@8|\+0#e000e06&| +0#0000000&@5|&+0#af5f00255&@1| +0#0000000&|!+0#af5f00255&|&+0#00e0e07&|d|i|f@1| +0#0000000&@50
|
||||
@8|\+0#e000e06&| +0#0000000&||| @2|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|n|o|r|m|a|l|!| |g|`|\+0#e000e06&|"|"+0#e000002&| +0#0000000&@38
|
||||
@8|\+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|n|d|i|f| +0#0000000&@57
|
||||
@4|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @59
|
||||
@75
|
||||
@75
|
||||
|U+0#e000e06&|R|L|s|~+0#ffffff16&| +0#0000000&@69
|
||||
@57|1|,|1| @10|T|o|p|
|
20
runtime/syntax/testdir/dumps/help_01.dump
Normal file
20
runtime/syntax/testdir/dumps/help_01.dump
Normal file
@ -0,0 +1,20 @@
|
||||
| +0&#ffffff0@7|\+0#e000e06&| +0#0000000&||| @2|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|n|o|r|m|a|l|!| |g|`|\+0#e000e06&|"|"+0#e000002&| +0#0000000&@38
|
||||
@8|\+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|n|d|i|f| +0#0000000&@57
|
||||
@4|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @59
|
||||
@75
|
||||
@75
|
||||
>U+0#e000e06&|R|L|s|~+0#ffffff16&| +0#0000000&@69
|
||||
@75
|
||||
@48|*+0#ffffff16&|g+0#e000002&|:|z|i|g|_|r|e|c|o|m@1|e|n|d|e|d|_|s|t|y|l|e|*+0#ffffff16&| +0#0000000&@1
|
||||
|B|y| |d|e|f|a|u|l|t| |t|h|e| |f|o|l@1|o|w|i|n|g| |i|n|d|e|n|t|a|t|i|o|n| |o|p|t|i|o|n|s| |a|r|e| |s|e|t|,| |i|n| |a|c@1|o|r|d|a|n|c|e| |w|i|t|h| |Z|i
|
||||
|g|'|s| @71
|
||||
|r|e|c|o|m@1|e|n|d|e|d| |s|t|y|l|e| |(|h+0#e000002&|t@1|p|s|:|/@1|z|i|g|l|a|n|g|.|o|r|g|/|d|o|c|u|m|e|n|t|a|t|i|o|n|/|m|a|s|t|e|r|/|)+0#0000000&|:| +0#ffffff16&|>| +0#0000000&@10
|
||||
@75
|
||||
@75
|
||||
|N+0#e000e06&|O|T|E|,| |W|A|R|N|I|N|G| |a|n|d| |D|E|P|R|E|C|A|T|E|D|~+0#ffffff16&| +0#0000000&@45
|
||||
@75
|
||||
|W|h|e|n| |y|o|u| |'|s|e|n|d| |a| |f|i|l|e| |t|o| |V|i|m|'|,| |V|i|m| |c|h|a|n|g|e|s| |t|o| |t|h|a|t| |f|i|l|e|'|s| |d|i|r|e|c|t|o|r|y|.| @1|N|o|t|e|,
|
||||
|h|o|w|e|v|e|r|,| |t|h|a|t| |a|n|y| |l|o|n|g| |d|i|r|e|c|t|o|r|y| |n|a|m|e|s| |w|i|l@1| |a|p@1|e|a|r| |i|n| |t|h|e|i|r| |s|h|o|r|t| |(|M|S|-|D|O|S|)|
|
||||
|f|o|r|m| |o|n| |s|o|m|e| |W|i|n|d|o|w|s| |v|e|r|s|i|o|n|s|.| @1|T|h|i|s| |i|s| |a| |l|i|m|i|t|a|t|i|o|n| |o|f| |t|h|e| |W|i|n|d|o|w|s| |"|S|e|n|d| |T
|
||||
|o|"| @72
|
||||
@57|1|9|,|1| @9|8|1|%|
|
20
runtime/syntax/testdir/dumps/help_02.dump
Normal file
20
runtime/syntax/testdir/dumps/help_02.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|f+0&#ffffff0|o|r|m| |o|n| |s|o|m|e| |W|i|n|d|o|w|s| |v|e|r|s|i|o|n|s|.| @1|T|h|i|s| |i|s| |a| |l|i|m|i|t|a|t|i|o|n| |o|f| |t|h|e| |W|i|n|d|o|w|s| |"|S|e|n|d| |T
|
||||
|o|"| @72
|
||||
|m|e|c|h|a|n|i|s|m|.| @64
|
||||
@75
|
||||
>v|i|m|:| |s|e|t| |f|t|=|h|e|l|p|:| @57
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|3@1|,|1| @9|B|o|t|
|
20
runtime/syntax/testdir/dumps/python2_strings_00.dump
Normal file
20
runtime/syntax/testdir/dumps/python2_strings_00.dump
Normal file
@ -0,0 +1,20 @@
|
||||
>#+0#0000e05#ffffff0| |S|t|r|i|n|g| |l|i|t|e|r|a|l|s| +0#0000000&@57
|
||||
|#+0#0000e05&| |h|t@1|p|s|:|/@1|d|o|c|s|.|p|y|t|h|o|n|.|o|r|g|/|2|/|r|e|f|e|r|e|n|c|e|/|l|e|x|i|c|a|l|_|a|n|a|l|y|s|i|s|.|h|t|m|l|#|s|t|r|i|n|g|-|l|i|t|e|r|a|l|s
|
||||
| +0#0000000&@74
|
||||
|#+0#0000e05&| |S|t|r|i|n|g|s|:| |S|o|u|r|c|e| |e|n|c|o|d|i|n|g|,| |n|o| |U|n|i|c|o|d|e| |e|s|c|a|p|e| |s|e|q|u|e|n|c|e|s| +0#0000000&@19
|
||||
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29
|
||||
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32
|
||||
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T|I
|
||||
|O|N| |M|A|R|K|}|'| +0#0000000&@65
|
||||
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |'+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
|
||||
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|
||||
@57|1|,|1| @10|T|o|p|
|
20
runtime/syntax/testdir/dumps/python2_strings_01.dump
Normal file
20
runtime/syntax/testdir/dumps/python2_strings_01.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|t+0&#ffffff0|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
|
||||
>t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|
||||
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|
||||
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|
||||
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|
||||
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |r+0#e000002&|'@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |R+0#e000002&|"@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |B|-|s|t|r|i|n|g|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/|p|e|p|-|@+0#4040ff13&@2
|
||||
| +0#0000000&@56|1|8|,|1| @9|1|8|%|
|
20
runtime/syntax/testdir/dumps/python2_strings_02.dump
Normal file
20
runtime/syntax/testdir/dumps/python2_strings_02.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|#+0#0000e05#ffffff0| |B|-|s|t|r|i|n|g|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/|p|e|p|-|3|1@1
|
||||
|2|)| +0#0000000&@72
|
||||
|t|e|s|t| |=| |b|'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@28
|
||||
|t|e|s|t| |=| |B|"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@31
|
||||
|t|e|s|t| |=| |b|'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T
|
||||
|I|O|N| |M|A|R|K|}|'| +0#0000000&@64
|
||||
>t|e|s|t| |=| |B|"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@19
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |b|'+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |B|"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |R|a|w| |b|-|s|t|r|i|n|g|s| +0#0000000&@59
|
||||
|t|e|s|t| |=| |b|r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@23
|
||||
|t|e|s|t| |=| |b|R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@26
|
||||
|t|e|s|t| |=| |B|r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |@+0#4040ff13&@2
|
||||
| +0#0000000&@56|3|4|,|1| @9|4|3|%|
|
20
runtime/syntax/testdir/dumps/python2_strings_03.dump
Normal file
20
runtime/syntax/testdir/dumps/python2_strings_03.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|t+0&#ffffff0|e|s|t| |=| |B|r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C
|
||||
|L|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@59
|
||||
|t|e|s|t| |=| |B|R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@12
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |b|r+0#e000002&|'@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@32
|
||||
>a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |B|R+0#e000002&|"@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@32
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |U|n|i|c|o|d|e| |s|t|r|i|n|g|s| +0#0000000&@57
|
||||
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@28
|
||||
|t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@31
|
||||
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T
|
||||
|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@64
|
||||
|t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@19
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |u+0#e000002&|'@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|
||||
@57|5|0|,|1| @9|6|9|%|
|
20
runtime/syntax/testdir/dumps/python2_strings_04.dump
Normal file
20
runtime/syntax/testdir/dumps/python2_strings_04.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|t+0&#ffffff0|e|s|t| |=| |u+0#e000002&|'@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |U+0#e000002&|"@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
>a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g|s|:| |O|n|l|y| |U|n|i|c|o|d|e| |e|s|c|a|p|e| |s|e|q|u|e|n|c|e|s| +0#0000000&@22
|
||||
|t|e|s|t| |=| |u+0#e000002&|r|'|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@15
|
||||
|t|e|s|t| |=| |u+0#e000002&|R|"|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@18
|
||||
|t|e|s|t| |=| |U+0#e000002&|r|'|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E
|
||||
|R|T|E|D| |E|X|C|L|A|M|A|T|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@51
|
||||
|t|e|s|t| |=| |U+0#e000002&|R|"|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@4
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |u+0#e000002&|r|'@2|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@24
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |U+0#e000002&|R|"@2|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@24
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
@57|6|7|,|1| @9|9|5|%|
|
20
runtime/syntax/testdir/dumps/python2_strings_05.dump
Normal file
20
runtime/syntax/testdir/dumps/python2_strings_05.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|a+0#e000002#ffffff0|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
|
||||
@75
|
||||
>#+0#0000e05&| |v|i|m|:| |s|y|n|t|a|x|=|p|y|t|h|o|n|2| +0#0000000&@53
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|8|2|,|1| @9|B|o|t|
|
20
runtime/syntax/testdir/dumps/python_strings_bytes_00.dump
Normal file
20
runtime/syntax/testdir/dumps/python_strings_bytes_00.dump
Normal file
@ -0,0 +1,20 @@
|
||||
>#+0#0000e05#ffffff0| |S|t|r|i|n|g| |a|n|d| |B|y|t|e|s| |l|i|t|e|r|a|l|s| +0#0000000&@47
|
||||
|#+0#0000e05&| |h|t@1|p|s|:|/@1|d|o|c|s|.|p|y|t|h|o|n|.|o|r|g|/|3|/|r|e|f|e|r|e|n|c|e|/|l|e|x|i|c|a|l|_|a|n|a|l|y|s|i|s|.|h|t|m|l|#|s|t|r|i|n|g|-|a|n|d|-|b|y|t|e
|
||||
|s|-|l|i|t|e|r|a|l|s| +0#0000000&@64
|
||||
@75
|
||||
|#+0#0000e05&| |S|t|r|i|n|g|s| +0#0000000&@65
|
||||
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29
|
||||
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32
|
||||
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T|I
|
||||
|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@65
|
||||
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |'+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
|
||||
@57|1|,|1| @10|T|o|p|
|
20
runtime/syntax/testdir/dumps/python_strings_bytes_01.dump
Normal file
20
runtime/syntax/testdir/dumps/python_strings_bytes_01.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|a+0#e000002#ffffff0|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
|
||||
@75
|
||||
>#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
|
||||
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|
||||
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|
||||
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|
||||
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|
||||
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |r+0#e000002&|'@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |R+0#e000002&|"@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
@57|1|7|,|1| @9|1|5|%|
|
20
runtime/syntax/testdir/dumps/python_strings_bytes_02.dump
Normal file
20
runtime/syntax/testdir/dumps/python_strings_bytes_02.dump
Normal file
@ -0,0 +1,20 @@
|
||||
| +0&#ffffff0@74
|
||||
|#+0#0000e05&| |B|y|t|e|s| +0#0000000&@67
|
||||
|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29
|
||||
|t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32
|
||||
|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T|I
|
||||
|O|N| |M|A|R|K|}|'| +0#0000000&@65
|
||||
>t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |b+0#e000002&|'@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |B+0#e000002&|"@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |R|a|w| |b|y|t|e|s| +0#0000000&@63
|
||||
|t|e|s|t| |=| |b+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|
||||
|t|e|s|t| |=| |b+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|
||||
|t|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|@+0#4040ff13&@2
|
||||
| +0#0000000&@56|3|4|,|1| @9|3|8|%|
|
20
runtime/syntax/testdir/dumps/python_strings_bytes_03.dump
Normal file
20
runtime/syntax/testdir/dumps/python_strings_bytes_03.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|t+0&#ffffff0|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|
||||
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|
||||
|t|e|s|t| |=| |B+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |r+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|
||||
>t|e|s|t| |=| |r+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|
||||
|t|e|s|t| |=| |R+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|
||||
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|
||||
|t|e|s|t| |=| |R+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |b+0#e000002&|r|'@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |R+0#e000002&|B|"@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |U|n|i|c|o|d|e| |l|i|t|e|r|a|l|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/
|
||||
|p|e|p|-|0|4|1|4|)| +0#0000000&@65
|
||||
@57|5|0|,|1| @9|6|0|%|
|
20
runtime/syntax/testdir/dumps/python_strings_bytes_04.dump
Normal file
20
runtime/syntax/testdir/dumps/python_strings_bytes_04.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|#+0#0000e05#ffffff0| |U|n|i|c|o|d|e| |l|i|t|e|r|a|l|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/
|
||||
|p|e|p|-|0|4|1|4|)| +0#0000000&@65
|
||||
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@28
|
||||
|t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@31
|
||||
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T
|
||||
|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@64
|
||||
>t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@19
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |u+0#e000002&|'@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|
||||
|t|e|s|t| |=| |U+0#e000002&|"@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|
||||
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
|
||||
@75
|
||||
|#+0#0000e05&| |R|a|w| |U|n|i|c|o|d|e| |l|i|t|e|r|a|l|s| |a|r|e| |n|o|t| |a|l@1|o|w|e|d| +0#0000000&@36
|
||||
|t|e|s|t| |=| |u|r+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@27
|
||||
|t|e|s|t| |=| |u|R+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@30
|
||||
|t|e|s|t| |=| |U|r+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|@+0#4040ff13&@2
|
||||
| +0#0000000&@56|6|5|,|1| @9|8|1|%|
|
20
runtime/syntax/testdir/dumps/python_strings_bytes_05.dump
Normal file
20
runtime/syntax/testdir/dumps/python_strings_bytes_05.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|t+0&#ffffff0|e|s|t| |=| |U|r+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A
|
||||
|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@63
|
||||
|t|e|s|t| |=| |U|R+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@16
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |r|u+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@27
|
||||
>t|e|s|t| |=| |r|U+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@30
|
||||
|t|e|s|t| |=| |R|u+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A
|
||||
|T|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@63
|
||||
|t|e|s|t| |=| |R|U+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\+0#e000e06&| +0#0000000&@16
|
||||
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|
||||
|t|e|s|t| |=| |u|r+0#e000002&|'@2|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |'| |a|n|d| |"| +0#0000000&@35
|
||||
|a+0#e000002&|n|d| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@50
|
||||
|a+0#e000002&|n|d| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@46
|
||||
|t|e|s|t| |=| |R|U+0#e000002&|"@2|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |'| |a|n|d| |"| +0#0000000&@35
|
||||
|a+0#e000002&|n|d| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@50
|
||||
|a+0#e000002&|n|d| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@46
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|8|1|,|1| @9|B|o|t|
|
33
runtime/syntax/testdir/input/help.txt
Normal file
33
runtime/syntax/testdir/input/help.txt
Normal file
@ -0,0 +1,33 @@
|
||||
VIM HELP FILE FORMAT
|
||||
|
||||
|
||||
Issue #17721 (Strange >vim highlighting in help documentation?)~
|
||||
|
||||
*restore-cursor* *last-position-jump* >vim
|
||||
augroup RestoreCursor
|
||||
autocmd!
|
||||
autocmd BufReadPost *
|
||||
\ let line = line("'\"")
|
||||
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
|
||||
\ && index(['xxd', 'gitrebase'], &filetype) == -1
|
||||
\ && !&diff
|
||||
\ | execute "normal! g`\""
|
||||
\ | endif
|
||||
augroup END
|
||||
|
||||
|
||||
URLs~
|
||||
|
||||
*g:zig_recommended_style*
|
||||
By default the following indentation options are set, in accordance with Zig's
|
||||
recommended style (https://ziglang.org/documentation/master/): >
|
||||
|
||||
|
||||
NOTE, WARNING and DEPRECATED~
|
||||
|
||||
When you 'send a file to Vim', Vim changes to that file's directory. Note,
|
||||
however, that any long directory names will appear in their short (MS-DOS)
|
||||
form on some Windows versions. This is a limitation of the Windows "Send To"
|
||||
mechanism.
|
||||
|
||||
vim: set ft=help:
|
82
runtime/syntax/testdir/input/python2_strings.py
Normal file
82
runtime/syntax/testdir/input/python2_strings.py
Normal file
@ -0,0 +1,82 @@
|
||||
# String literals
|
||||
# https://docs.python.org/2/reference/lexical_analysis.html#string-literals
|
||||
|
||||
# Strings: Source encoding, no Unicode escape sequences
|
||||
test = 'String with escapes \' and \" and \t'
|
||||
test = "String with escapes \040 and \xFF"
|
||||
test = 'String with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = "String with escaped \\ backslash and ignored \
|
||||
newline"
|
||||
test = '''String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605'''
|
||||
test = """String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605"""
|
||||
|
||||
# Raw strings
|
||||
test = r'Raw string with literal \' and \" and \t'
|
||||
test = R"Raw string with literal \040 and \xFF"
|
||||
test = r'Raw string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = R"Raw string with literal \\ backslashes and literal \
|
||||
newline"
|
||||
test = r'''Raw string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605'''
|
||||
test = R"""Raw string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605"""
|
||||
|
||||
# B-strings: Prefix is allowed but ignored (https://peps.python.org/pep-3112)
|
||||
test = b'String with escapes \' and \" and \t'
|
||||
test = B"String with escapes \040 and \xFF"
|
||||
test = b'String with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = B"String with escaped \\ backslash and ignored \
|
||||
newline"
|
||||
test = b'''String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605'''
|
||||
test = B"""String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605"""
|
||||
|
||||
# Raw b-strings
|
||||
test = br'Raw string with literal \' and \" and \t'
|
||||
test = bR"Raw string with literal \040 and \xFF"
|
||||
test = Br'Raw string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = BR"Raw string with literal \\ backslashes and literal \
|
||||
newline"
|
||||
test = br'''Raw string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605'''
|
||||
test = BR"""Raw string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605"""
|
||||
|
||||
# Unicode strings
|
||||
test = u'String with escapes \' and \" and \t'
|
||||
test = U"String with escapes \040 and \xFF"
|
||||
test = u'String with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = U"String with escaped \\ backslash and ignored \
|
||||
newline"
|
||||
test = u'''String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605'''
|
||||
test = U"""String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605"""
|
||||
|
||||
# Raw Unicode strings: Only Unicode escape sequences
|
||||
test = ur'Raw Unicode string with literal \' and \" and \t'
|
||||
test = uR"Raw Unicode string with literal \040 and \xFF"
|
||||
test = Ur'Raw Unicode string with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = UR"Raw Unicode string with literal \\ backslashes and literal \
|
||||
newline"
|
||||
test = ur'''Raw Unicode string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605'''
|
||||
test = UR"""Raw Unicode string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605"""
|
||||
|
||||
# vim: syntax=python2
|
90
runtime/syntax/testdir/input/python_strings_bytes.py
Normal file
90
runtime/syntax/testdir/input/python_strings_bytes.py
Normal file
@ -0,0 +1,90 @@
|
||||
# String and Bytes literals
|
||||
# https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
|
||||
|
||||
# Strings
|
||||
test = 'String with escapes \' and \" and \t'
|
||||
test = "String with escapes \040 and \xFF"
|
||||
test = 'String with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = "String with escaped \\ backslash and ignored \
|
||||
newline"
|
||||
test = '''String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605'''
|
||||
test = """String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605"""
|
||||
|
||||
# Raw strings
|
||||
test = r'Raw string with literal \' and \" and \t'
|
||||
test = R"Raw string with literal \040 and \xFF"
|
||||
test = r'Raw string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = R"Raw string with literal \\ backslashes and literal \
|
||||
newline"
|
||||
test = r'''Raw string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605'''
|
||||
test = R"""Raw string with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605"""
|
||||
|
||||
# Bytes
|
||||
test = b'Bytes with escapes \' and \" and \t'
|
||||
test = B"Bytes with escapes \040 and \xFF"
|
||||
test = b'Bytes with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = B"Bytes with escaped \\ backslash and ignored \
|
||||
newline"
|
||||
test = b'''Bytes with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605'''
|
||||
test = B"""Bytes with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605"""
|
||||
|
||||
# Raw bytes
|
||||
test = br'Raw bytes with literal \' and \" and \t'
|
||||
test = bR"Raw bytes with literal \040 and \xFF"
|
||||
test = Br'Raw bytes with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = BR"Raw bytes with literal \\ backslashes and literal \
|
||||
newline"
|
||||
test = rb'Raw bytes with literal \' and \" and \t'
|
||||
test = rB"Raw bytes with literal \040 and \xFF"
|
||||
test = Rb'Raw bytes with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = RB"Raw bytes with literal \\ backslashes and literal \
|
||||
newline"
|
||||
test = br'''Raw bytes with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605'''
|
||||
test = RB"""Raw bytes with quotes ' and "
|
||||
and literal \t and \040 and \xFF
|
||||
and literal \u00A1 and \U00010605"""
|
||||
|
||||
# Unicode literals: Prefix is allowed but ignored (https://peps.python.org/pep-0414)
|
||||
test = u'String with escapes \' and \" and \t'
|
||||
test = U"String with escapes \040 and \xFF"
|
||||
test = u'String with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = U"String with escaped \\ backslash and ignored \
|
||||
newline"
|
||||
test = u'''String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605'''
|
||||
test = U"""String with quotes ' and "
|
||||
and escapes \t and \040 and \xFF
|
||||
and escapes \u00A1 and \U00010605"""
|
||||
|
||||
# Raw Unicode literals are not allowed
|
||||
test = ur'Invalid string with \' and \" and \t'
|
||||
test = uR"Invalid string with \040 and \xFF"
|
||||
test = Ur'Invalid string with \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = UR"Invalid string with \\ backslashes and literal \
|
||||
newline"
|
||||
test = ru'Invalid string with \' and \" and \t'
|
||||
test = rU"Invalid string with \040 and \xFF"
|
||||
test = Ru'Invalid string with \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
|
||||
test = RU"Invalid string with \\ backslashes and literal \
|
||||
newline"
|
||||
test = ur'''Invalid string with ' and "
|
||||
and \t and \040 and \xFF
|
||||
and \u00A1 and \U00010605'''
|
||||
test = RU"""Invalid string with ' and "
|
||||
and \t and \040 and \xFF
|
||||
and \u00A1 and \U00010605"""
|
@ -2,7 +2,7 @@
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Jul 11
|
||||
" Last Change: 2025 Jul 14
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@ -842,7 +842,7 @@ syn case ignore
|
||||
syn keyword vimUserCmdAttrKey contained a[ddr] ban[g] bar bu[ffer] com[plete] cou[nt] k[eepscript] n[args] ra[nge] re[gister]
|
||||
|
||||
" GEN_SYN_VIM: vimUserCmdAttrComplete, START_STR='syn keyword vimUserCmdAttrComplete contained', END_STR=''
|
||||
syn keyword vimUserCmdAttrComplete contained arglist augroup behave breakpoint buffer color command compiler cscope diff_buffer dir dir_in_path environment event expression file file_in_path filetype filetypecmd function help highlight history keymap locale mapclear mapping menu messages option packadd runtime scriptnames shellcmd shellcmdline sign syntax syntime tag tag_listfiles user var
|
||||
syn keyword vimUserCmdAttrComplete contained arglist augroup behave breakpoint buffer color command compiler cscope diff_buffer dir dir_in_path environment event expression file file_in_path filetype filetypecmd function help highlight history keymap locale mapclear mapping menu messages option packadd retab runtime scriptnames shellcmd shellcmdline sign syntax syntime tag tag_listfiles user var
|
||||
syn keyword vimUserCmdAttrComplete contained arglist augroup behave breakpoint buffer color command compiler cscope diff_buffer dir dir_in_path environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages option packadd runtime scriptnames shellcmd shellcmdline sign syntax syntime tag tag_listfiles user var
|
||||
syn keyword vimUserCmdAttrComplete contained custom customlist nextgroup=vimUserCmdAttrCompleteFunc,vimUserCmdError
|
||||
syn match vimUserCmdAttrCompleteFunc contained ",\%([bwglstav]:\|<[sS][iI][dD]>\)\=\h\w*\%([.#]\h\w*\)*"hs=s+1 nextgroup=vimUserCmdError contains=vimVarScope,vimFunctionSID
|
||||
|
@ -2622,6 +2622,11 @@ set_context_by_cmdname(
|
||||
xp->xp_pattern = arg;
|
||||
break;
|
||||
|
||||
case CMD_retab:
|
||||
xp->xp_context = EXPAND_RETAB;
|
||||
xp->xp_pattern = arg;
|
||||
break;
|
||||
|
||||
case CMD_messages:
|
||||
xp->xp_context = EXPAND_MESSAGES;
|
||||
xp->xp_pattern = arg;
|
||||
@ -3204,6 +3209,18 @@ get_scriptnames_arg(expand_T *xp UNUSED, int idx)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Function given to ExpandGeneric() to obtain the possible arguments of the
|
||||
* ":retab {-indentonly}" option.
|
||||
*/
|
||||
static char_u *
|
||||
get_retab_arg(expand_T *xp UNUSED, int idx)
|
||||
{
|
||||
if (idx == 0)
|
||||
return (char_u *)"-indentonly";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Function given to ExpandGeneric() to obtain the possible arguments of the
|
||||
* ":messages {clear}" command.
|
||||
@ -3294,6 +3311,7 @@ ExpandOther(
|
||||
{EXPAND_BREAKPOINT, get_breakadd_arg, TRUE, TRUE},
|
||||
{EXPAND_SCRIPTNAMES, get_scriptnames_arg, TRUE, FALSE},
|
||||
#endif
|
||||
{EXPAND_RETAB, get_retab_arg, TRUE, TRUE},
|
||||
};
|
||||
int i;
|
||||
int ret = FAIL;
|
||||
|
50
src/indent.c
50
src/indent.c
@ -1716,21 +1716,29 @@ ex_retab(exarg_T *eap)
|
||||
char_u *new_ts_str; // string value of tab argument
|
||||
#else
|
||||
int temp;
|
||||
int new_ts;
|
||||
int new_ts = 0;
|
||||
#endif
|
||||
int save_list;
|
||||
linenr_T first_line = 0; // first changed line
|
||||
linenr_T last_line = 0; // last changed line
|
||||
int is_indent_only = 0; // Only process leading whitespace
|
||||
|
||||
save_list = curwin->w_p_list;
|
||||
curwin->w_p_list = 0; // don't want list mode here
|
||||
|
||||
ptr = eap->arg;
|
||||
if (STRNCMP(ptr, "-indentonly", 11) == 0 && IS_WHITE_OR_NUL(ptr[11]))
|
||||
{
|
||||
is_indent_only = 1;
|
||||
ptr = skipwhite(ptr + 11);
|
||||
}
|
||||
|
||||
#ifdef FEAT_VARTABS
|
||||
new_ts_str = eap->arg;
|
||||
if (tabstop_set(eap->arg, &new_vts_array) == FAIL)
|
||||
new_ts_str = ptr;
|
||||
if (tabstop_set(ptr, &new_vts_array) == FAIL)
|
||||
return;
|
||||
while (vim_isdigit(*(eap->arg)) || *(eap->arg) == ',')
|
||||
++(eap->arg);
|
||||
while (vim_isdigit(*ptr) || *ptr == ',')
|
||||
++ptr;
|
||||
|
||||
// This ensures that either new_vts_array and new_ts_str are freshly
|
||||
// allocated, or new_vts_array points to an existing array and new_ts_str
|
||||
@ -1741,19 +1749,26 @@ ex_retab(exarg_T *eap)
|
||||
new_ts_str = NULL;
|
||||
}
|
||||
else
|
||||
new_ts_str = vim_strnsave(new_ts_str, eap->arg - new_ts_str);
|
||||
new_ts_str = vim_strnsave(new_ts_str, ptr - new_ts_str);
|
||||
#else
|
||||
ptr = eap->arg;
|
||||
new_ts = getdigits(&ptr);
|
||||
if (new_ts < 0 && *eap->arg == '-')
|
||||
if (ptr[0] != NUL && (ptr[0] != '0' || ptr[1] != NUL))
|
||||
{
|
||||
emsg(_(e_argument_must_be_positive));
|
||||
return;
|
||||
}
|
||||
if (new_ts < 0 || new_ts > TABSTOP_MAX)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), eap->arg);
|
||||
return;
|
||||
char_u *end;
|
||||
|
||||
if (strtol((char *)ptr, (char **)&end, 10) <= 0)
|
||||
{
|
||||
if (ptr != end)
|
||||
emsg(_(e_argument_must_be_positive));
|
||||
else
|
||||
semsg(_(e_invalid_argument_str), ptr);
|
||||
return;
|
||||
}
|
||||
new_ts = getdigits(&ptr);
|
||||
if (new_ts < 0 || new_ts > TABSTOP_MAX)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), eap->arg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (new_ts == 0)
|
||||
new_ts = curbuf->b_p_ts;
|
||||
@ -1854,6 +1869,9 @@ ex_retab(exarg_T *eap)
|
||||
}
|
||||
got_tab = FALSE;
|
||||
num_spaces = 0;
|
||||
|
||||
if (is_indent_only)
|
||||
break;
|
||||
}
|
||||
if (ptr[col] == NUL)
|
||||
break;
|
||||
|
@ -2395,8 +2395,8 @@ ins_compl_need_restart(void)
|
||||
ins_compl_new_leader(void)
|
||||
{
|
||||
int cur_cot_flags = get_cot_flags();
|
||||
int save_w_wrow;
|
||||
int save_w_leftcol;
|
||||
int save_w_wrow = curwin->w_wrow;
|
||||
int save_w_leftcol = curwin->w_leftcol;
|
||||
|
||||
ins_compl_del_pum();
|
||||
ins_compl_delete();
|
||||
|
197
src/po/vim.pot
197
src/po/vim.pot
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-07-12 22:03+0200\n"
|
||||
"POT-Creation-Date: 2025-07-14 22:09+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -1762,66 +1762,63 @@ msgstr ""
|
||||
msgid "Scanning dictionary: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:2637
|
||||
#: ../insexpand.c:2642
|
||||
msgid " (insert) Scroll (^E/^Y)"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:2639
|
||||
#: ../insexpand.c:2644
|
||||
msgid " (replace) Scroll (^E/^Y)"
|
||||
msgstr ""
|
||||
|
||||
#. reset in msg_trunc_attr()
|
||||
#: ../insexpand.c:4165
|
||||
#: ../insexpand.c:4170
|
||||
#, c-format
|
||||
msgid "Scanning: %s"
|
||||
msgstr ""
|
||||
|
||||
#. reset in msg_trunc_attr()
|
||||
#: ../insexpand.c:4213
|
||||
#: ../insexpand.c:4218
|
||||
msgid "Scanning tags."
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:5562
|
||||
#: ../insexpand.c:5567
|
||||
msgid "match in file"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6603
|
||||
#: ../insexpand.c:6609
|
||||
msgid " Adding"
|
||||
msgstr ""
|
||||
|
||||
#. showmode might reset the internal line pointers, so it must
|
||||
#. be called before line = ml_get(), or when this address is no
|
||||
#. longer needed. -- Acevedo.
|
||||
#: ../insexpand.c:6658
|
||||
#: ../insexpand.c:6669
|
||||
msgid "-- Searching..."
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6677
|
||||
#: ../insexpand.c:6689
|
||||
msgid "Hit end of paragraph"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6678
|
||||
#: ../insexpand.c:6690
|
||||
msgid "Pattern not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6686
|
||||
#: ../insexpand.c:6698
|
||||
msgid "Back at original"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6691
|
||||
#: ../insexpand.c:6703
|
||||
msgid "Word from other line"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6696
|
||||
#: ../insexpand.c:6708
|
||||
msgid "The only match"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6717
|
||||
#: ../insexpand.c:6729
|
||||
#, c-format
|
||||
msgid "match %d of %d"
|
||||
msgstr ""
|
||||
|
||||
#: ../insexpand.c:6721
|
||||
#: ../insexpand.c:6733
|
||||
#, c-format
|
||||
msgid "match %d"
|
||||
msgstr ""
|
||||
@ -4215,13 +4212,13 @@ msgstr ""
|
||||
msgid "number changes when saved"
|
||||
msgstr ""
|
||||
|
||||
#: ../usercmd.c:592
|
||||
#: ../usercmd.c:593
|
||||
msgid ""
|
||||
"\n"
|
||||
" Name Args Address Complete Definition"
|
||||
msgstr ""
|
||||
|
||||
#: ../usercmd.c:741
|
||||
#: ../usercmd.c:742
|
||||
msgid "No user-defined commands found"
|
||||
msgstr ""
|
||||
|
||||
@ -4260,327 +4257,327 @@ msgstr ""
|
||||
msgid "%s (%s, compiled %s)"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4010
|
||||
#: ../version.c:4022
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows ARM64 GUI/console version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4012
|
||||
#: ../version.c:4024
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 64-bit GUI/console version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4015
|
||||
#: ../version.c:4027
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 32-bit GUI/console version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4020
|
||||
#: ../version.c:4032
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows ARM64 GUI version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4022
|
||||
#: ../version.c:4034
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 64-bit GUI version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4025
|
||||
#: ../version.c:4037
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 32-bit GUI version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4029
|
||||
#: ../version.c:4041
|
||||
msgid " with OLE support"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4034
|
||||
#: ../version.c:4046
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows ARM64 console version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4036
|
||||
#: ../version.c:4048
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 64-bit console version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4039
|
||||
#: ../version.c:4051
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 32-bit console version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4045
|
||||
#: ../version.c:4057
|
||||
msgid ""
|
||||
"\n"
|
||||
"macOS version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4047
|
||||
#: ../version.c:4059
|
||||
msgid ""
|
||||
"\n"
|
||||
"macOS version w/o darwin feat."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4057
|
||||
#: ../version.c:4069
|
||||
msgid ""
|
||||
"\n"
|
||||
"OpenVMS version"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4072
|
||||
#: ../version.c:4084
|
||||
msgid ""
|
||||
"\n"
|
||||
"Included patches: "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4097
|
||||
#: ../version.c:4109
|
||||
msgid ""
|
||||
"\n"
|
||||
"Extra patches: "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4109 ../version.c:4420
|
||||
#: ../version.c:4121 ../version.c:4432
|
||||
msgid "Modified by "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4116
|
||||
#: ../version.c:4128
|
||||
msgid ""
|
||||
"\n"
|
||||
"Compiled "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4119
|
||||
#: ../version.c:4131
|
||||
msgid "by "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4131
|
||||
#: ../version.c:4143
|
||||
msgid ""
|
||||
"\n"
|
||||
"Huge version "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4133
|
||||
#: ../version.c:4145
|
||||
msgid ""
|
||||
"\n"
|
||||
"Normal version "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4135
|
||||
#: ../version.c:4147
|
||||
msgid ""
|
||||
"\n"
|
||||
"Tiny version "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4138
|
||||
#: ../version.c:4150
|
||||
msgid "without GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4141
|
||||
#: ../version.c:4153
|
||||
msgid "with GTK3 GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4143
|
||||
#: ../version.c:4155
|
||||
msgid "with GTK2-GNOME GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4145
|
||||
#: ../version.c:4157
|
||||
msgid "with GTK2 GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4148
|
||||
#: ../version.c:4160
|
||||
msgid "with X11-Motif GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4150
|
||||
#: ../version.c:4162
|
||||
msgid "with Haiku GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4152
|
||||
#: ../version.c:4164
|
||||
msgid "with Photon GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4154
|
||||
#: ../version.c:4166
|
||||
msgid "with GUI."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4156
|
||||
#: ../version.c:4168
|
||||
msgid " Features included (+) or not (-):\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4163
|
||||
#: ../version.c:4175
|
||||
msgid " system vimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4168
|
||||
#: ../version.c:4180
|
||||
msgid " user vimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4173
|
||||
#: ../version.c:4185
|
||||
msgid " 2nd user vimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4178 ../version.c:4185 ../version.c:4189
|
||||
#: ../version.c:4190 ../version.c:4197 ../version.c:4201
|
||||
msgid " 3rd user vimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4181
|
||||
#: ../version.c:4193
|
||||
msgid " 4th user vimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4194
|
||||
#: ../version.c:4206
|
||||
msgid " user exrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4199
|
||||
#: ../version.c:4211
|
||||
msgid " 2nd user exrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4205
|
||||
#: ../version.c:4217
|
||||
msgid " system gvimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4209
|
||||
#: ../version.c:4221
|
||||
msgid " user gvimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4213
|
||||
#: ../version.c:4225
|
||||
msgid "2nd user gvimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4218
|
||||
#: ../version.c:4230
|
||||
msgid "3rd user gvimrc file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4223
|
||||
#: ../version.c:4235
|
||||
msgid " defaults file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4228
|
||||
#: ../version.c:4240
|
||||
msgid " system menu file: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4236
|
||||
#: ../version.c:4248
|
||||
msgid " fall-back for $VIM: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4242
|
||||
#: ../version.c:4254
|
||||
msgid " f-b for $VIMRUNTIME: \""
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4246
|
||||
#: ../version.c:4258
|
||||
msgid "Compilation: "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4252
|
||||
#: ../version.c:4264
|
||||
msgid "Compiler: "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4257
|
||||
#: ../version.c:4269
|
||||
msgid "Linking: "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4262
|
||||
#: ../version.c:4274
|
||||
msgid " DEBUG BUILD"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4298
|
||||
#: ../version.c:4310
|
||||
msgid "VIM - Vi IMproved"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4300
|
||||
#: ../version.c:4312
|
||||
msgid "version "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4301
|
||||
#: ../version.c:4313
|
||||
msgid "by Bram Moolenaar et al."
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4305
|
||||
#: ../version.c:4317
|
||||
msgid "Vim is open source and freely distributable"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4307
|
||||
#: ../version.c:4319
|
||||
msgid "Help poor children in Uganda!"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4308
|
||||
#: ../version.c:4320
|
||||
msgid "type :help iccf<Enter> for information "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4310
|
||||
#: ../version.c:4322
|
||||
msgid "type :q<Enter> to exit "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4311
|
||||
#: ../version.c:4323
|
||||
msgid "type :help<Enter> or <F1> for on-line help"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4312
|
||||
#: ../version.c:4324
|
||||
msgid "type :help version9<Enter> for version info"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4315
|
||||
#: ../version.c:4327
|
||||
msgid "Running in Vi compatible mode"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4316
|
||||
#: ../version.c:4328
|
||||
msgid "type :set nocp<Enter> for Vim defaults"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4317
|
||||
#: ../version.c:4329
|
||||
msgid "type :help cp-default<Enter> for info on this"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4332
|
||||
#: ../version.c:4344
|
||||
msgid "menu Help->Orphans for information "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4334
|
||||
#: ../version.c:4346
|
||||
msgid "Running modeless, typed text is inserted"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4335
|
||||
#: ../version.c:4347
|
||||
msgid "menu Edit->Global Settings->Toggle Insert Mode "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4336
|
||||
#: ../version.c:4348
|
||||
msgid " for two modes "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4340
|
||||
#: ../version.c:4352
|
||||
msgid "menu Edit->Global Settings->Toggle Vi Compatible"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4341
|
||||
#: ../version.c:4353
|
||||
msgid " for Vim defaults "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4382
|
||||
#: ../version.c:4394
|
||||
msgid "Sponsor Vim development!"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4383
|
||||
#: ../version.c:4395
|
||||
msgid "Become a registered Vim user!"
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4386
|
||||
#: ../version.c:4398
|
||||
msgid "type :help sponsor<Enter> for information "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4387
|
||||
#: ../version.c:4399
|
||||
msgid "type :help register<Enter> for information "
|
||||
msgstr ""
|
||||
|
||||
#: ../version.c:4389
|
||||
#: ../version.c:4401
|
||||
msgid "menu Help->Sponsor/Register for information "
|
||||
msgstr ""
|
||||
|
||||
@ -4744,12 +4741,12 @@ msgstr ""
|
||||
msgid "wayland protocol error -> "
|
||||
msgstr ""
|
||||
|
||||
#: ../wayland.c:2430
|
||||
#: ../wayland.c:2461
|
||||
#, c-format
|
||||
msgid "restoring Wayland display %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../wayland.c:2437
|
||||
#: ../wayland.c:2468
|
||||
msgid "failed restoring, lost connection to Wayland display"
|
||||
msgstr ""
|
||||
|
||||
@ -11611,17 +11608,17 @@ msgid ""
|
||||
"You should now append vim.VIM_SPECIAL_PATH to sys.path"
|
||||
msgstr ""
|
||||
|
||||
#: ../vim.h:2540
|
||||
#: ../vim.h:2541
|
||||
msgid ""
|
||||
"Vim macro files (*.vim)\t*.vim\n"
|
||||
"All Files (*.*)\t*.*\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../vim.h:2541
|
||||
#: ../vim.h:2542
|
||||
msgid "All Files (*.*)\t*.*\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../vim.h:2543
|
||||
#: ../vim.h:2544
|
||||
msgid ""
|
||||
"All Files (*.*)\t*.*\n"
|
||||
"C source (*.c, *.h)\t*.c;*.h\n"
|
||||
@ -11630,17 +11627,17 @@ msgid ""
|
||||
"Vim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../vim.h:2546
|
||||
#: ../vim.h:2547
|
||||
msgid ""
|
||||
"Vim macro files (*.vim)\t*.vim\n"
|
||||
"All Files (*)\t*\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../vim.h:2547
|
||||
#: ../vim.h:2548
|
||||
msgid "All Files (*)\t*\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../vim.h:2549
|
||||
#: ../vim.h:2550
|
||||
msgid ""
|
||||
"All Files (*)\t*\n"
|
||||
"C source (*.c, *.h)\t*.c;*.h\n"
|
||||
|
@ -764,6 +764,11 @@ func Test_getcompletion()
|
||||
let l = getcompletion('not', 'mapclear')
|
||||
call assert_equal([], l)
|
||||
|
||||
let l = getcompletion('', 'retab')
|
||||
call assert_true(index(l, '-indentonly') >= 0)
|
||||
let l = getcompletion('not', 'retab')
|
||||
call assert_equal([], l)
|
||||
|
||||
let l = getcompletion('.', 'shellcmd')
|
||||
call assert_equal(['./', '../'], filter(l, 'v:val =~ "\\./"'))
|
||||
call assert_equal(-1, match(l[2:], '^\.\.\?/$'))
|
||||
@ -820,6 +825,8 @@ func Test_getcompletion()
|
||||
call assert_equal([], l)
|
||||
let l = getcompletion('autocmd BufEnter * map <bu', 'cmdline')
|
||||
call assert_equal(['<buffer>'], l)
|
||||
let l = getcompletion('retab! ', 'cmdline')
|
||||
call assert_true(index(l, '-indentonly') >= 0)
|
||||
|
||||
func T(a, c, p)
|
||||
let g:cmdline_compl_params = [a:a, a:c, a:p]
|
||||
|
@ -9,10 +9,13 @@ func TearDown()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Retab(bang, n)
|
||||
func Retab(bang, n, subopt='', test_line='')
|
||||
let l:old_tabstop = &tabstop
|
||||
let l:old_line = getline(1)
|
||||
exe "retab" . a:bang . a:n
|
||||
if a:test_line != ''
|
||||
call setline(1, a:test_line)
|
||||
endif
|
||||
exe "retab" . a:bang . ' ' . a:subopt . ' ' . a:n
|
||||
let l:line = getline(1)
|
||||
call setline(1, l:old_line)
|
||||
if a:n > 0
|
||||
@ -71,6 +74,70 @@ func Test_retab()
|
||||
call assert_equal(" a b c ", Retab('', 5))
|
||||
call assert_equal(" a b c ", Retab('!', 5))
|
||||
|
||||
" Test with '-indentonly'
|
||||
let so='-indentonly'
|
||||
set tabstop=8 noexpandtab
|
||||
call assert_equal("\ta \t b c ", Retab('', '', so))
|
||||
call assert_equal("\ta \t b c ", Retab('', 0, so))
|
||||
call assert_equal("\ta \t b c ", Retab('', 8, so))
|
||||
call assert_equal("\ta \t b c ", Retab('!', '', so))
|
||||
call assert_equal("\ta \t b c ", Retab('!', 0, so))
|
||||
call assert_equal("\ta \t b c ", Retab('!', 8, so))
|
||||
|
||||
call assert_equal("\t\ta \t b c ", Retab('', 4, so))
|
||||
call assert_equal("\t\ta \t b c ", Retab('!', 4, so))
|
||||
|
||||
call assert_equal(" a \t b c ", Retab('', 10, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 10, so))
|
||||
|
||||
set tabstop=8 expandtab
|
||||
call assert_equal(" a \t b c ", Retab('', '', so))
|
||||
call assert_equal(" a \t b c ", Retab('', 0, so))
|
||||
call assert_equal(" a \t b c ", Retab('', 8, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', '', so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 0, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 8, so))
|
||||
|
||||
call assert_equal(" a \t b c ", Retab(' ', 4, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 4, so))
|
||||
|
||||
call assert_equal(" a \t b c ", Retab(' ', 10, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 10, so))
|
||||
|
||||
set tabstop=4 noexpandtab
|
||||
call assert_equal("\ta \t b c ", Retab('', '', so))
|
||||
call assert_equal("\ta \t b c ", Retab('!', '', so))
|
||||
call assert_equal("\t a \t b c ", Retab('', 3, so))
|
||||
call assert_equal("\t a \t b c ", Retab('!', 3, so))
|
||||
call assert_equal(" a \t b c ", Retab('', 5, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 5, so))
|
||||
|
||||
set tabstop=4 expandtab
|
||||
call assert_equal(" a \t b c ", Retab('', '', so))
|
||||
call assert_equal(" a \t b c ", Retab('!', '', so))
|
||||
call assert_equal(" a \t b c ", Retab('', 3, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 3, so))
|
||||
call assert_equal(" a \t b c ", Retab('', 5, so))
|
||||
call assert_equal(" a \t b c ", Retab('!', 5, so))
|
||||
|
||||
" Test for variations in leading whitespace
|
||||
let so='-indentonly'
|
||||
let test_line=" \t a\t "
|
||||
set tabstop=8 noexpandtab
|
||||
call assert_equal("\t a\t ", Retab('', '', so, test_line))
|
||||
call assert_equal("\t a\t ", Retab('!', '', so, test_line))
|
||||
set tabstop=8 expandtab
|
||||
call assert_equal(" a\t ", Retab('', '', so, test_line))
|
||||
call assert_equal(" a\t ", Retab('!', '', so, test_line))
|
||||
|
||||
let test_line=" a\t "
|
||||
set tabstop=8 noexpandtab
|
||||
call assert_equal(test_line, Retab('', '', so, test_line))
|
||||
call assert_equal("\t a\t ", Retab('!', '', so, test_line))
|
||||
set tabstop=8 expandtab
|
||||
call assert_equal(test_line, Retab('', '', so, test_line))
|
||||
call assert_equal(test_line, Retab('!', '', so, test_line))
|
||||
|
||||
set tabstop& expandtab&
|
||||
endfunc
|
||||
|
||||
@ -80,6 +147,9 @@ func Test_retab_error()
|
||||
call assert_fails('ret -1000', 'E487:')
|
||||
call assert_fails('ret 10000', 'E475:')
|
||||
call assert_fails('ret 80000000000000000000', 'E475:')
|
||||
call assert_fails('retab! -in', 'E475:')
|
||||
call assert_fails('retab! -indentonly2', 'E475:')
|
||||
call assert_fails('retab! -indentonlyx 0', 'E475:')
|
||||
endfunc
|
||||
|
||||
func RetabLoop()
|
||||
|
@ -425,6 +425,10 @@ func Test_CmdCompletion()
|
||||
call feedkeys(":DoCmd \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"DoCmd mswin xterm', @:)
|
||||
|
||||
com! -nargs=1 -complete=retab DoCmd :
|
||||
call feedkeys(":DoCmd \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"DoCmd -indentonly', @:)
|
||||
|
||||
" Test for file name completion
|
||||
com! -nargs=1 -complete=file DoCmd :
|
||||
call feedkeys(":DoCmd READM\<Tab>\<C-B>\"\<CR>", 'tx')
|
||||
|
@ -838,6 +838,25 @@ def Test_enum_values()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
enum Car
|
||||
Honda,
|
||||
Ford,
|
||||
endenum
|
||||
assert_equal([Car.Honda, Car.Ford], Car.values)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
enum Car
|
||||
Honda, Ford,
|
||||
endenum
|
||||
assert_equal([Car.Honda, Car.Ford], Car.values)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# empty enum
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
@ -863,7 +882,7 @@ def Test_enum_values()
|
||||
Red,
|
||||
Blue
|
||||
static def GetValues(): list<A>
|
||||
return values
|
||||
return values
|
||||
enddef
|
||||
endenum
|
||||
assert_equal([A.Red, A.Blue], A.GetValues())
|
||||
@ -1050,6 +1069,34 @@ def Test_enum_refcount()
|
||||
assert_equal(4, test_refcount(Star.Orion))
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
enum Star
|
||||
Gemini,
|
||||
Orion,
|
||||
endenum
|
||||
|
||||
assert_equal(3, test_refcount(Star))
|
||||
assert_equal(2, test_refcount(Star.Gemini))
|
||||
assert_equal(2, test_refcount(Star.Orion))
|
||||
|
||||
var x = [Star.Gemini]
|
||||
assert_equal(3, test_refcount(Star))
|
||||
assert_equal(3, test_refcount(Star.Gemini))
|
||||
|
||||
def Fn()
|
||||
var y = [Star.Gemini, Star.Orion]
|
||||
assert_equal(6, test_refcount(Star))
|
||||
assert_equal(4, test_refcount(Star.Gemini))
|
||||
enddef
|
||||
Fn()
|
||||
# The instruction in the compiled function adds an additional reference
|
||||
# to the enum.
|
||||
assert_equal(6, test_refcount(Star))
|
||||
assert_equal(3, test_refcount(Star.Gemini))
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for defining an enum with additional object variables and methods
|
||||
|
@ -88,6 +88,7 @@ static keyvalue_T command_complete_tab[] =
|
||||
KEYVALUE_ENTRY(EXPAND_MESSAGES, "messages"),
|
||||
KEYVALUE_ENTRY(EXPAND_SETTINGS, "option"),
|
||||
KEYVALUE_ENTRY(EXPAND_PACKADD, "packadd"),
|
||||
KEYVALUE_ENTRY(EXPAND_RETAB, "retab"),
|
||||
KEYVALUE_ENTRY(EXPAND_RUNTIME, "runtime"),
|
||||
#if defined(FEAT_EVAL)
|
||||
KEYVALUE_ENTRY(EXPAND_SCRIPTNAMES, "scriptnames"),
|
||||
|
@ -719,6 +719,14 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1544,
|
||||
/**/
|
||||
1543,
|
||||
/**/
|
||||
1542,
|
||||
/**/
|
||||
1541,
|
||||
/**/
|
||||
1540,
|
||||
/**/
|
||||
|
@ -860,6 +860,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
|
||||
#define EXPAND_HIGHLIGHT_GROUP 62
|
||||
#define EXPAND_FILETYPECMD 63
|
||||
#define EXPAND_PATTERN_IN_BUF 64
|
||||
#define EXPAND_RETAB 65
|
||||
|
||||
|
||||
// Values for exmode_active (0 is no exmode)
|
||||
|
@ -1855,6 +1855,7 @@ ex_class(exarg_T *eap)
|
||||
int is_class = eap->cmdidx == CMD_class;
|
||||
int is_abstract = eap->cmdidx == CMD_abstract;
|
||||
int is_enum = eap->cmdidx == CMD_enum;
|
||||
int added_enum_values = FALSE;
|
||||
int is_interface;
|
||||
long start_lnum = SOURCING_LNUM;
|
||||
char_u *arg = eap->arg;
|
||||
@ -2174,9 +2175,12 @@ early_ret:
|
||||
break;
|
||||
|
||||
if (enum_end)
|
||||
{
|
||||
// Add the enum "values" class variable.
|
||||
enum_add_values_member(cl, &classmembers, num_enum_values,
|
||||
&type_list);
|
||||
added_enum_values = TRUE;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2496,9 +2500,10 @@ early_ret:
|
||||
|
||||
vim_free(theline);
|
||||
|
||||
if (success && is_enum && num_enum_values == 0)
|
||||
if (success && is_enum && (num_enum_values == 0 || !added_enum_values))
|
||||
// Empty enum statement. Add an empty "values" class variable
|
||||
success = enum_add_values_member(cl, &classmembers, 0, &type_list);
|
||||
success = enum_add_values_member(cl, &classmembers, num_enum_values,
|
||||
&type_list);
|
||||
|
||||
/*
|
||||
* Check a few things
|
||||
|
@ -2098,7 +2098,7 @@ vwl_data_device_listener_finished(vwl_data_device_T *device)
|
||||
{
|
||||
vwl_clipboard_selection_T *clip_sel = device->data;
|
||||
|
||||
vwl_data_device_destroy(device, FALSE);
|
||||
vwl_data_device_destroy(&clip_sel->device, FALSE);
|
||||
vwl_data_offer_destroy(clip_sel->offer, TRUE);
|
||||
vwl_data_source_destroy(&clip_sel->source, FALSE);
|
||||
vwl_clipboard_free_mime_types(clip_sel);
|
||||
@ -2246,8 +2246,39 @@ wayland_cb_own_selection(
|
||||
return FAIL;
|
||||
|
||||
if (clip_sel->source.proxy != NULL)
|
||||
// We already own the selection
|
||||
return OK;
|
||||
{
|
||||
if (selection == WAYLAND_SELECTION_PRIMARY)
|
||||
// We already own the selection, ignore (only do this for primary
|
||||
// selection). We don't re set the selection because then we would
|
||||
// be setting the selection every time the user moves the visual
|
||||
// selection cursor, which is messy and inefficient.
|
||||
//
|
||||
// Vim doesn't have a mechanism to only set the selection
|
||||
// when the user stops selecting (such as the user releasing the
|
||||
// mouse button in graphical Wayland applications). So this
|
||||
// behaviour in Vim differs from other Wayland applications.
|
||||
return OK;
|
||||
else if (selection == WAYLAND_SELECTION_REGULAR)
|
||||
{
|
||||
// Technically we don't need to do this as we already own the
|
||||
// selection, however if a user yanks text a second time, the
|
||||
// text yanked won't appear in their clipboard manager if they are
|
||||
// using one.
|
||||
//
|
||||
// This can be unexpected behaviour for the user so its probably
|
||||
// better to do it this way. Additionally other Wayland applications
|
||||
// seem to set the selection every time.
|
||||
//
|
||||
// There should be no noticable performance change since its not
|
||||
// like this is running in the background constantly in Vim, only
|
||||
// runs once when the user yanks text to the system clipboard.
|
||||
vwl_data_source_destroy(&clip_sel->source, FALSE);
|
||||
vwl_display_flush(&vwl_display);
|
||||
}
|
||||
else
|
||||
// Shouldn't happen
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (!wayland_client_is_connected(FALSE) ||
|
||||
!vwl_clipboard_selection_is_ready(clip_sel))
|
||||
|
Reference in New Issue
Block a user