Merge branch 'master' of https://scm.cri.ensmp.fr/git/Faustine
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / syntax-highlighting / faust.vim
1 " There has to be a file called filetype.vim in your ~/.vim directory
2 " with the following content:
3 " faust filetype file
4 " if exists("did_load_filetypes")
5 " finish
6 " endif
7 " augroup filetypedetect
8 " au! BufRead,BufNewFile *.fst setfiletype faust
9 " au! BufRead,BufNewFile *.dsp setfiletype faust
10 " augroup END
11 "
12 "
13 " Faust syntax file
14 " Language: faust
15 " Maintainer: bjoern lindig <kebjoern@yahoo.de>
16 " Version: 0.1
17 " Last change: 2009-05-12
18
19 " remove any old syntax stuff hanging around
20 syn clear
21
22 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
23 " faust primitives
24 " the list is taken from the faust.xml file writen for the kate-editor and may
25 " not be complete
26 syn keyword fstPrims mem prefix int float rdtable rwtable select2 select3 ffunction fconstant fvariable button checkbox vslider hslider nentry vgroup hgroup tgroup vbargraph hbargraph attach acos asin atan atan2 cos sin tan exp log log10 pow sqrt abs min max fmod remainder floor ceil rint
27
28 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
29 " faust operators
30 syn keyword fstOps process with case seq par sum prod import component library environment declare
31
32 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
33 " faust comments
34 syn match fstComment "//.*$"
35 syn region fstComment start="/\*" end="\*/" contains=fstOperator keepend extend
36
37 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
38 " faust operators
39 syn match fstOperator "_"
40 syn match fstOperator "!"
41 syn match fstOperator "+"
42 syn match fstOperator "-"
43 syn match fstOperator "*"
44 syn match fstOperator " / "
45 syn match fstOperator "%"
46 syn match fstOperator "<"
47 syn match fstOperator ">"
48 syn match fstOperator ">="
49 syn match fstOperator "<="
50 syn match fstOperator "!="
51 syn match fstOperator "=="
52 syn match fstOperator "&"
53 syn match fstOperator "\^"
54 syn match fstOperator "|"
55 syn match fstOperator "<<"
56 syn match fstOperator ">>"
57 syn match fstOperator ":"
58 syn match fstOperator ","
59 syn match fstOperator "<:"
60 syn match fstOperator ":>"
61 syn match fstOperator "\~"
62
63 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
64 " faust brackets
65 syn match fstAoperator "("
66 syn match fstAoperator ")"
67
68 " String
69 syn region fstString start=+"+ skip=+\\\\\|\\"+ end=+"+
70
71 " Color definition
72 hi link fstAoperator Statement
73 hi link fstPrims Label
74 hi link fstOps Identifier
75 hi link fstOperator Special
76 hi link fstComment Comment
77 hi link fstString String
78
79 " The name of the syntax is faust
80 let b:current_syntax = "faust"