2014-07-10 21:05:51 -07:00
|
|
|
" Vim syntax file
|
2023-12-06 00:51:09 -07:00
|
|
|
" Language: Fortran 2008 (and Fortran 2003, 95, 90, and 77)
|
|
|
|
" Version: (v106) 2023 December 4
|
|
|
|
" Maintainers: Ajit J. Thakkar <ajit@unb.ca>; <https://ajit.ext.unb.ca/>
|
|
|
|
" Joshua Hollett <j.hollett@uwinnipeg.ca>
|
2014-07-10 21:05:51 -07:00
|
|
|
" Usage: For instructions, do :help fortran-syntax from Vim
|
|
|
|
" Credits:
|
2021-05-01 11:08:45 -07:00
|
|
|
" Version 0.1 for Fortran 95 was created in April 2000 by Ajit Thakkar from an
|
|
|
|
" older Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
|
2021-04-24 13:52:46 -07:00
|
|
|
" Since then, useful suggestions and contributions have been made, in order, by:
|
2016-06-19 21:10:08 -07:00
|
|
|
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
|
2021-05-02 08:52:52 -07:00
|
|
|
" Walter Dieudonne, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
2017-04-16 08:42:41 -07:00
|
|
|
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
2021-05-02 08:52:52 -07:00
|
|
|
" Stefano Zaghi, Vishnu V. Krishnan, Judicael Grasset, Takuma Yoshida,
|
2023-12-06 00:51:09 -07:00
|
|
|
" Eisuke Kawashima, Andre Chalella, Fritz Reese, Karl D. Hammond,
|
|
|
|
" and Michele Esposito Marzino.
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
if exists("b:current_syntax")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
|
|
|
let s:cpo_save = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
|
|
|
" Choose between fixed and free source form if this hasn't been done yet
|
|
|
|
if !exists("b:fortran_fixed_source")
|
2023-12-06 00:51:09 -07:00
|
|
|
if exists("fortran_free_source")
|
2014-07-10 21:05:51 -07:00
|
|
|
" User guarantees free source form for all fortran files
|
|
|
|
let b:fortran_fixed_source = 0
|
|
|
|
elseif exists("fortran_fixed_source")
|
|
|
|
" User guarantees fixed source form for all fortran files
|
|
|
|
let b:fortran_fixed_source = 1
|
2021-04-27 20:14:29 -07:00
|
|
|
elseif expand("%:e") =~? '^f\%(90\|95\|03\|08\)$'
|
2016-05-03 12:16:53 -07:00
|
|
|
" Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers
|
|
|
|
let b:fortran_fixed_source = 0
|
2021-04-27 20:14:29 -07:00
|
|
|
elseif expand("%:e") =~? '^\%(f\|f77\|for\)$'
|
2016-05-03 12:16:53 -07:00
|
|
|
" Fixed-form file extension defaults
|
|
|
|
let b:fortran_fixed_source = 1
|
2014-07-10 21:05:51 -07:00
|
|
|
else
|
2023-12-06 00:51:09 -07:00
|
|
|
" Modern fortran compilers still allow both free and fixed source form.
|
2014-07-10 21:05:51 -07:00
|
|
|
" Assume fixed source form unless signs of free source form
|
|
|
|
" are detected in the first five columns of the first s:lmax lines.
|
|
|
|
" Detection becomes more accurate and time-consuming if more lines
|
|
|
|
" are checked. Increase the limit below if you keep lots of comments at
|
|
|
|
" the very top of each file and you have a fast computer.
|
|
|
|
let s:lmax = 500
|
|
|
|
if ( s:lmax > line("$") )
|
|
|
|
let s:lmax = line("$")
|
|
|
|
endif
|
|
|
|
let b:fortran_fixed_source = 1
|
|
|
|
let s:ln=1
|
|
|
|
while s:ln <= s:lmax
|
|
|
|
let s:test = strpart(getline(s:ln),0,5)
|
|
|
|
if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t'
|
2016-05-03 12:16:53 -07:00
|
|
|
let b:fortran_fixed_source = 0
|
|
|
|
break
|
2014-07-10 21:05:51 -07:00
|
|
|
endif
|
|
|
|
let s:ln = s:ln + 1
|
|
|
|
endwhile
|
|
|
|
unlet! s:lmax s:ln s:test
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
syn case ignore
|
|
|
|
|
|
|
|
if b:fortran_fixed_source == 1
|
|
|
|
syn match fortranConstructName "^\s\{6,}\zs\a\w*\ze\s*:"
|
|
|
|
else
|
|
|
|
syn match fortranConstructName "^\s*\zs\a\w*\ze\s*:"
|
|
|
|
endif
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranConstructName "\(\<end\s*do\s\+\)\@11<=\a\w*"
|
|
|
|
syn match fortranConstructName "\(\<end\s*if\s\+\)\@11<=\a\w*"
|
|
|
|
syn match fortranConstructName "\(\<end\s*select\s\+\)\@15<=\a\w*"
|
|
|
|
syn match fortranConstructName "\(\<\%(exit\|cycle\)\s\+\)\@11<=\a\w*"
|
|
|
|
|
|
|
|
syn match fortranUserUnit "\(\(end\s*\)\?\(subroutine\|function\|module\|program\|submodule\|block\)\s\+\)\@12<=\a\w\+"
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2023-08-15 15:28:29 -07:00
|
|
|
syn match fortranType "\<character\((\s*kind\s*=\w\+)\)\?\>"
|
|
|
|
syn match fortranType "\<complex\((\s*kind\s*=\w\+)\)\?\>"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn keyword fortranType intrinsic
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranType "\<implicit\>\s\+\(none\(\s\+\<external\|type\>\)\?\)\?"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn keyword fortranStructure dimension
|
|
|
|
syn keyword fortranStorageClass parameter save
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranCall "call\s\+\a\w*"
|
|
|
|
syn match fortranUnitHeader "\(end\s*\)\?\(subroutine\|function\|module\|program\|submodule\|block\)"
|
|
|
|
syn keyword fortranKeyword return
|
|
|
|
syn match fortranKeyword "\(error\s\+\)\=stop"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn keyword fortranConditional else then
|
|
|
|
syn match fortranConditional "\<if\>"
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranConditionalDel "\<if\s*(.*)\s*\d\+\s*,\s*\d\+\s*,\s*\d\+\s*$"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn match fortranRepeat "\<do\>"
|
|
|
|
|
2023-12-06 00:51:09 -07:00
|
|
|
syn keyword fortranTodo contained bug note debug todo fixme
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
"Catch errors caused by too many right parentheses
|
|
|
|
syn region fortranParen transparent start="(" end=")" contains=ALLBUT,fortranParenError,@fortranCommentGroup,cIncluded,@spell
|
|
|
|
syn match fortranParenError ")"
|
|
|
|
|
|
|
|
syn match fortranOperator "\.\s*n\=eqv\s*\."
|
|
|
|
syn match fortranOperator "\.\s*\(and\|or\|not\)\s*\."
|
|
|
|
syn match fortranOperator "\(+\|-\|/\|\*\)"
|
|
|
|
syn match fortranTypeOb "\<character\s*\*"
|
|
|
|
|
|
|
|
syn match fortranBoolean "\.\s*\(true\|false\)\s*\."
|
|
|
|
|
2023-08-15 15:28:29 -07:00
|
|
|
syn keyword fortranReadWrite print
|
|
|
|
syn match fortranReadWrite '\<\(backspace\|close\|endfile\|inquire\|open\|read\|rewind\|write\)\ze\s*('
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
"If tabs are allowed then the left margin checks do not work
|
|
|
|
if exists("fortran_have_tabs")
|
|
|
|
syn match fortranTab "\t" transparent
|
|
|
|
else
|
|
|
|
syn match fortranTab "\t"
|
|
|
|
endif
|
|
|
|
|
2023-08-15 15:28:29 -07:00
|
|
|
syn match fortranIO '\%(\((\|,\|, *&\n\)\s*\)\@<=\(access\|blank\|direct\|exist\|file\|fmt\|form\|formatted\|iostat\|name\|named\|nextrec\|number\|opened\|rec\|recl\|sequential\|status\|unformatted\|unit\)\ze\s*='
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
" Intrinsics provided by some vendors
|
|
|
|
syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh
|
|
|
|
|
|
|
|
syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh
|
|
|
|
syn match fortranIntrinsic "\<len\s*[(,]"me=s+3
|
|
|
|
syn match fortranIntrinsic "\<real\s*("me=s+4
|
|
|
|
syn match fortranIntrinsic "\<logical\s*("me=s+7
|
2023-12-06 00:51:09 -07:00
|
|
|
" F2018 and F2023
|
|
|
|
syn keyword fortranIntrinsic out_of_range reduce random_init lcobound ucobound this_image coshape selected_logical_kind
|
|
|
|
syn keyword fortranIntrinsic ieee_max ieee_max_mag ieee_min ieee_min_mag split tokenize
|
|
|
|
syn keyword fortranIntrinsic acosd asind atand atan2d cosd sind tand acospi asinpi atanpi atan2pi cospi sinpi tanpi
|
|
|
|
|
2023-08-15 15:28:29 -07:00
|
|
|
syn match fortranType "\<type\>\(\s\+is\>\)\?"
|
|
|
|
syn match fortranType "^\s*\(type\s\+\(is\)\? \)\?\s*\(real\|integer\|logical\|complex\|character\)\>"
|
|
|
|
syn match fortranType "^\s*\(implicit \)\?\s*\(real\|integer\|logical\|complex\|character\)\>"
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
"Numbers of various sorts
|
|
|
|
" Integers
|
|
|
|
syn match fortranNumber display "\<\d\+\(_\a\w*\)\=\>"
|
|
|
|
" floating point number, without a decimal point
|
|
|
|
syn match fortranFloatIll display "\<\d\+[deq][-+]\=\d\+\(_\a\w*\)\=\>"
|
|
|
|
" floating point number, starting with a decimal point
|
|
|
|
syn match fortranFloatIll display "\.\d\+\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
|
|
|
" floating point number, no digits after decimal
|
|
|
|
syn match fortranFloatIll display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
|
|
|
" floating point number, D or Q exponents
|
|
|
|
syn match fortranFloatIll display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
|
|
|
" floating point number
|
|
|
|
syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
2021-05-01 11:08:45 -07:00
|
|
|
" binary number
|
|
|
|
syn match fortranBinary display "b["'][01]\+["']"
|
|
|
|
" octal number
|
|
|
|
syn match fortranOctal display "o["'][0-7]\+["']"
|
|
|
|
" hexadecimal number
|
|
|
|
syn match fortranHex display "z["'][0-9A-F]\+["']"
|
2014-07-10 21:05:51 -07:00
|
|
|
" Numbers in formats
|
|
|
|
syn match fortranFormatSpec display "\d*f\d\+\.\d\+"
|
|
|
|
syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\(e\d+\>\)\="
|
|
|
|
syn match fortranFormatSpec display "\d*\(d\|q\|g\)\d\+\.\d\+\(e\d+\)\="
|
|
|
|
syn match fortranFormatSpec display "\d\+x\>"
|
|
|
|
" The next match cannot be used because it would pick up identifiers as well
|
|
|
|
" syn match fortranFormatSpec display "\<\(a\|i\)\d\+"
|
|
|
|
|
|
|
|
" Numbers as labels
|
|
|
|
syn match fortranLabelNumber display "^\d\{1,5}\s"me=e-1
|
|
|
|
syn match fortranLabelNumber display "^ \d\{1,4}\s"ms=s+1,me=e-1
|
|
|
|
syn match fortranLabelNumber display "^ \d\{1,3}\s"ms=s+2,me=e-1
|
|
|
|
syn match fortranLabelNumber display "^ \d\d\=\s"ms=s+3,me=e-1
|
|
|
|
syn match fortranLabelNumber display "^ \d\s"ms=s+4,me=e-1
|
|
|
|
|
2023-12-06 00:51:09 -07:00
|
|
|
" Numbers as targets
|
|
|
|
syn match fortranTarget display "\(\<if\s*(.\+)\s*\)\@<=\(\d\+\s*,\s*\)\{2}\d\+\>"
|
|
|
|
syn match fortranTarget display "\(\<do\s\+\)\@11<=\d\+\>"
|
|
|
|
syn match fortranTarget display "\(\<go\s*to\s*(\=\)\@11<=\(\d\+\s*,\s*\)*\d\+\>"
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
syn keyword fortranTypeR external
|
|
|
|
syn keyword fortranIOR format
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranKeyword "\<continue\>"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn match fortranKeyword "^\s*\d\+\s\+continue\>"
|
|
|
|
syn match fortranKeyword "\<go\s*to\>"
|
|
|
|
syn match fortranKeywordDel "\<go\s*to\ze\s\+.*,\s*(.*$"
|
|
|
|
syn match fortranKeywordOb "\<go\s*to\ze\s*(\d\+.*$"
|
2023-12-06 00:51:09 -07:00
|
|
|
syn region fortranString start=+'+ end=+'+ contains=fortranContinueMark,fortranLeftMargin,fortranSerialNumber
|
2014-07-10 21:05:51 -07:00
|
|
|
syn keyword fortranKeywordDel assign pause
|
|
|
|
|
|
|
|
syn keyword fortranStructure private public intent optional
|
|
|
|
syn keyword fortranStructure pointer target allocatable
|
|
|
|
syn keyword fortranStorageClass in out
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranStorageClass "\<in\s*out\>"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn match fortranStorageClass "\<kind\s*="me=s+4
|
|
|
|
syn match fortranStorageClass "\<len\s*="me=s+3
|
|
|
|
|
|
|
|
syn keyword fortranUnitHeader use only contains
|
|
|
|
syn keyword fortranUnitHeader result operator assignment
|
|
|
|
syn match fortranUnitHeader "\<interface\>"
|
|
|
|
syn keyword fortranKeyword allocate deallocate nullify cycle exit
|
|
|
|
syn match fortranConditional "\<select\>"
|
2023-08-15 15:28:29 -07:00
|
|
|
syn match fortranConditional "\<case\s\+default\>"
|
|
|
|
syn keyword fortranConditional where elsewhere
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
syn match fortranOperator "\(\(>\|<\)=\=\|==\|/=\|=\)"
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranOperator "\(%\|?\|=>\)"
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber
|
|
|
|
syn keyword fortranIO pad position action delim readwrite
|
|
|
|
syn keyword fortranIO eor advance nml
|
|
|
|
|
2023-08-15 15:28:29 -07:00
|
|
|
syn match fortranIntrinsic '\<\(adjustl\|adjustr\|all\|allocated\|any\|associated\|bit_size\|btest\|ceiling\|count\|cshift\|date_and_time\|digits\|dot_product\|eoshift\|epsilon\|exponent\|floor\|fraction\|huge\|iand\|ibclr\|ibits\|ibset\|ieor\|ior\|ishft\|ishftc\|lbound\|len_trim\|matmul\|maxexponent\|maxloc\|maxval\|merge\|minexponent\|minloc\|minval\|modulo\|mvbits\|nearest\|pack\|precision\|present\|product\|radix\|random_number\|random_seed\|range\|repeat\|reshape\|rrspacing\|scale\|scan\|selected_int_kind\|selected_real_kind\|set_exponent\|shape\|size\|spacing\|spread\|sum\|system_clock\|tiny\|transpose\|trim\|ubound\|unpack\|verify\)\>\ze\s*('
|
2014-07-10 21:05:51 -07:00
|
|
|
syn match fortranIntrinsic "\<not\>\(\s*\.\)\@!"me=s+3
|
|
|
|
syn match fortranIntrinsic "\<kind\>\s*[(,]"me=s+4
|
|
|
|
|
|
|
|
syn match fortranUnitHeader "\<end\s*interface"
|
|
|
|
syn match fortranRepeat "\<end\s*do"
|
|
|
|
syn match fortranConditional "\<end\s*where"
|
|
|
|
syn match fortranConditional "\<select\s*case"
|
|
|
|
syn match fortranConditional "\<end\s*select"
|
|
|
|
syn match fortranType "\<end\s*type"
|
|
|
|
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranType "\(end\s\+\)\?\(\<module\s\+\)\?procedure\>"
|
2014-07-10 21:05:51 -07:00
|
|
|
syn keyword fortranIOR namelist
|
|
|
|
syn keyword fortranConditionalR while
|
2023-12-06 00:51:09 -07:00
|
|
|
syn keyword fortranIntrinsicR achar iachar transfer dble dprod dim lge lgt lle llt mod
|
|
|
|
syn keyword fortranIntrinsicOb alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
syn keyword fortranInclude include
|
|
|
|
syn keyword fortranStorageClassR sequence
|
|
|
|
|
|
|
|
syn match fortranConditional "\<end\s*if"
|
|
|
|
syn match fortranIO contains=fortranOperator "\<e\(nd\|rr\)\s*=\s*\d\+"
|
|
|
|
syn match fortranConditional "\<else\s*if"
|
|
|
|
|
|
|
|
syn keyword fortranUnitHeaderOb entry
|
|
|
|
syn match fortranTypeR display "double\s\+precision"
|
|
|
|
syn match fortranTypeR display "double\s\+complex"
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranUnitHeaderOb display "block\s\+data"
|
|
|
|
syn match fortranStorageClass "^\s*data\>\(\s\+\a\w*\s*/\)\@="
|
|
|
|
syn match fortranStorageClassOb "^\s*common\>\(\s*/\)\@="
|
|
|
|
syn keyword fortranStorageClassOb equivalence
|
2014-07-10 21:05:51 -07:00
|
|
|
syn match fortranOperatorR "\.\s*[gl][et]\s*\."
|
|
|
|
syn match fortranOperatorR "\.\s*\(eq\|ne\)\s*\."
|
|
|
|
|
2023-12-06 00:51:09 -07:00
|
|
|
syn keyword fortranRepeatOb forall
|
|
|
|
syn match fortranRepeatOb "\<end\s*forall"
|
|
|
|
syn keyword fortranIntrinsic null cpu_time
|
2014-07-10 21:05:51 -07:00
|
|
|
syn match fortranType "\<elemental\>"
|
|
|
|
syn match fortranType "\<pure\>"
|
2017-04-16 08:42:41 -07:00
|
|
|
syn match fortranType "\<impure\>"
|
2021-05-01 11:08:45 -07:00
|
|
|
syn match fortranType "\<recursive\>"
|
2023-12-06 00:51:09 -07:00
|
|
|
syn match fortranConstructNameOb "\(\<end\s*forall\s\+\)\@15<=\a\w*\>"
|
|
|
|
|
|
|
|
" F2003
|
|
|
|
syn keyword fortranIntrinsic command_argument_count get_command get_command_argument get_environment_variable is_iostat_end is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of
|
|
|
|
" ISO_C_binding
|
|
|
|
syn keyword fortranConstant c_null_char c_alert c_backspace c_form_feed c_new_line c_carriage_return c_horizontal_tab c_vertical_tab
|
|
|
|
syn keyword fortranConstant c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr
|
|
|
|
syn keyword fortranIntrinsic iso_c_binding c_loc c_funloc c_associated c_f_pointer c_f_procpointer
|
|
|
|
syn keyword fortranType c_ptr c_funptr
|
|
|
|
" ISO_Fortran_env
|
|
|
|
syn keyword fortranConstant iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit
|
|
|
|
" IEEE_arithmetic
|
|
|
|
syn keyword fortranIntrinsic ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode
|
|
|
|
|
|
|
|
syn keyword fortranReadWrite flush wait
|
|
|
|
syn keyword fortranIO decimal round iomsg
|
|
|
|
syn keyword fortranType asynchronous nopass non_overridable pass protected volatile extends import
|
|
|
|
syn keyword fortranType non_intrinsic value bind deferred generic final enumerator
|
|
|
|
syn match fortranType "\<abstract\>"
|
|
|
|
syn match fortranType "\<class\>"
|
|
|
|
syn match fortranType "\<associate\>"
|
|
|
|
syn match fortranType "\<end\s*associate"
|
|
|
|
syn match fortranType "\<enum\s*,\s*bind\s*(\s*c\s*)"
|
|
|
|
syn match fortranType "\<end\s*enum"
|
|
|
|
syn match fortranConditional "\<select\s*type"
|
|
|
|
syn match fortranConditional "\<class\s*is\>"
|
|
|
|
syn match fortranConditional "\<class\s*default\>"
|
|
|
|
syn match fortranUnitHeader "\<abstract\s*interface\>"
|
|
|
|
syn match fortranOperator "\([\|]\)"
|
|
|
|
|
|
|
|
" F2008
|
|
|
|
syn keyword fortranIntrinsic acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2
|
|
|
|
syn keyword fortranIntrinsic atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits
|
|
|
|
syn keyword fortranIntrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image
|
|
|
|
syn keyword fortranIO newunit
|
|
|
|
syn keyword fortranType contiguous
|
|
|
|
syn keyword fortranRepeat concurrent
|
2015-12-17 19:30:33 -07:00
|
|
|
|
|
|
|
" CUDA fortran
|
2023-12-06 00:51:09 -07:00
|
|
|
if exists("fortran_CUDA")
|
2015-12-17 19:30:33 -07:00
|
|
|
syn match fortranTypeCUDA "\<attributes\>"
|
2023-12-06 00:51:09 -07:00
|
|
|
syn keyword fortranTypeCUDA host global device
|
2015-12-17 19:30:33 -07:00
|
|
|
syn keyword fortranTypeCUDA shared constant pinned texture
|
|
|
|
syn keyword fortranTypeCUDA dim1 dim2 dim3 dim4
|
|
|
|
syn keyword fortranTypeCUDA cudadeviceprop cuda_count_kind cuda_stream_kind
|
|
|
|
syn keyword fortranTypeCUDA cudaEvent cudaFuncAttributes cudaArrayPtr
|
|
|
|
syn keyword fortranTypeCUDA cudaSymbol cudaChannelFormatDesc cudaPitchedPtr
|
|
|
|
syn keyword fortranTypeCUDA cudaExtent cudaMemcpy3DParms
|
|
|
|
syn keyword fortranTypeCUDA cudaFuncCachePreferNone cudaFuncCachePreferShared
|
|
|
|
syn keyword fortranTypeCUDA cudaFuncCachePreferL1 cudaLimitStackSize
|
|
|
|
syn keyword fortranTypeCUDA cudaLimitPrintfSize cudaLimitMallocHeapSize
|
|
|
|
syn keyword fortranTypeCUDA cudaSharedMemBankSizeDefault cudaSharedMemBankSizeFourByte cudaSharedMemBankSizeEightByte
|
|
|
|
syn keyword fortranTypeCUDA cudaEventDefault cudaEventBlockingSync cudaEventDisableTiming
|
|
|
|
syn keyword fortranTypeCUDA cudaMemcpyHostToDevice cudaMemcpyDeviceToHost
|
|
|
|
syn keyword fortranTypeCUDA cudaMemcpyDeviceToDevice
|
|
|
|
syn keyword fortranTypeCUDA cudaErrorNotReady cudaSuccess cudaErrorInvalidValue
|
|
|
|
syn keyword fortranTypeCUDA c_devptr
|
|
|
|
|
|
|
|
syn match fortranStringCUDA "blockidx%[xyz]"
|
|
|
|
syn match fortranStringCUDA "blockdim%[xyz]"
|
|
|
|
syn match fortranStringCUDA "griddim%[xyz]"
|
|
|
|
syn match fortranStringCUDA "threadidx%[xyz]"
|
|
|
|
|
|
|
|
syn keyword fortranIntrinsicCUDA warpsize syncthreads syncthreads_and syncthreads_count syncthreads_or threadfence threadfence_block threadfence_system gpu_time allthreads anythread ballot
|
|
|
|
syn keyword fortranIntrinsicCUDA atomicadd atomicsub atomicmax atomicmin atomicand atomicor atomicxor atomicexch atomicinc atomicdec atomiccas sizeof __shfl __shfl_up __shfl_down __shfl_xor
|
|
|
|
syn keyword fortranIntrinsicCUDA cudaChooseDevice cudaDeviceGetCacheConfig cudaDeviceGetLimit cudaDeviceGetSharedMemConfig cudaDeviceReset cudaDeviceSetCacheConfig cudaDeviceSetLimit cudaDeviceSetSharedMemConfig cudaDeviceSynchronize cudaGetDevice cudaGetDeviceCount cudaGetDeviceProperties cudaSetDevice cudaSetDeviceFlags cudaSetValidDevices
|
|
|
|
syn keyword fortranIntrinsicCUDA cudaThreadExit cudaThreadSynchronize cudaGetLastError cudaGetErrorString cudaPeekAtLastError cudaStreamCreate cudaStreamDestroy cudaStreamQuery cudaStreamSynchronize cudaStreamWaitEvent cudaEventCreate cudaEventCreateWithFlags cudaEventDestroy cudaEventElapsedTime cudaEventQuery cudaEventRecord cudaEventSynchronize
|
|
|
|
syn keyword fortranIntrinsicCUDA cudaFuncGetAttributes cudaFuncSetCacheConfig cudaFuncSetSharedMemConfig cudaSetDoubleForDevice cudaSetDoubleForHost cudaFree cudaFreeArray cudaFreeHost cudaGetSymbolAddress cudaGetSymbolSize
|
|
|
|
syn keyword fortranIntrinsicCUDA cudaHostAlloc cudaHostGetDevicePointer cudaHostGetFlags cudaHostRegister cudaHostUnregister cudaMalloc cudaMallocArray cudaMallocHost cudaMallocPitch cudaMalloc3D cudaMalloc3DArray
|
|
|
|
syn keyword fortranIntrinsicCUDA cudaMemcpy cudaMemcpyArraytoArray cudaMemcpyAsync cudaMemcpyFromArray cudaMemcpyFromSymbol cudaMemcpyFromSymbolAsync cudaMemcpyPeer cudaMemcpyPeerAsync cudaMemcpyToArray cudaMemcpyToSymbol cudaMemcpyToSymbolAsync cudaMemcpy2D cudaMemcpy2DArrayToArray cudaMemcpy2DAsync cudaMemcpy2DFromArray cudaMemcpy2DToArray cudaMemcpy3D cudaMemcpy3DAsync
|
|
|
|
syn keyword fortranIntrinsicCUDA cudaMemGetInfo cudaMemset cudaMemset2D cudaMemset3D cudaDeviceCanAccessPeer cudaDeviceDisablePeerAccess cudaDeviceEnablePeerAccess cudaPointerGetAttributes cudaDriverGetVersion cudaRuntimeGetVersion
|
2014-07-10 21:05:51 -07:00
|
|
|
endif
|
|
|
|
|
2023-12-06 00:51:09 -07:00
|
|
|
syn region none matchgroup=fortranType start="<<<" end=">>>" contains=ALLBUT,none
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
syn cluster fortranCommentGroup contains=fortranTodo
|
|
|
|
|
|
|
|
if (b:fortran_fixed_source == 1)
|
|
|
|
if !exists("fortran_have_tabs")
|
2021-05-02 08:52:52 -07:00
|
|
|
" Fixed format requires a textwidth of 72 for code,
|
|
|
|
" but some vendor extensions allow longer lines
|
|
|
|
if exists("fortran_extended_line_length")
|
|
|
|
syn match fortranSerialNumber excludenl "^.\{133,}$"lc=132
|
|
|
|
elseif exists("fortran_cardimage_line_length")
|
|
|
|
syn match fortranSerialNumber excludenl "^.\{81,}$"lc=80
|
|
|
|
else
|
|
|
|
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
|
|
|
|
endif
|
2014-07-10 21:05:51 -07:00
|
|
|
"Flag left margin errors
|
|
|
|
syn match fortranLabelError "^.\{-,4}[^0-9 ]" contains=fortranTab
|
|
|
|
syn match fortranLabelError "^.\{4}\d\S"
|
|
|
|
endif
|
|
|
|
syn match fortranComment excludenl "^[!c*].*$" contains=@fortranCommentGroup,@spell
|
|
|
|
syn match fortranLeftMargin transparent "^ \{5}"
|
|
|
|
syn match fortranContinueMark display "^.\{5}\S"lc=5
|
|
|
|
else
|
|
|
|
syn match fortranContinueMark display "&"
|
|
|
|
endif
|
|
|
|
|
|
|
|
syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell
|
2017-04-28 14:27:35 -07:00
|
|
|
syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=&\=\s.*$"
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
"cpp is often used with Fortran
|
|
|
|
syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*"
|
|
|
|
syn match cPreProc "^\s*#\s*\(elif\|if\)\>.*"
|
|
|
|
syn match cPreProc "^\s*#\s*\(ifndef\|undef\)\>.*"
|
|
|
|
syn match cPreCondit "^\s*#\s*\(else\|endif\)\>.*"
|
2021-04-24 13:52:46 -07:00
|
|
|
syn region cIncluded contained start=+"[^("]+ skip=+\\\\\|\\"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber
|
|
|
|
"syn region cIncluded contained start=+"[^("]+ skip=+\\\\\|\\"+ end=+"+
|
2014-07-10 21:05:51 -07:00
|
|
|
syn match cIncluded contained "<[^>]*>"
|
|
|
|
syn match cInclude "^\s*#\s*include\>\s*["<]" contains=cIncluded
|
|
|
|
|
|
|
|
"Synchronising limits assume that comment and continuation lines are not mixed
|
2023-12-06 00:51:09 -07:00
|
|
|
if exists("fortran_fold")
|
2014-07-10 21:05:51 -07:00
|
|
|
syn sync fromstart
|
|
|
|
elseif (b:fortran_fixed_source == 0)
|
|
|
|
syn sync linecont "&" minlines=30
|
|
|
|
else
|
|
|
|
syn sync minlines=30
|
|
|
|
endif
|
|
|
|
|
|
|
|
if exists("fortran_fold")
|
|
|
|
|
|
|
|
if (b:fortran_fixed_source == 1)
|
|
|
|
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
|
2017-04-16 08:42:41 -07:00
|
|
|
syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(submodule\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
|
2014-07-10 21:05:51 -07:00
|
|
|
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
|
2017-04-16 08:42:41 -07:00
|
|
|
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
|
|
|
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
2014-07-10 21:05:51 -07:00
|
|
|
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
2017-04-30 13:08:51 -07:00
|
|
|
syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
|
2017-04-16 08:42:41 -07:00
|
|
|
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
|
|
|
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
2014-07-10 21:05:51 -07:00
|
|
|
else
|
|
|
|
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
|
2017-04-16 08:42:41 -07:00
|
|
|
syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(submodule\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
|
2014-07-10 21:05:51 -07:00
|
|
|
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
|
2017-04-16 08:42:41 -07:00
|
|
|
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
|
|
|
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
2014-07-10 21:05:51 -07:00
|
|
|
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
2017-04-30 13:08:51 -07:00
|
|
|
syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\s*[!#].*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
|
2017-04-16 08:42:41 -07:00
|
|
|
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
|
|
|
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
2014-07-10 21:05:51 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
if exists("fortran_fold_conditionals")
|
|
|
|
if (b:fortran_fixed_source == 1)
|
|
|
|
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
|
|
|
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
|
|
|
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
2017-04-30 13:08:51 -07:00
|
|
|
syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
2014-07-10 21:05:51 -07:00
|
|
|
else
|
|
|
|
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
|
|
|
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
2016-06-19 21:10:08 -07:00
|
|
|
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(\(.\|&\s*\n\)\+)\(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
2017-04-30 13:08:51 -07:00
|
|
|
syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
2014-07-10 21:05:51 -07:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if exists("fortran_fold_multilinecomments")
|
|
|
|
if (b:fortran_fixed_source == 1)
|
|
|
|
syn match fortranMultiLineComments transparent fold "\(^[!c*].*\(\n\|\%$\)\)\{4,}" contains=ALLBUT,fortranMultiCommentLines
|
|
|
|
else
|
|
|
|
syn match fortranMultiLineComments transparent fold "\(^\s*!.*\(\n\|\%$\)\)\{4,}" contains=ALLBUT,fortranMultiCommentLines
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
" Define the default highlighting.
|
|
|
|
" Transparent groups:
|
|
|
|
" fortranParen, fortranLeftMargin
|
|
|
|
" fortranProgram, fortranModule, fortranSubroutine, fortranFunction,
|
|
|
|
" fortranBlockData
|
|
|
|
" fortran77Loop, fortran90Loop, fortranIfBlock, fortranCase
|
|
|
|
" fortranMultiCommentLines
|
2023-12-06 00:51:09 -07:00
|
|
|
hi def link fortranKeyword Keyword
|
2014-07-10 21:05:51 -07:00
|
|
|
hi def link fortranConstructName Identifier
|
2023-12-06 00:51:09 -07:00
|
|
|
hi def link fortranConditional Conditional
|
|
|
|
hi def link fortranRepeat Repeat
|
|
|
|
hi def link fortranTodo Todo
|
|
|
|
hi def link fortranContinueMark Special
|
|
|
|
hi def link fortranString String
|
|
|
|
hi def link fortranNumber Number
|
|
|
|
hi def link fortranBinary Number
|
|
|
|
hi def link fortranOctal Number
|
|
|
|
hi def link fortranHex Number
|
|
|
|
hi def link fortranOperator Operator
|
|
|
|
hi def link fortranBoolean Boolean
|
|
|
|
hi def link fortranLabelError Error
|
|
|
|
hi def link fortranObsolete Todo
|
|
|
|
hi def link fortranType Type
|
|
|
|
hi def link fortranStructure Type
|
|
|
|
|
|
|
|
hi def link fortranStorageClass StorageClass
|
|
|
|
hi def link fortranIntrinsic Function
|
|
|
|
hi def link fortranCall Function
|
|
|
|
hi def link fortranUserUnit Function
|
|
|
|
hi def link fortranUnitHeader fortranPreCondit
|
|
|
|
hi def link fortranReadWrite Keyword
|
|
|
|
hi def link fortranIO Keyword
|
|
|
|
hi def link fortranConstant Constant
|
|
|
|
|
|
|
|
hi def link fortranInclude Include
|
|
|
|
hi def link fortranLabelNumber Special
|
|
|
|
hi def link fortranTarget Special
|
|
|
|
hi def link fortranFloatIll fortranFloat
|
|
|
|
|
|
|
|
" Redundant features which may one day become obsolescent
|
|
|
|
hi def link fortranIntrinsicR fortranIntrinsic
|
|
|
|
hi def link fortranTypeR fortranType
|
|
|
|
hi def link fortranStorageClassR fortranStorageClass
|
|
|
|
hi def link fortranOperatorR fortranOperator
|
|
|
|
hi def link fortranIOR fortranIO
|
|
|
|
hi def link fortranConditionalR fortranConditional
|
|
|
|
|
|
|
|
" features deleted or declared obsolescent in Fortran 2023
|
|
|
|
if (b:fortran_fixed_source == 1)
|
|
|
|
hi def link fortranUnitHeaderOb fortranUnitHeader
|
|
|
|
hi def link fortranKeywordOb fortranKeyword
|
|
|
|
hi def link fortranKeywordDel fortranKeyword
|
|
|
|
hi def link fortranConditionalDel fortranConditional
|
|
|
|
hi def link fortranTypeOb fortranType
|
|
|
|
hi def link fortranStorageClassOb fortranStorageClass
|
|
|
|
hi def link fortranRepeatOb fortranRepeat
|
|
|
|
hi def link fortranIntrinsicOb fortranIntrinsic
|
2014-07-10 21:05:51 -07:00
|
|
|
else
|
2023-12-06 00:51:09 -07:00
|
|
|
hi def link fortranUnitHeaderOb fortranObsolete
|
|
|
|
hi def link fortranKeywordOb fortranObsolete
|
|
|
|
hi def link fortranKeywordDel fortranObsolete
|
|
|
|
hi def link fortranConditionalDel fortranObsolete
|
|
|
|
hi def link fortranTypeOb fortranObsolete
|
|
|
|
hi def link fortranStorageClassOb fortranObsolete
|
|
|
|
hi def link fortranRepeatOb fortranObsolete
|
|
|
|
hi def link fortranIntrinsicOb fortranObsolete
|
2014-07-10 21:05:51 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
hi def link fortranFormatSpec Identifier
|
|
|
|
hi def link fortranFloat Float
|
|
|
|
hi def link fortranPreCondit PreCondit
|
|
|
|
hi def link cIncluded fortranString
|
|
|
|
hi def link cInclude Include
|
|
|
|
hi def link cPreProc PreProc
|
|
|
|
hi def link cPreCondit PreCondit
|
2017-04-28 12:06:44 -07:00
|
|
|
hi def link fortranOpenMP PreProc
|
2014-07-10 21:05:51 -07:00
|
|
|
hi def link fortranParenError Error
|
|
|
|
hi def link fortranComment Comment
|
|
|
|
hi def link fortranSerialNumber Todo
|
|
|
|
hi def link fortranTab Error
|
|
|
|
|
2023-08-15 15:28:29 -07:00
|
|
|
if exists("fortran_CUDA")
|
|
|
|
hi def link fortranIntrinsicCUDA fortranIntrinsic
|
|
|
|
hi def link fortranTypeCUDA fortranType
|
|
|
|
hi def link fortranStringCUDA fortranString
|
|
|
|
endif
|
|
|
|
|
|
|
|
if exists("fortran_vendor_intrinsics")
|
|
|
|
hi def link fortranExtraIntrinsic Function
|
|
|
|
endif
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
let b:current_syntax = "fortran"
|
|
|
|
|
|
|
|
let &cpo = s:cpo_save
|
|
|
|
unlet s:cpo_save
|
|
|
|
" vim: ts=8 tw=132
|