31 lines
531 B
C++
31 lines
531 B
C++
#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
|