Skip to content

Commit

Permalink
Fix enum and union in C, closes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 21, 2025
1 parent 1527693 commit da5ce25
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to the "pustota" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## 0.0.22

- Improve `C` highlight: fix `union` and `enum`, #32

## 0.0.21

- Improve `CSS` highlight: fix `@keyframes` highlight, #30
Expand Down
4 changes: 4 additions & 0 deletions test/C.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ struct student
float marks;
} s;

enum Color chosenColor = GREEN;
struct Point pt = { 10, 20 };
union DataValue val;

bool object_hash(/*const*/ json_object *j, byte hash[HASH_SIZE]);

static void hash_update(hash_ctx * const c, const byte * const b,
Expand Down
2 changes: 2 additions & 0 deletions themes/pustota-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@
// C:
"constant.character.escape.line-continuation.c", // `\` operator
"storage.type.struct.c", // `struct` keyword
"storage.type.enum.c", // `enum`
"storage.type.union.c", // `union`
// JS:
"meta.method.declaration storage.type", // `constructor`
// TS:
Expand Down

0 comments on commit da5ce25

Please sign in to comment.