diff -r 534a4ef4143d -r c39ecbbca7c0 src/javacodegen.c
--- a/src/javacodegen.c Tue Aug 23 15:55:02 2016 +0200
+++ b/src/javacodegen.c Tue Aug 23 16:34:02 2016 +0200
@@ -44,17 +44,21 @@
#define memcpy_const(darr,doff,str) memcpy(&(darr[doff]), str, sizeof(str)-1); \
dp += sizeof(str)-1
-void jparseline(char *src, UcxBuffer *destbuf, HighlighterData *hltr) {
+void jparseline(char *src, UcxBuffer *destbuf, int *multiline_comment) {
/* TODO: workaround for using old code with UcxBuffer */
char *dest = destbuf->space + destbuf->pos;
- memset(hltr->word, 0, WORDBUF_SIZE);
- size_t wp = 0, sp = (size_t)-1, dp = 0;
+ /* TODO: try to replace this buffer */
+ char wordbuf[WORDBUF_SIZE];
+ sstr_t word;
+ word.ptr = wordbuf; word.length = 0;
+
+ size_t sp = (size_t)-1, dp = 0;
int isstring = 0, iscomment = 0, isimport = 0;
char quote = '\0';
int isescaping = 0;
- if (hltr->iscommentml) {
+ if (*multiline_comment) {
iscomment = 1;
memcpy_const(dest, dp, "");
continue;
} else if (!iscomment && (src[sp+1] == '/' || src[sp+1] == '*')) {
iscomment = 1;
- hltr->iscommentml = (src[sp+1] == '*');
+ *multiline_comment = (src[sp+1] == '*');
memcpy_const(dest, dp, "