|
1 | 1 | { |
2 | 2 | "scopeName": "source.prjunnamed", |
3 | | - "patterns": [ |
4 | | - {"include": "#comment"}, |
5 | | - {"include": "#decimal"}, |
6 | | - {"include": "#ternary"}, |
7 | | - {"include": "#string"}, |
8 | | - {"include": "#io-port"}, |
9 | | - {"include": "#cell-ref"}, |
10 | | - {"include": "#cell-name"} |
11 | | - ], |
| 3 | + "patterns": [{"include": "#declaration"}], |
12 | 4 | "repository": { |
| 5 | + "declaration": { |
| 6 | + "patterns": [ |
| 7 | + {"include": "#comment"}, |
| 8 | + {"include": "#decimal"}, |
| 9 | + {"include": "#ternary"}, |
| 10 | + {"include": "#string"}, |
| 11 | + {"include": "#io-port"}, |
| 12 | + {"include": "#cell-ref"}, |
| 13 | + {"include": "#cell-ref-added"}, |
| 14 | + {"include": "#cell-name"}, |
| 15 | + {"include": "#diff-added"}, |
| 16 | + {"include": "#diff-removed"} |
| 17 | + ] |
| 18 | + }, |
13 | 19 | "comment": { |
14 | 20 | "match": ";.+", |
15 | 21 | "name": "comment.line.prjunnamed" |
|
30 | 36 | "begin": "\"", |
31 | 37 | "end": "\"", |
32 | 38 | "name": "string.quoted.double.prjunnamed", |
33 | | - "patterns": [{ "include": "#string-escape" }] |
| 39 | + "patterns": [{"include": "#string-escape"}] |
34 | 40 | }, |
35 | 41 | "io-port": { |
36 | 42 | "begin": "&\"", |
37 | 43 | "end": "(\"):\\d+", |
38 | 44 | "name": "entity.name.io-port.prjunnamed", |
39 | | - "patterns": [{ "include": "#string-escape" }] |
| 45 | + "patterns": [{"include": "#string-escape"}] |
40 | 46 | }, |
41 | 47 | "cell-ref": { |
42 | 48 | "match": "%\\d+(:\\d+)?(\\+\\d+)?", |
43 | | - "name": "variable.parameter.prjunnamed" |
| 49 | + "name": "variable.other.prjunnamed" |
| 50 | + }, |
| 51 | + "cell-ref-added": { |
| 52 | + "match": "%_\\d+(:\\d+)?(\\+\\d+)?", |
| 53 | + "name": "markup.inserted.prjunnamed" |
44 | 54 | }, |
45 | 55 | "cell-name": { |
46 | 56 | "match": "buf|not|and|or|xor|mux|adc|eq|ult|slt|shl|ushr|sshr|xshr|mul|udiv|umod|sdiv_trunc|sdiv_floor|smod_trunc|smod_floor|match|assign|dff|memory|iob|target|input|output|name", |
47 | 57 | "name": "keyword.other.cell.prjunnamed" |
| 58 | + }, |
| 59 | + "diff-added": { |
| 60 | + "begin": "^\\+%_?\\d+(:\\d+)?(\\+\\d+)?", |
| 61 | + "end": "\n", |
| 62 | + "beginCaptures": {"0": {"name": "markup.inserted.prjunnamed"}}, |
| 63 | + "name": "meta.added.prjunnamed", |
| 64 | + "patterns": [{"include": "#declaration"}] |
| 65 | + }, |
| 66 | + "diff-removed": { |
| 67 | + "begin": "^-%\\d+(:\\d+)?(\\+\\d+)?", |
| 68 | + "end": "\n", |
| 69 | + "beginCaptures": {"0": {"name": "markup.deleted.prjunnamed"}}, |
| 70 | + "name": "meta.removed.prjunnamed", |
| 71 | + "patterns": [{"include": "#declaration"}] |
48 | 72 | } |
49 | 73 | } |
50 | 74 | } |
0 commit comments