annotate runtime/syntax/freebasic.vim @ 23648:b7d3c79075c5 v8.2.2366

patch 8.2.2366: when using ":sleep" the cursor is always displayed Commit: https://github.com/vim/vim/commit/e2edc2ed4a9a229870b1e1811b0ecf045b84e429 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 20:21:23 2021 +0100 patch 8.2.2366: when using ":sleep" the cursor is always displayed Problem: When using ":sleep" the cursor is always displayed. Solution: Do not display the cursor when using ":sleep!". (Jeremy Lerner, closes #7688)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Jan 2021 20:30:04 +0100
parents 8ac85adee561
children 912224cab37f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
1 " Vim syntax file
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
2 " Language: FreeBasic
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
3 " Maintainer: Mark Manning <markem@sim1.us>
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
4 " Updated: 10/9/2019
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
5 " Version: 7.0b
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
6 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
7 " Description:
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
8 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
9 " Based originally on the work done by Allan Kelly <Allan.Kelly@ed.ac.uk>
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
10 " Updated by Mark Manning <markem@sim1.us>
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
11 " Applied FreeBasic support to the already excellent support
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
12 " for standard basic syntax (like QB).
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
13 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
14 " First version based on Micro$soft QBASIC circa
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
15 " 1989, as documented in 'Learn BASIC Now' by
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
16 " Halvorson&Rygmyr. Microsoft Press 1989. This syntax file
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
17 " not a complete implementation yet. Send suggestions to
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
18 " the maintainer.
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
19 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
20 " Quit when a (custom) syntax file was already loaded (Taken from c.vim)
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
21 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
22 if exists("b:current_syntax")
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
23 finish
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
24 endif
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
25 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
26 " Be sure to turn on the "case ignore" since current versions
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
27 " of freebasic support both upper as well as lowercase
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
28 " letters. - MEM 10/1/2006
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
29 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
30 syn case ignore
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
31 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
32 " This list of keywords is taken directly from the FreeBasic
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
33 " user's guide as presented by the FreeBasic online site.
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
34 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
35 syn keyword freebasicArrays ERASE LBOUND REDIM PRESERVE UBOUND
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
36
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
37 syn keyword freebasicBitManipulation BIT BITRESET BITSET HIBYTE HIWORD LOBYTE LOWORD SHL SHR
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
38
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
39 syn keyword freebasicCompilerSwitches DEFBYTE DEFDBL DEFINT DEFLNG DEFLNGINT DEFSHORT DEFSNG DEFSTR
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
40 syn keyword freebasicCompilerSwitches DEFUBYTE DEFUINT DEFULNGINT DEFUSHORT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
41 syn match freebasicCompilerSwitches "\<option\s+\(BASE\|BYVAL\|DYNAMIC\|ESCAPE\|EXPLICIT\|NOKEYWORD\)\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
42 syn match freebasicCompilerSwitches "\<option\s+\(PRIVATE\|STATIC\)\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
43
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
44 syn region freebasicConditional start="\son\s+" skip=".*" end="gosub"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
45 syn region freebasicConditional start="\son\s+" skip=".*" end="goto"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
46 syn match freebasicConditional "\<select\s+case\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
47 syn keyword freebasicConditional if iif then case else elseif with
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
48
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
49 syn match freebasicConsole "\<open\s+\(CONS\|ERR\|PIPE\|SCRN\)\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
50 syn keyword freebasicConsole BEEP CLS CSRLIN LOCATE PRINT POS SPC TAB VIEW WIDTH
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
51
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
52 syn keyword freebasicDataTypes BYTE AS DIM CONST DOUBLE ENUM INTEGER LONG LONGINT SHARED SHORT STRING
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
53 syn keyword freebasicDataTypes SINGLE TYPE UBYTE UINTEGER ULONGINT UNION UNSIGNED USHORT WSTRING ZSTRING
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
54
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
55 syn keyword freebasicDateTime DATE DATEADD DATEDIFF DATEPART DATESERIAL DATEVALUE DAY HOUR MINUTE
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
56 syn keyword freebasicDateTime MONTH MONTHNAME NOW SECOND SETDATE SETTIME TIME TIMESERIAL TIMEVALUE
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
57 syn keyword freebasicDateTime TIMER YEAR WEEKDAY WEEKDAYNAME
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
58
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
59 syn keyword freebasicDebug ASSERT STOP
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
60
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
61 syn keyword freebasicErrorHandling ERR ERL ERROR LOCAL RESUME
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
62 syn match freebasicErrorHandling "\<resume\s+next\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
63 syn match freebasicErrorHandling "\<on\s+error\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
64
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
65 syn match freebasicFiles "\<get\s+#\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
66 syn match freebasicFiles "\<input\s+#\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
67 syn match freebasicFiles "\<line\s+input\s+#\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
68 syn match freebasicFiles "\<put\s+#\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
69 syn keyword freebasicFiles ACCESS APPEND BINARY BLOAD BSAVE CLOSE EOF FREEFILE INPUT LOC
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
70 syn keyword freebasicFiles LOCK LOF OPEN OUTPUT RANDOM RESET SEEK UNLOCK WRITE
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
71
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
72 syn keyword freebasicFunctions ALIAS ANY BYREF BYVAL CALL CDECL CONSTRUCTOR DESTRUCTOR
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
73 syn keyword freebasicFunctions DECLARE FUNCTION LIB OVERLOAD PASCAL STATIC SUB STDCALL
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
74 syn keyword freebasicFunctions VA_ARG VA_FIRST VA_NEXT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
75
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
76 syn match freebasicGraphics "\<palette\s+get\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
77 syn keyword freebasicGraphics ALPHA CIRCLE CLS COLOR CUSTOM DRAW FLIP GET
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
78 syn keyword freebasicGraphics IMAGECREATE IMAGEDESTROY LINE PAINT PALETTE PCOPY PMAP POINT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
79 syn keyword freebasicGraphics PRESET PSET PUT RGB RGBA SCREEN SCREENCOPY SCREENINFO SCREENLIST
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
80 syn keyword freebasicGraphics SCREENLOCK SCREENPTR SCREENRES SCREENSET SCREENSYNC SCREENUNLOCK
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
81 syn keyword freebasicGraphics TRANS USING VIEW WINDOW
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
82
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
83 syn match freebasicHardware "\<open\s+com\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
84 syn keyword freebasicHardware INP OUT WAIT LPT LPOS LPRINT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
85
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
86 syn keyword freebasicLogical AND EQV IMP OR NOT XOR
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
87
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
88 syn keyword freebasicMath ABS ACOS ASIN ATAN2 ATN COS EXP FIX INT LOG MOD RANDOMIZE
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
89 syn keyword freebasicMath RND SGN SIN SQR TAN
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
90
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
91 syn keyword freebasicMemory ALLOCATE CALLOCATE CLEAR DEALLOCATE FIELD FRE PEEK POKE REALLOCATE
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
92
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
93 syn keyword freebasicMisc ASM DATA LET TO READ RESTORE SIZEOF SWAP OFFSETOF
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
94
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
95 syn keyword freebasicModularizing CHAIN COMMON EXPORT EXTERN DYLIBFREE DYLIBLOAD DYLIBSYMBOL
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
96 syn keyword freebasicModularizing PRIVATE PUBLIC
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
97
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
98 syn keyword freebasicMultithreading MUTEXCREATE MUTEXDESTROY MUTEXLOCK MUTEXUNLOCK THREADCREATE THREADWAIT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
99
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
100 syn keyword freebasicShell CHDIR DIR COMMAND ENVIRON EXEC EXEPATH KILL NAME MKDIR RMDIR RUN
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
101
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
102 syn keyword freebasicEnviron SHELL SYSTEM WINDOWTITLE POINTERS
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
103
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
104 syn keyword freebasicLoops FOR LOOP WHILE WEND DO CONTINUE STEP UNTIL next
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
105
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
106 syn match freebasicInclude "\<#\s*\(inclib\|include\)\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
107 syn match freebasicInclude "\<\$\s*include\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
108
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
109 syn keyword freebasicPointer PROCPTR PTR SADD STRPTR VARPTR
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
110
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
111 syn keyword freebasicPredefined __DATE__ __FB_DOS__ __FB_LINUX__ __FB_MAIN__ __FB_MIN_VERSION__
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
112 syn keyword freebasicPredefined __FB_SIGNATURE__ __FB_VERSION__ __FB_WIN32__ __FB_VER_MAJOR__
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
113 syn keyword freebasicPredefined __FB_VER_MINOR__ __FB_VER_PATCH__ __FILE__ __FUNCTION__
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
114 syn keyword freebasicPredefined __LINE__ __TIME__
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
115
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
116 syn match freebasicPreProcessor "\<^#\s*\(define\|undef\)\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
117 syn match freebasicPreProcessor "\<^#\s*\(ifdef\|ifndef\|else\|elseif\|endif\|if\)\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
118 syn match freebasicPreProcessor "\<#\s*error\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
119 syn match freebasicPreProcessor "\<#\s*\(print\|dynamic\|static\)\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
120 syn keyword freebasicPreProcessor DEFINED ONCE
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
121
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
122 syn keyword freebasicProgramFlow END EXIT GOSUB GOTO
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
123 syn keyword freebasicProgramFlow IS RETURN SCOPE SLEEP
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
124
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
125 syn keyword freebasicString INSTR LCASE LEFT LEN LSET LTRIM MID RIGHT RSET RTRIM
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
126 syn keyword freebasicString SPACE STRING TRIM UCASE ASC BIN CHR CVD CVI CVL CVLONGINT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
127 syn keyword freebasicString CVS CVSHORT FORMAT HEX MKD MKI MKL MKLONGINT MKS MKSHORT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
128 syn keyword freebasicString OCT STR VAL VALLNG VALINT VALUINT VALULNG
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
129
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
130 syn keyword freebasicTypeCasting CAST CBYTE CDBL CINT CLNG CLNGINT CPTR CSHORT CSIGN CSNG
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
131 syn keyword freebasicTypeCasting CUBYTE CUINT CULNGINT CUNSG CURDIR CUSHORT
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
132
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
133 syn match freebasicUserInput "\<line\s+input\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
134 syn keyword freebasicUserInput GETJOYSTICK GETKEY GETMOUSE INKEY INPUT MULTIKEY SETMOUSE
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
135 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
136 " Do the Basic variables names first. This is because it
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
137 " is the most inclusive of the tests. Later on we change
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
138 " this so the identifiers are split up into the various
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
139 " types of identifiers like functions, basic commands and
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
140 " such. MEM 9/9/2006
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
141 "
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
142 syn match freebasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
143 syn match freebasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
144 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
145 " Function list
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
146 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
147 syn keyword freebasicTodo contained TODO
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
148 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
149 " Catch errors caused by wrong parenthesis
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
150 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
151 syn region freebasicParen transparent start='(' end=')' contains=ALLBUT,@freebasicParenGroup
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
152 syn match freebasicParenError ")"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
153 syn match freebasicInParen contained "[{}]"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
154 syn cluster freebasicParenGroup contains=freebasicParenError,freebasicSpecial,freebasicTodo,freebasicUserCont,freebasicUserLabel,freebasicBitField
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
155 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
156 " Integer number, or floating point number without a dot and with "f".
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
157 "
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
158 syn region freebasicHex start="&h" end="\W"
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
159 syn region freebasicHexError start="&h\x*[g-zG-Z]" end="\W"
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
160 syn region freebasicOctal start="&o" end="\W"
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
161 syn region freebasicOctalError start="&o[0-7]*[89a-zA-Z]" end="\W"
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
162 syn region freebasicBinary start="&b" end="\W"
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
163 syn region freebasicBinaryError start="&b[01]*[2-9a-zA-Z]" end="\W"
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
164 syn match freebasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>"
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
165 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
166 " Floating point number, with dot, optional exponent
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
167 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
168 syn match freebasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
169 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
170 " Floating point number, starting with a dot, optional exponent
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
171 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
172 syn match freebasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
173 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
174 " Floating point number, without dot, with exponent
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
175 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
176 syn match freebasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
177 "
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
178 " Octal number
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
179 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
180 syn case match
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
181 syn match freebasicOctal2 "\<0\o*\>"
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
182 syn match freebasicOctal2Error "\<0\o*[89a-zA-Z]"
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
183 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
184 " String and Character contstants
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
185 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
186 syn region freebasicString start='"' end='"' contains=freebasicSpecial,freebasicTodo
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
187 syn region freebasicString start="'" end="'" contains=freebasicSpecial,freebasicTodo
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
188 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
189 " Comments
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
190 "
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
191 syn match freebasicSpecial contained "\\\\."
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
192 syn region freebasicComment start="^rem" end="$" contains=freebasicSpecial,freebasicTodo
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
193 syn region freebasicComment start=":\s*rem" end="$" contains=freebasicSpecial,freebasicTodo
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
194 syn region freebasicComment start="\s*'" end="$" contains=freebasicSpecial,freebasicTodo
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
195 syn region freebasicComment start="^'" end="$" contains=freebasicSpecial,freebasicTodo
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
196 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
197 " Now do the comments and labels
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
198 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
199 syn match freebasicLabel "^\d"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
200 syn match freebasicLabel "\<^\w+:\>"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
201 syn region freebasicLineNumber start="^\d" end="\s"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
202 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
203 " Create the clusters
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
204 "
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
205 syn cluster freebasicNumber contains=freebasicHex,freebasicOctal,freebasicOctal2,freebasicBinary,freebasicInteger,freebasicFloat
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
206 syn cluster freebasicError contains=freebasicHexError,freebasicOctalError,freebasicOctal2,freebasicBinary
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
207 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
208 " Used with OPEN statement
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
209 "
18053
8ac85adee561 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 1125
diff changeset
210 syn match freebasicFilenumber "#\d\+"
1125
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
211 syn match freebasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=freebasicParen
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
212 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
213 " The default methods for highlighting. Can be overridden later
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
214 "
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
215 hi def link freebasicArrays StorageClass
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
216 hi def link freebasicBitManipulation Operator
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
217 hi def link freebasicCompilerSwitches PreCondit
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
218 hi def link freebasicConsole Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
219 hi def link freebasicDataTypes Type
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
220 hi def link freebasicDateTime Type
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
221 hi def link freebasicDebug Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
222 hi def link freebasicErrorHandling Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
223 hi def link freebasicFiles Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
224 hi def link freebasicFunctions Function
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
225 hi def link freebasicGraphics Function
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
226 hi def link freebasicHardware Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
227 hi def link freebasicLogical Conditional
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
228 hi def link freebasicMath Function
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
229 hi def link freebasicMemory Function
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
230 hi def link freebasicMisc Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
231 hi def link freebasicModularizing Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
232 hi def link freebasicMultithreading Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
233 hi def link freebasicShell Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
234 hi def link freebasicEnviron Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
235 hi def link freebasicPointer Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
236 hi def link freebasicPredefined PreProc
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
237 hi def link freebasicPreProcessor PreProc
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
238 hi def link freebasicProgramFlow Statement
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
239 hi def link freebasicString String
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
240 hi def link freebasicTypeCasting Type
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
241 hi def link freebasicUserInput Statement
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
242 hi def link freebasicComment Comment
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
243 hi def link freebasicConditional Conditional
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
244 hi def link freebasicError Error
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
245 hi def link freebasicIdentifier Identifier
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
246 hi def link freebasicInclude Include
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
247 hi def link freebasicGenericFunction Function
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
248 hi def link freebasicLabel Label
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
249 hi def link freebasicLineNumber Label
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
250 hi def link freebasicMathOperator Operator
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
251 hi def link freebasicNumber Number
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
252 hi def link freebasicSpecial Special
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
253 hi def link freebasicTodo Todo
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
254
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
255 let b:current_syntax = "freebasic"
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
256
96cd8222a819 updated for version 7.1a
vimboss
parents:
diff changeset
257 " vim: ts=8