|
| 1 | +" Sintaksia ya nuru kwenye programu ya "vim" |
| 2 | +" Lugha: Nuru |
| 3 | + |
| 4 | +" Maneno tengwa |
| 5 | +syntax keyword nuruKeyword unda pakeji rudisha vunja endelea tupu |
| 6 | +syntax keyword nuruType fanya |
| 7 | +syntax keyword nuruBool kweli sikweli |
| 8 | +syntax keyword nuruConditional kama sivyo au |
| 9 | +syntax match nuruComparision /[!\|<>]/ |
| 10 | +syntax keyword nuruLoop ktk while badili |
| 11 | +syntax keyword nuruLabel ikiwa kawaida |
| 12 | + |
| 13 | +" Nambari |
| 14 | +syntax match nuruInt '[+-]\d\+' contained display |
| 15 | +syntax match nuruFloat '[+-]\d+\.\d*' contained display |
| 16 | + |
| 17 | +" Viendeshaji |
| 18 | +syntax match nuruAssignment '=' |
| 19 | +syntax match nuruLogicalOP /[\&!|]/ |
| 20 | + |
| 21 | +" Vitendakazi |
| 22 | +syntax keyword nuruFunction andika aina jaza fungua |
| 23 | + |
| 24 | +" Tungo |
| 25 | +syntax region nuruString start=/"/ skip=/\\"/ end=/"/ |
| 26 | +syntax region nuruString start=/'/ skip=/\\'/ end=/'/ |
| 27 | + |
| 28 | +" Maoni |
| 29 | +syntax match nuruComment "//.*" |
| 30 | +syntax region nuruComment start="/\*" end="\*/" |
| 31 | + |
| 32 | +" Fafanua sintaksia |
| 33 | +let b:current_syntax = "nuru" |
| 34 | + |
| 35 | +highlight def link nuruComment Comment |
| 36 | +highlight def link nuruBool Boolean |
| 37 | +highlight def link nuruFunction Function |
| 38 | +highlight def link nuruComparision Conditional |
| 39 | +highlight def link nuruConditional Conditional |
| 40 | +highlight def link nuruKeyword Keyword |
| 41 | +highlight def link nuruString String |
| 42 | +highlight def link nuruVariable Identifier |
| 43 | +highlight def link nuruLoop Repeat |
| 44 | +highlight def link nuruInt Number |
| 45 | +highlight def link nuruFloat Float |
| 46 | +highlight def link nuruAssignment Operator |
| 47 | +highlight def link nuruLogicalOP Operator |
| 48 | +highlight def link nuruAriOP Operator |
| 49 | +highlight def link nuruType Type |
| 50 | +highlight def link nuruLabel Label |
| 51 | + |
0 commit comments