Mercurial > vim
annotate runtime/syntax/lscript.vim @ 17956:1f6d5f9ddeb0 v8.1.1974
patch 8.1.1974: Coverity warns for using pointer as array
Commit: https://github.com/vim/vim/commit/1f3165bc34c6c608584a73f13faec27dd7c7e2fa
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 4 13:21:26 2019 +0200
patch 8.1.1974: Coverity warns for using pointer as array
Problem: Coverity warns for using pointer as array.
Solution: Call var2fpos() directly instead of using f_line().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 Sep 2019 13:30:03 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: LotusScript | |
3 " Maintainer: Taryn East (taryneast@hotmail.com) | |
4 " Last Change: 2003 May 11 | |
5 | |
6 " This is a rough amalgamation of the visual basic syntax file, and the UltraEdit | |
7 " and Textpad syntax highlighters. | |
8 " It's not too brilliant given that a) I've never written a syntax.vim file before | |
9 " and b) I'm not so crash hot at LotusScript either. If you see any problems | |
10 " feel free to email me with them. | |
11 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
12 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
13 if exists("b:current_syntax") |
7 | 14 finish |
15 endif | |
16 | |
17 " LotusScript is case insensitive | |
18 syn case ignore | |
19 | |
20 " These are Notes thingies that had an equivalent in the vb highlighter | |
21 " or I was already familiar with them | |
22 syn keyword lscriptStatement ActivateApp As And Base Beep Call Case ChDir ChDrive Class | |
23 syn keyword lscriptStatement Const Dim Declare DefCur DefDbl DefInt DefLng DefSng DefStr | |
24 syn keyword lscriptStatement DefVar Do Else %Else ElseIf %ElseIf End %End Erase Event Exit | |
25 syn keyword lscriptStatement Explicit FileCopy FALSE For ForAll Function Get GoTo GoSub | |
26 syn keyword lscriptStatement If %If In Is Kill Let List Lock Loop MkDir | |
27 syn keyword lscriptStatement Name Next New NoCase NoPitch Not Nothing NULL | |
28 syn keyword lscriptStatement On Option Or PI Pitch Preserve Private Public | |
29 syn keyword lscriptStatement Property Public Put | |
30 syn keyword lscriptStatement Randomize ReDim Reset Resume Return RmDir | |
31 syn keyword lscriptStatement Select SendKeys SetFileAttr Set Static Sub Then To TRUE | |
32 syn keyword lscriptStatement Type Unlock Until While WEnd With Write XOr | |
33 | |
34 syn keyword lscriptDatatype Array Currency Double Integer Long Single String String$ Variant | |
35 | |
36 syn keyword lscriptNotesType Field Button Navigator | |
37 syn keyword lscriptNotesType NotesACL NotesACLEntry NotesAgent NotesDatabase NotesDateRange | |
38 syn keyword lscriptNotesType NotesDateTime NotesDbDirectory NotesDocument | |
39 syn keyword lscriptNotesType NotesDocumentCollection NotesEmbeddedObject NotesForm | |
40 syn keyword lscriptNotesType NotesInternational NotesItem NotesLog NotesName NotesNewsLetter | |
41 syn keyword lscriptNotesType NotesMIMEEntry NotesOutline NotesOutlineEntry NotesRegistration | |
42 syn keyword lscriptNotesType NotesReplication NotesRichTextItem NotesRichTextParagraphStyle | |
43 syn keyword lscriptNotesType NotesRichTextStyle NotesRichTextTab | |
44 syn keyword lscriptNotesType NotesSession NotesTimer NotesView NotesViewColumn NotesViewEntry | |
45 syn keyword lscriptNotesType NotesViewEntryCollection NotesViewNavigator NotesUIDatabase | |
46 syn keyword lscriptNotesType NotesUIDocument NotesUIView NotesUIWorkspace | |
47 | |
48 syn keyword lscriptNotesConst ACLLEVEL_AUTHOR ACLLEVEL_DEPOSITOR ACLLEVEL_DESIGNER | |
49 syn keyword lscriptNotesConst ACLLEVEL_EDITOR ACLLEVEL_MANAGER ACLLEVEL_NOACCESS | |
50 syn keyword lscriptNotesConst ACLLEVEL_READER ACLTYPE_MIXED_GROUP ACLTYPE_PERSON | |
51 syn keyword lscriptNotesConst ACLTYPE_PERSON_GROUP ACLTYPE_SERVER ACLTYPE_SERVER_GROUP | |
52 syn keyword lscriptNotesConst ACLTYPE_UNSPECIFIED ACTIONCD ALIGN_CENTER | |
53 syn keyword lscriptNotesConst ALIGN_FULL ALIGN_LEFT ALIGN_NOWRAP ALIGN_RIGHT | |
54 syn keyword lscriptNotesConst ASSISTANTINFO ATTACHMENT AUTHORS COLOR_BLACK | |
55 syn keyword lscriptNotesConst COLOR_BLUE COLOR_CYAN COLOR_DARK_BLUE COLOR_DARK_CYAN | |
56 syn keyword lscriptNotesConst COLOR_DARK_GREEN COLOR_DARK_MAGENTA COLOR_DARK_RED | |
57 syn keyword lscriptNotesConst COLOR_DARK_YELLOW COLOR_GRAY COLOR_GREEN COLOR_LIGHT_GRAY | |
58 syn keyword lscriptNotesConst COLOR_MAGENTA COLOR_RED COLOR_WHITE COLOR_YELLOW | |
59 syn keyword lscriptNotesConst DATABASE DATETIMES DB_REPLICATION_PRIORITY_HIGH | |
60 syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_LOW DB_REPLICATION_PRIORITY_MED | |
61 syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_NOTSET EFFECTS_EMBOSS | |
62 syn keyword lscriptNotesConst EFFECTS_EXTRUDE EFFECTS_NONE EFFECTS_SHADOW | |
63 syn keyword lscriptNotesConst EFFECTS_SUBSCRIPT EFFECTS_SUPERSCRIPT EMBED_ATTACHMENT | |
64 syn keyword lscriptNotesConst EMBED_OBJECT EMBED_OBJECTLINK EMBEDDEDOBJECT ERRORITEM | |
65 syn keyword lscriptNotesConst EV_ALARM EV_COMM EV_MAIL EV_MISC EV_REPLICA EV_RESOURCE | |
66 syn keyword lscriptNotesConst EV_SECURITY EV_SERVER EV_UNKNOWN EV_UPDATE FONT_COURIER | |
67 syn keyword lscriptNotesConst FONT_HELV FONT_ROMAN FORMULA FT_DATABASE FT_DATE_ASC | |
68 syn keyword lscriptNotesConst FT_DATE_DES FT_FILESYSTEM FT_FUZZY FT_SCORES FT_STEMS | |
69 syn keyword lscriptNotesConst FT_THESAURUS HTML ICON ID_CERTIFIER ID_FLAT | |
70 syn keyword lscriptNotesConst ID_HIERARCHICAL LSOBJECT MIME_PART NAMES NOTESLINKS | |
71 syn keyword lscriptNotesConst NOTEREFS NOTES_DESKTOP_CLIENT NOTES_FULL_CLIENT | |
72 syn keyword lscriptNotesConst NOTES_LIMITED_CLIENT NUMBERS OTHEROBJECT | |
73 syn keyword lscriptNotesConst OUTLINE_CLASS_DATABASE OUTLINE_CLASS_DOCUMENT | |
74 syn keyword lscriptNotesConst OUTLINE_CLASS_FOLDER OUTLINE_CLASS_FORM | |
75 syn keyword lscriptNotesConst OUTLINE_CLASS_FRAMESET OUTLINE_CLASS_NAVIGATOR | |
76 syn keyword lscriptNotesConst OUTLINE_CLASS_PAGE OUTLINE_CLASS_UNKNOWN | |
77 syn keyword lscriptNotesConst OUTLINE_CLASS_VIEW OUTLINE_OTHER_FOLDERS_TYPE | |
78 syn keyword lscriptNotesConst OUTLINE_OTHER_UNKNOWN_TYPE OUTLINE_OTHER_VIEWS_TYPE | |
79 syn keyword lscriptNotesConst OUTLINE_TYPE_ACTION OUTLINE_TYPE_NAMEDELEMENT | |
80 syn keyword lscriptNotesConst OUTLINE_TYPE_NOTELINK OUTLINE_TYPE_URL PAGINATE_BEFORE | |
81 syn keyword lscriptNotesConst PAGINATE_DEFAULT PAGINATE_KEEP_TOGETHER | |
82 syn keyword lscriptNotesConst PAGINATE_KEEP_WITH_NEXT PICKLIST_CUSTOM PICKLIST_NAMES | |
83 syn keyword lscriptNotesConst PICKLIST_RESOURCES PICKLIST_ROOMS PROMPT_OK PROMPT_OKCANCELCOMBO | |
84 syn keyword lscriptNotesConst PROMPT_OKCANCELEDIT PROMPT_OKCANCELEDITCOMBO PROMPT_OKCANCELLIST | |
85 syn keyword lscriptNotesConst PROMPT_OKCANCELLISTMULT PROMPT_PASSWORD PROMPT_YESNO | |
86 syn keyword lscriptNotesConst PROMPT_YESNOCANCEL QUERYCD READERS REPLICA_CANDIDATE | |
87 syn keyword lscriptNotesConst RICHTEXT RULER_ONE_CENTIMETER RULER_ONE_INCH SEV_FAILURE | |
88 syn keyword lscriptNotesConst SEV_FATAL SEV_NORMAL SEV_WARNING1 SEV_WARNING2 | |
89 syn keyword lscriptNotesConst SIGNATURE SPACING_DOUBLE SPACING_ONE_POINT_50 | |
90 syn keyword lscriptNotesConst SPACING_SINGLE STYLE_NO_CHANGE TAB_CENTER TAB_DECIMAL | |
91 syn keyword lscriptNotesConst TAB_LEFT TAB_RIGHT TARGET_ALL_DOCS TARGET_ALL_DOCS_IN_VIEW | |
92 syn keyword lscriptNotesConst TARGET_NEW_DOCS TARGET_NEW_OR_MODIFIED_DOCS TARGET_NONE | |
93 syn keyword lscriptNotesConst TARGET_RUN_ONCE TARGET_SELECTED_DOCS TARGET_UNREAD_DOCS_IN_VIEW | |
94 syn keyword lscriptNotesConst TEMPLATE TEMPLATE_CANDIDATE TEXT TRIGGER_AFTER_MAIL_DELIVERY | |
95 syn keyword lscriptNotesConst TRIGGER_BEFORE_MAIL_DELIVERY TRIGGER_DOC_PASTED | |
96 syn keyword lscriptNotesConst TRIGGER_DOC_UPDATE TRIGGER_MANUAL TRIGGER_NONE | |
97 syn keyword lscriptNotesConst TRIGGER_SCHEDULED UNAVAILABLE UNKNOWN USERDATA | |
98 syn keyword lscriptNotesConst USERID VC_ALIGN_CENTER VC_ALIGN_LEFT VC_ALIGN_RIGHT | |
99 syn keyword lscriptNotesConst VC_ATTR_PARENS VC_ATTR_PUNCTUATED VC_ATTR_PERCENT | |
100 syn keyword lscriptNotesConst VC_FMT_ALWAYS VC_FMT_CURRENCY VC_FMT_DATE VC_FMT_DATETIME | |
101 syn keyword lscriptNotesConst VC_FMT_FIXED VC_FMT_GENERAL VC_FMT_HM VC_FMT_HMS | |
102 syn keyword lscriptNotesConst VC_FMT_MD VC_FMT_NEVER VC_FMT_SCIENTIFIC | |
103 syn keyword lscriptNotesConst VC_FMT_SOMETIMES VC_FMT_TIME VC_FMT_TODAYTIME VC_FMT_YM | |
104 syn keyword lscriptNotesConst VC_FMT_YMD VC_FMT_Y4M VC_FONT_BOLD VC_FONT_ITALIC | |
105 syn keyword lscriptNotesConst VC_FONT_STRIKEOUT VC_FONT_UNDERLINE VC_SEP_COMMA | |
106 syn keyword lscriptNotesConst VC_SEP_NEWLINE VC_SEP_SEMICOLON VC_SEP_SPACE | |
107 syn keyword lscriptNotesConst VIEWMAPDATA VIEWMAPLAYOUT VW_SPACING_DOUBLE | |
108 syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_25 VW_SPACING_ONE_POINT_50 | |
109 syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_75 VW_SPACING_SINGLE | |
110 | |
111 syn keyword lscriptFunction Abs Asc Atn Atn2 ACos ASin | |
112 syn keyword lscriptFunction CCur CDat CDbl Chr Chr$ CInt CLng Command Command$ | |
113 syn keyword lscriptFunction Cos CSng CStr | |
114 syn keyword lscriptFunction CurDir CurDir$ CVar Date Date$ DateNumber DateSerial DateValue | |
115 syn keyword lscriptFunction Day Dir Dir$ Environ$ Environ EOF Error Error$ Evaluate Exp | |
116 syn keyword lscriptFunction FileAttr FileDateTime FileLen Fix Format Format$ FreeFile | |
117 syn keyword lscriptFunction GetFileAttr GetThreadInfo Hex Hex$ Hour | |
118 syn keyword lscriptFunction IMESetMode IMEStatus Input Input$ InputB InputB$ | |
119 syn keyword lscriptFunction InputBP InputBP$ InputBox InputBox$ InStr InStrB InStrBP InstrC | |
120 syn keyword lscriptFunction IsA IsArray IsDate IsElement IsList IsNumeric | |
121 syn keyword lscriptFunction IsObject IsResponse IsScalar IsUnknown LCase LCase$ | |
122 syn keyword lscriptFunction Left Left$ LeftB LeftB$ LeftC | |
123 syn keyword lscriptFunction LeftBP LeftBP$ Len LenB LenBP LenC Loc LOF Log | |
124 syn keyword lscriptFunction LSet LTrim LTrim$ MessageBox Mid Mid$ MidB MidB$ MidC | |
125 syn keyword lscriptFunction Minute Month Now Oct Oct$ Responses Right Right$ | |
126 syn keyword lscriptFunction RightB RightB$ RightBP RightBP$ RightC Round Rnd RSet RTrim RTrim$ | |
127 syn keyword lscriptFunction Second Seek Sgn Shell Sin Sleep Space Space$ Spc Sqr Str Str$ | |
128 syn keyword lscriptFunction StrConv StrLeft StrleftBack StrRight StrRightBack | |
129 syn keyword lscriptFunction StrCompare Tab Tan Time Time$ TimeNumber Timer | |
130 syn keyword lscriptFunction TimeValue Trim Trim$ Today TypeName UCase UCase$ | |
131 syn keyword lscriptFunction UniversalID Val Weekday Year | |
132 | |
133 syn keyword lscriptMethods AppendToTextList ArrayAppend ArrayReplace ArrayGetIndex | |
134 syn keyword lscriptMethods Append Bind Close | |
135 "syn keyword lscriptMethods Contains | |
136 syn keyword lscriptMethods CopyToDatabase CopyAllItems Count CurrentDatabase Delete Execute | |
137 syn keyword lscriptMethods GetAllDocumentsByKey GetDatabase GetDocumentByKey | |
138 syn keyword lscriptMethods GetDocumentByUNID GetFirstDocument GetFirstItem | |
139 syn keyword lscriptMethods GetItems GetItemValue GetNthDocument GetView | |
140 syn keyword lscriptMethods IsEmpty IsNull %Include Items | |
141 syn keyword lscriptMethods Line LBound LoadMsgText Open Print | |
142 syn keyword lscriptMethods RaiseEvent ReplaceItemValue Remove RemoveItem Responses | |
143 syn keyword lscriptMethods Save Stop UBound UnprocessedDocuments Write | |
144 | |
145 syn keyword lscriptEvents Compare OnError | |
146 | |
147 "************************************************************************************* | |
148 "These are Notes thingies that I'm not sure how to classify as they had no vb equivalent | |
149 " At a wild guess I'd put them as Functions... | |
150 " if anyone sees something really out of place... tell me! | |
151 | |
152 syn keyword lscriptFunction Access Alias Any Bin Bin$ Binary ByVal | |
153 syn keyword lscriptFunction CodeLock CodeLockCheck CodeUnlock CreateLock | |
154 syn keyword lscriptFunction CurDrive CurDrive$ DataType DestroyLock Eqv | |
155 syn keyword lscriptFunction Erl Err Fraction From FromFunction FullTrim | |
156 syn keyword lscriptFunction Imp Int Lib Like ListTag LMBCS LSServer Me | |
157 syn keyword lscriptFunction Mod MsgDescription MsgText Output Published | |
158 syn keyword lscriptFunction Random Read Shared Step UChr UChr$ Uni Unicode | |
159 syn keyword lscriptFunction Until Use UseLSX UString UString$ Width Yield | |
160 | |
161 | |
162 syn keyword lscriptTodo contained TODO | |
163 | |
164 "integer number, or floating point number without a dot. | |
165 syn match lscriptNumber "\<\d\+\>" | |
166 "floating point number, with dot | |
167 syn match lscriptNumber "\<\d\+\.\d*\>" | |
168 "floating point number, starting with a dot | |
169 syn match lscriptNumber "\.\d\+\>" | |
170 | |
171 " String and Character constants | |
172 syn region lscriptString start=+"+ end=+"+ | |
173 syn region lscriptComment start="REM" end="$" contains=lscriptTodo | |
174 syn region lscriptComment start="'" end="$" contains=lscriptTodo | |
175 syn region lscriptLineNumber start="^\d" end="\s" | |
176 syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 | |
177 | |
178 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
179 " Only when an item doesn't have highlighting yet |
7 | 180 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
181 hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold |
7 | 182 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
183 hi def link lscriptNotesConst lscriptNotesType |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
184 hi def link lscriptLineNumber Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
185 hi def link lscriptDatatype Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
186 hi def link lscriptNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
187 hi def link lscriptError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
188 hi def link lscriptStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
189 hi def link lscriptString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
190 hi def link lscriptComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
191 hi def link lscriptTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
192 hi def link lscriptFunction Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
193 hi def link lscriptMethods PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
194 hi def link lscriptEvents Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
195 hi def link lscriptTypeSpecifier Type |
7 | 196 |
197 | |
198 let b:current_syntax = "lscript" | |
199 | |
200 " vim: ts=8 |