summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ted.h b/ted.h
index 6664e78..646da6d 100644
--- a/ted.h
+++ b/ted.h
@@ -14,13 +14,18 @@ enum {
};
enum {
- SYNTAX_STATE_RUST_COMMENT_DEPTH_MASK = 0x7u, // in rust, /* */ comments can nest.
+ SYNTAX_STATE_RUST_COMMENT_DEPTH_MASK = 0xfu, // in rust, /* */ comments can nest.
SYNTAX_STATE_RUST_COMMENT_DEPTH_MUL = 0x1u,
SYNTAX_STATE_RUST_COMMENT_DEPTH_BITS = 4, // number of bits we allocate for the comment depth.
SYNTAX_STATE_RUST_STRING = 0x10u,
SYNTAX_STATE_RUST_STRING_IS_RAW = 0x20u,
};
+enum {
+ SYNTAX_STATE_PYTHON_STRING = 0x01u, // multiline strings (''' and """)
+ SYNTAX_STATE_PYTHON_STRING_DBL_QUOTED = 0x02u, // is this a """ string, as opposed to a ''' string?
+};
+
typedef u8 SyntaxState;
ENUM_U16 {
@@ -28,6 +33,7 @@ ENUM_U16 {
LANG_C,
LANG_CPP,
LANG_RUST,
+ LANG_PYTHON,
LANG_COUNT
} ENUM_U16_END(Language);
@@ -41,6 +47,7 @@ static LanguageName const language_names[] = {
{LANG_C, "C"},
{LANG_CPP, "C++"},
{LANG_RUST, "Rust"},
+ {LANG_PYTHON, "Python"},
};
ENUM_U8 {