annotate runtime/syntax/gsp.vim @ 17302:e0d727872758 v8.1.1650

patch 8.1.1650: warning for using uninitialized variable commit https://github.com/vim/vim/commit/ee9e604124682b0cd89e4f987a2f6f3fe4160920 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 8 20:08:44 2019 +0200 patch 8.1.1650: warning for using uninitialized variable Problem: Warning for using uninitialized variable. (Tony Mechelynck) Solution: Simplify the code by always using the mouse coordinates.
author Bram Moolenaar <Bram@vim.org>
date Mon, 08 Jul 2019 20:15:05 +0200
parents 43efa4f5a8ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: GSP - GNU Server Pages (v. 0.86)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Created By: Nathaniel Harward nharward@yahoo.com
3256
ba708ee8d69d Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Changed: 2012 Jan 08 by Thilo Six
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Filenames: *.gsp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3256
diff changeset
8 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3256
diff changeset
9 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 let main_syntax = 'gsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Source HTML syntax
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3256
diff changeset
18 runtime! syntax/html.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Include Java syntax
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3256
diff changeset
24 syn include @gspJava syntax/java.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3256
ba708ee8d69d Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
26 let s:cpo_save = &cpo
ba708ee8d69d Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
27 set cpo&vim
ba708ee8d69d Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
28
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Add <java> as an HTML tag name along with its args
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword htmlTagName contained java
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword htmlArg contained type file page
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Redefine some HTML things to include (and highlight) gspInLine code in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " places where it's likely to be found
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " Define the GSP java code blocks
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region gspJavaBlock start="<java\>[^>]*\>" end="</java>"me=e-7 contains=@gspJava,htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 let b:current_syntax = "gsp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 if main_syntax == 'gsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 endif
3256
ba708ee8d69d Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
52
ba708ee8d69d Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
53 let &cpo = s:cpo_save
ba708ee8d69d Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
54 unlet s:cpo_save