Skip to content

Commit

Permalink
fix(devin-lang): ensure proper handling of language identifiers #101
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
phodal committed Mar 13, 2024
1 parent 648de34 commit cc45cf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/scenes/legacy-migration.md
Expand Up @@ -20,6 +20,8 @@ Building upon the experience accumulated in our "[System Refactoring and Migrati

Support language: Java.

![AutoDev Living Documentation](https://unitmesh.cc/auto-dev/gen-test-data.png)

Simply right-click on the Java Controller code, select "Generate Test Data (APIs)," and API test data will be generated.

### 2. Custom Prompt Integration
Expand Down
2 changes: 1 addition & 1 deletion exts/devin-lang/src/grammar/DevInLexer.flex
Expand Up @@ -103,6 +103,6 @@ NEWLINE= \n | \r | \r\n

<LANG_ID> {
"```" { return CODE_BLOCK_START; }
{IDENTIFIER} { yybegin(YYINITIAL); return LANGUAGE_ID; }
{LANGUAGE_ID} { return LANGUAGE_ID; }
[^] { yypushback(1); yybegin(CODE_BLOCK); }
}

0 comments on commit cc45cf2

Please sign in to comment.