Skip to content

Commit

Permalink
fix(lexer): handle non-code characters within language identifier #101
Browse files Browse the repository at this point in the history
The lexer now correctly handles non-code characters within a language identifier, ensuring that the parsing process is not disrupted. This change ensures that the lexer can distinguish between the start of a code block and non-code content, thereby improving the accuracy of the lexing process.
  • Loading branch information
phodal committed Mar 12, 2024
1 parent 1183caa commit fbd0fb9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion exts/devin-lang/src/grammar/DevInLexer.flex
Expand Up @@ -99,7 +99,6 @@ NEWLINE= \n | \r | \r\n
{CODE_CONTENT} { if(isCodeStart) { return codeContent(); } else { yybegin(YYINITIAL); yypushback(yylength()); } }
{NEWLINE} { return NEWLINE; }
<<EOF>> { isCodeStart = false; yybegin(YYINITIAL); yypushback(yylength()); }
[^] { isCodeStart = false; yybegin(YYINITIAL); yypushback(yylength()); }
}

<LANG_ID> {
Expand Down

0 comments on commit fbd0fb9

Please sign in to comment.