yaml.jsf (2666B)
1 # JOE syntax highlight file for YAML 2 # by Christian Nicolai (http://mycrobase.de) 3 4 # TODO: Could use numbers vs strings for Constant, but it's a bit of work 5 # Array elements with colons get misidentified as keys 6 7 =Idle 8 =Comment 9 =Constant 10 =String +Constant 11 =Number +Constant 12 =Escape 13 =StringEscape +Escape +String 14 =Type 15 =Bad 16 =Brace 17 18 =Key +Attr +Type +String 19 =Directive +Keyword 20 =Reference +Label +DefinedIdent 21 =LocalType +DefinedType +Type 22 =BlockDelim +Operator 23 24 =BadTab +Bad 25 26 :line_start Idle 27 * maybe_key noeat 28 "\t" bad_tab recolor=-1 29 " " line_start 30 31 :idle Constant 32 * idle 33 "\n" line_start 34 "%" directive recolor=-1 35 "#" line_comment recolor=-1 36 "'" string_sq_1 recolor=-1 37 "\"" string_dq_1 recolor=-1 38 "{[]}" brace recolor=-1 39 "." maybe_block_end1 40 "*&" maybe_reference 41 "!" maybe_typecast 42 43 :maybe_key Idle 44 * maybe_key1 recolor=-1 mark 45 "\n%#'\"{[]}*&!" idle noeat 46 "-" maybe_block1 mark 47 48 :maybe_key1 Constant 49 * idle noeat 50 ":" key 51 " a-zA-Z0-9_-" maybe_key1 52 53 # necessary to include the : 54 :key Key 55 * key_end noeat recolormark 56 57 :key_end Key 58 * idle noeat 59 60 # mark bad tabs until the first non-whitespace 61 :bad_tab BadTab 62 * line_start noeat 63 64 :line_comment Comment comment 65 * line_comment 66 "\n" line_start 67 "BFHNTX" line_comment noeat call=comment_todo.comment_todo() 68 69 :brace Brace 70 * idle noeat 71 72 :directive Directive 73 * directive 74 "\n" line_start 75 76 :string_sq_1 String string 77 * string_sq noeat 78 79 :string_sq String string 80 * string_sq 81 "\'" idle 82 "\\" string_sq_esc recolor=-1 83 84 :string_sq_esc StringEscape string 85 * string_sq 86 "\n" string_sq recolor=-2 87 88 :string_dq_1 String string 89 * string_dq noeat 90 91 :string_dq String string 92 * string_dq 93 "\"" idle 94 "\\" string_dq_esc recolor=-1 95 96 :string_dq_esc StringEscape string 97 * string_dq 98 "\n" string_dq recolor=-2 99 100 :maybe_block1 Constant 101 * maybe_key1 noeat 102 "-" maybe_block2 103 104 :maybe_block2 Constant 105 * maybe_key1 noeat 106 "-" block recolor=-3 107 108 :block BlockDelim 109 * idle noeat 110 111 :maybe_block_end1 String string 112 * idle noeat 113 "." maybe_block_end2 114 115 :maybe_block_end2 String string 116 * idle noeat 117 "." block_end recolor=-3 118 119 :block_end BlockDelim 120 * idle noeat 121 122 :maybe_reference Constant 123 * idle 124 "a-zA-Z_" reference recolor=-2 125 126 :reference Reference 127 * idle noeat 128 "a-zA-Z0-9_" reference 129 130 :maybe_typecast Constant 131 * idle noeat 132 "a-zA-Z_" local_type recolor=-1 133 "!" builtin_type 134 135 :builtin_type Idle 136 * idle noeat 137 "a-zA-Z" builtin_type2 buffer 138 139 :builtin_type2 Idle 140 * idle noeat strings 141 "str" type 142 "float" type 143 "binary" type 144 done 145 "a-zA-Z_" builtin_type2 146 147 :type Type 148 * idle noeat 149 150 :local_type LocalType 151 * idle noeat 152 "a-zA-Z_" local_type