aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lexer.h
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-10 02:15:41 +0100
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-11 15:13:09 +0100
commit376c62bc63870fa1121548fc8b53271c21ed79a6 (patch)
treef0234c2944af4723197225c64521c83707ffdbb5 /src/lexer.h
parenta886813f86f88b4b1cc874a81229b7b59d0d463a (diff)
SciTECO lexer: braces and two-character operators are now actually styled as operators
* For consistency with other lexers, like the C/C++ lexer. * `^*`, `^/` and `^#` are also true operators and shouldn't be styled as regular commands. This required introducing a new operator style (3).
Diffstat (limited to 'src/lexer.h')
-rw-r--r--src/lexer.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lexer.h b/src/lexer.h
index 2b011be..e91cdd1 100644
--- a/src/lexer.h
+++ b/src/lexer.h
@@ -25,12 +25,14 @@ typedef enum {
SCE_SCITECO_DEFAULT = 0,
SCE_SCITECO_COMMAND = 1,
SCE_SCITECO_OPERATOR = 2,
- SCE_SCITECO_QREG = 3,
- SCE_SCITECO_STRING = 4,
- SCE_SCITECO_NUMBER = 5,
- SCE_SCITECO_LABEL = 6,
- SCE_SCITECO_COMMENT = 7,
- SCE_SCITECO_INVALID = 8
+ /** two-character operators */
+ SCE_SCITECO_OPERATOR2 = 3,
+ SCE_SCITECO_QREG = 4,
+ SCE_SCITECO_STRING = 5,
+ SCE_SCITECO_NUMBER = 6,
+ SCE_SCITECO_LABEL = 7,
+ SCE_SCITECO_COMMENT = 8,
+ SCE_SCITECO_INVALID = 9
} teco_style_t;
void teco_lexer_style(teco_view_t *view, gsize end);