forked from enlightenment/efl
elm_code: Fix some syntax highlight after strings
This commit is contained in:
parent
e4fef24898
commit
960812f658
|
@ -144,18 +144,19 @@ elm_code_syntax_parse_line(Elm_Code_Syntax *syntax, Elm_Code_Line *line)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
i = i2 + 1;
|
i = i2 + 1;
|
||||||
|
// TODO reset all below of here
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = content;
|
ptr = content;
|
||||||
count = 0;
|
count = 0;
|
||||||
for (; i < length; i++)
|
for (; i < length; i++)
|
||||||
{
|
{
|
||||||
|
ptr = content + i - count;
|
||||||
if (_elm_code_text_char_is_whitespace(content[i]))
|
if (_elm_code_text_char_is_whitespace(content[i]))
|
||||||
{
|
{
|
||||||
if (count)
|
if (count)
|
||||||
_elm_code_syntax_parse_token(syntax, line, ptr-content, ptr, count);
|
_elm_code_syntax_parse_token(syntax, line, ptr-content, ptr, count);
|
||||||
|
|
||||||
ptr += count+1;
|
|
||||||
count = 0;
|
count = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -184,6 +185,7 @@ elm_code_syntax_parse_line(Elm_Code_Syntax *syntax, Elm_Code_Line *line)
|
||||||
{
|
{
|
||||||
Elm_Code_Token *token = eina_list_last_data_get(line->tokens);
|
Elm_Code_Token *token = eina_list_last_data_get(line->tokens);
|
||||||
token->continues = EINA_TRUE;
|
token->continues = EINA_TRUE;
|
||||||
|
// TODO reset all below of here
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
i = i2;
|
i = i2;
|
||||||
|
@ -198,6 +200,7 @@ elm_code_syntax_parse_line(Elm_Code_Syntax *syntax, Elm_Code_Line *line)
|
||||||
end = i;
|
end = i;
|
||||||
|
|
||||||
elm_code_line_token_add(line, start, end, 1, ELM_CODE_TOKEN_TYPE_STRING);
|
elm_code_line_token_add(line, start, end, 1, ELM_CODE_TOKEN_TYPE_STRING);
|
||||||
|
count = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (content[i] == '\'')
|
else if (content[i] == '\'')
|
||||||
|
@ -208,6 +211,7 @@ elm_code_syntax_parse_line(Elm_Code_Syntax *syntax, Elm_Code_Line *line)
|
||||||
end = i;
|
end = i;
|
||||||
|
|
||||||
elm_code_line_token_add(line, start, end, 1, ELM_CODE_TOKEN_TYPE_STRING);
|
elm_code_line_token_add(line, start, end, 1, ELM_CODE_TOKEN_TYPE_STRING);
|
||||||
|
count = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +223,6 @@ elm_code_syntax_parse_line(Elm_Code_Syntax *syntax, Elm_Code_Line *line)
|
||||||
|
|
||||||
elm_code_line_token_add(line, i, i, 1, ELM_CODE_TOKEN_TYPE_BRACE);
|
elm_code_line_token_add(line, i, i, 1, ELM_CODE_TOKEN_TYPE_BRACE);
|
||||||
|
|
||||||
ptr = content + i+1;
|
|
||||||
count = -1;
|
count = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue