Skip to content

Commit cc45cf2

Browse files
committed
fix(devin-lang): ensure proper handling of language identifiers #101
In the previous version, the lexer incorrectly switched to the initial state upon encountering an identifier within a language identifier comment block, causing the language identifier to be interpreted as a code block start. This commit corrects the behavior by directly returning the LANGUAGE_ID token when a valid language identifier is found, without switching to the initial state. docs(docs/scenes/legacy-migration.md): add screenshot and instructions for generating test data This commit enhances the legacy migration documentation by adding a visual guide and step-by-step instructions for generating test data using the "Generate Test Data (APIs)" feature. The updated documentation includes a screenshot of the AutoDev Living Documentation, illustrating the process of generating API test data from Java Controller code.
1 parent 648de34 commit cc45cf2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/scenes/legacy-migration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Building upon the experience accumulated in our "[System Refactoring and Migrati
2020

2121
Support language: Java.
2222

23+
![AutoDev Living Documentation](https://unitmesh.cc/auto-dev/gen-test-data.png)
24+
2325
Simply right-click on the Java Controller code, select "Generate Test Data (APIs)," and API test data will be generated.
2426

2527
### 2. Custom Prompt Integration

exts/devin-lang/src/grammar/DevInLexer.flex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ NEWLINE= \n | \r | \r\n
103103

104104
<LANG_ID> {
105105
"```" { return CODE_BLOCK_START; }
106-
{IDENTIFIER} { yybegin(YYINITIAL); return LANGUAGE_ID; }
106+
{LANGUAGE_ID} { return LANGUAGE_ID; }
107107
[^] { yypushback(1); yybegin(CODE_BLOCK); }
108108
}

0 commit comments

Comments
 (0)