diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim index 8bd7b6459ac6c..49b53313c90d8 100644 --- a/runtime/syntax/mysql.vim +++ b/runtime/syntax/mysql.vim @@ -1,10 +1,13 @@ " Vim syntax file " Language: mysql " Maintainer: Kenneth J. Pronovici -" Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $ " Filenames: *.mysql -" URL: ftp://cedar-solutions.com/software/mysql.vim -" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 +" URL: ftp://cedar-solutions.com/software/mysql.vim (https://github.com/pronovic/vim-syntax/blob/master/mysql.vim) +" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 and have been updated +" in July 2024 with the docs for version 8.4 +" Last Change: 2016 Apr 11 +" 2024-07-21: update MySQL functions as of MySQL 8.4 (by Vim Project) +" " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -92,23 +95,23 @@ syn keyword mysqlType tinytext mediumtext longtext text syn keyword mysqlType tinyblob mediumblob longblob blob syn region mysqlType start="float\W" end="."me=s-1 syn region mysqlType start="float$" end="."me=s-1 -syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="\i+0#00e0e07&|n|s|i|d|e| |b|l|o|c|k| |m|a|p@1|i|n|g|:+0#e000e06&| +0#0000000&@51 @4|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|{+0#e000e06&|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|b|a|z|}+0#e000e06&| +0#0000000&@55 @4|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|[+0#e000e06&|"+0#e000002&|f|o@1|"|:+0#e000e06&| +0#0000000&|{+0#e000e06&|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|q|u|x|}+0#e000e06&|]| +0#0000000&@46 -@2|f+0#00e0e07&|l|o|w| |c|o|l@1|e|c|t|i|o|n|:+0#e000e06&| +0#0000000&|[+0#e000e06&|f+0#0000000&|o@1| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@41 +@2|f+0#00e0e07&|l|o|w|:|c|o|l@1|e|c|t|i|o|n|:+0#e000e06&| +0#0000000&|[+0#e000e06&|f+0#0000000&|o@1| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@41 @4|,| |{+0#e000e06&|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|[+0#e000e06&|{| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@50 -@6|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|'+0#e000002&| +0#0000000&@62 +@6|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&@64 +@6|'+0#e000002&| +0#0000000&@67 | +0#e000002&@7|q|u|x| |#| |n|o|t| |c|o|m@1|e|n|t| +0#0000000&@49 | +0#e000002&@5|'| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57 @4|}+0#e000e06&|]|}|]| +0#0000000&@66 @@ -16,5 +17,4 @@ |e+0#00e0e07&|x|p|l|i|c|i|t| |m|a|p@1|i|n|g|:+0#e000e06&| +0#0000000&@57 @2|?+0#e000e06&| +0#0000000&|f|o@1| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57 @2|:+0#e000e06&| +0#0000000&|b|a|r| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57 -@2|?+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|f|o@1| @65 -@57|9|1|,|3| @9|7|8|%| +@57|9|1|,|3| @9|7@1|%| diff --git a/runtime/syntax/testdir/dumps/yaml_06.dump b/runtime/syntax/testdir/dumps/yaml_06.dump index f6c83c2c38f29..30ea7ff15a3e5 100644 --- a/runtime/syntax/testdir/dumps/yaml_06.dump +++ b/runtime/syntax/testdir/dumps/yaml_06.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@1|?+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|f|o@1| @65 +| +0&#ffffff0@1|:+0#e000e06&| +0#0000000&|b|a|r| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@57 +@2|?+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|f|o@1| @65 @4|-+0#af5f00255&| +0#0000000&|b|a|r| @65 @2|:+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|b|a|z| @65 @4|-+0#af5f00255&| +0#0000000&|q|u|x| @65 -@2|?+0#e000e06&| +0#0000000&|[+0#e000e06&|1+0#e000002&|,+0#0000000&| |2+0#e000002&|,+0#0000000&| |3+0#e000002&|]+0#e000e06&| +0#0000000&@61 -@2>:+0#e000e06&| +0#0000000&|?+0#e000e06&| +0#0000000&|1+0#e000002&| +0#0000000&@67 +@2>?+0#e000e06&| +0#0000000&|[+0#e000e06&|1+0#e000002&|,+0#0000000&| |2+0#e000002&|,+0#0000000&| |3+0#e000002&|]+0#e000e06&| +0#0000000&@61 +@2|:+0#e000e06&| +0#0000000&|?+0#e000e06&| +0#0000000&|1+0#e000002&| +0#0000000&@67 @4|:+0#e000e06&| +0#0000000&|o|n|e| @65 @4|?+0#e000e06&| +0#0000000&|2+0#e000002&| +0#0000000&@67 @4|:+0#e000e06&| +0#0000000&|-+0#af5f00255&| +0#0000000&|?+0#e000e06&| +0#0000000&|3+0#e000002&| +0#0000000&@63 @8|:+0#e000e06&| +0#0000000&|t|h|r|e@1| @59 @6|-+0#af5f00255&| +0#0000000&|{+0#e000e06&|?|4+0#00e0e07&|:+0#e000e06&| +0#0000000&|f|o|u|r|,| |?+0#e000e06&| +0#0000000&|5+0#00e0e07&|:+0#e000e06&| +0#0000000&|f|i|v|e|,| |?+0#e000e06&| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@33 @8|6+0#00e0e07&|:+0#e000e06&| +0#0000e05&|#| |c|o|m@1|e|n|t| +0#0000000&@54 -@8|{+0#e000e06&|7+0#00e0e07&|:+0#e000e06&|s+0#0000000&|e|v|e|n|}+0#e000e06&@1| +0#0000000&@56 +@8|{+0#e000e06&|7+0#0000000&|:|s|e|v|e|n|}+0#e000e06&@1| +0#0000000&@56 @75 |m+0#00e0e07&|a|p@1|i|n|g| |m|e|r|g|e|:+0#e000e06&| +0#0000000&@60 @2|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|&+0#00e0003&|f|o@1| +0#0000000&@63 @4|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&|b|a|z| @62 @2|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&@68 -@4|<+0#e000e06&@1|:| +0#0000000&|*+0#00e0003&|f|o@1| +0#0000000&@62 -@57|1|0|9|,|3| @8|9|5|%| +@57|1|0|9|,|3| @8|9|4|%| diff --git a/runtime/syntax/testdir/dumps/yaml_07.dump b/runtime/syntax/testdir/dumps/yaml_07.dump index ce0d1664d6415..ff6d9a24498d6 100644 --- a/runtime/syntax/testdir/dumps/yaml_07.dump +++ b/runtime/syntax/testdir/dumps/yaml_07.dump @@ -1,9 +1,10 @@ -| +0&#ffffff0@3|<+0#e000e06&@1|:| +0#0000000&|*+0#00e0003&|f|o@1| +0#0000000&@62 +| +0&#ffffff0@1|b+0#00e0e07&|a|r|:+0#e000e06&| +0#0000000&@68 +@4|<+0#e000e06&@1|:| +0#0000000&|*+0#00e0003&|f|o@1| +0#0000000&@62 @4|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|&+0#00e0003&|b|a|r| +0#0000000&@61 @6|f+0#00e0e07&|o@1|:+0#e000e06&| +0#0000000&|[+0#e000e06&|*+0#00e0003&|f|o@1|]+0#e000e06&| +0#0000000&@57 @4|q+0#00e0e07&|u|x|:+0#e000e06&| +0#0000000&@66 -@6|<+0#e000e06&@1|:| +0#0000000&|[+0#e000e06&|*+0#00e0003&|f|o@1|,+0#0000000&| |*+0#00e0003&|b|a|r|]+0#e000e06&| +0#0000000&@52 -@2>b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|{+0#e000e06&|<@1|:| +0#0000000&|*+0#00e0003&|f|o@1|,+0#0000000&| |q+0#00e0e07&|u|x|:+0#e000e06&| +0#0000000&|[+0#e000e06&|{|<@1| +0#0000000&|:+0#e000e06&| +0#0000000&|*+0#00e0003&|f|o@1|}+0#e000e06&|]|}| +0#0000000&@37 +@6><+0#e000e06&@1|:| +0#0000000&|[+0#e000e06&|*+0#00e0003&|f|o@1|,+0#0000000&| |*+0#00e0003&|b|a|r|]+0#e000e06&| +0#0000000&@52 +@2|b+0#00e0e07&|a|z|:+0#e000e06&| +0#0000000&|{+0#e000e06&|<@1|:| +0#0000000&|*+0#00e0003&|f|o@1|,+0#0000000&| |q+0#00e0e07&|u|x|:+0#e000e06&| +0#0000000&|[+0#e000e06&|{|<@1| +0#0000000&|:+0#e000e06&| +0#0000000&|*+0#00e0003&|f|o@1|}+0#e000e06&|]|}| +0#0000000&@37 |~+0#4040ff13&| @73 |~| @73 |~| @73 @@ -16,5 +17,4 @@ |~| @73 |~| @73 |~| @73 -|~| @73 -| +0#0000000&@56|1|2|7|,|3| @8|B|o|t| +| +0#0000000&@56|1|2|7|,|7| @8|B|o|t| diff --git a/runtime/syntax/testdir/input/yaml.yaml b/runtime/syntax/testdir/input/yaml.yaml index d87aca21135b9..72e0a0dd4f14b 100644 --- a/runtime/syntax/testdir/input/yaml.yaml +++ b/runtime/syntax/testdir/input/yaml.yaml @@ -24,7 +24,7 @@ not a number: [.nan, .NaN, .NAN] plain strings: - a b c - - a * b & c @ d# e : f # comment + - a:b & c @ d# e * f # comment - {{ f(' ') }} #8234 double quoted strings: - "" @@ -91,9 +91,10 @@ flow collection: inside block mapping: foo: {bar: baz} bar: ["foo": {baz: qux}] - flow collection: [foo # comment + flow:collection: [foo # comment , {bar: [{ # comment - baz: ' + baz: + ' qux # not comment ' # comment }]}] diff --git a/runtime/syntax/yaml.vim b/runtime/syntax/yaml.vim index 6ec806a4cb863..e992bc02e689a 100644 --- a/runtime/syntax/yaml.vim +++ b/runtime/syntax/yaml.vim @@ -129,7 +129,7 @@ syn region yamlFlowCollection matchgroup=yamlFlowIndicator start='\[' end='\]' c execute 'syn match yamlPlainScalar /'.s:ns_plain_out.'/' execute 'syn match yamlPlainScalar contained /'.s:ns_plain_in.'/' -execute 'syn match yamlFlowMappingKey /'.s:ns_plain_in.'\%(\s\+'.s:ns_plain_in.'\)*\ze\s*:/ contained '. +execute 'syn match yamlFlowMappingKey /'.s:ns_plain_in.'\%(\s\+'.s:ns_plain_in.'\)*\ze\s*:\%(\s\|$\)/ contained '. \'nextgroup=yamlFlowMappingDelimiter skipwhite' syn match yamlFlowMappingKeyStart /?/ contained nextgroup=@yamlFlowNode skipwhite syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlFlowMappingDelimiter skipwhite