Add basic c syntax highlighting.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user