annotate runtime/syntax/freebasic.vim @ 1602:0358abf2b5d4 v7.1.315

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