Add basic c syntax highlighting.

This commit is contained in:
2026-09-14 11:25:29 +01:00
parent 8f67be87ee
commit 6711ecbaee
8 changed files with 448 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
#pragma once
#include "../decl.h"
#include "pch.h"
#include "tries.h"
namespace bed::internal::syntax::c {
struct alignas(2) CState {
struct CInternalState {
uint16_t brace_level;
enum : uint8_t {
NONE,
STRING,
CHAR,
MULTI_COMMENT,
INLINE_COMMENT
} state;
uint8_t flags = 0;
};
uint8_t top;
// the stack (RubyInternalState * top)
inline CInternalState *stack() {
return (CInternalState *)(this + 1);
}
};
Language lang_c();
} // namespace bed::internal::syntax::c