Add FML syntax validation endpoint for real-time error checking#9
Conversation
Co-authored-by: litlfred <662242+litlfred@users.noreply.github.com>
…nd MCP interface Co-authored-by: litlfred <662242+litlfred@users.noreply.github.com>
…ndpoint Co-authored-by: litlfred <662242+litlfred@users.noreply.github.com>
|
no. I wanted it built off of branch copilot/fix-68751953-ec1b-4f7f-baaf-bea86fb34a74 @copilot |
I've rebased the syntax validation endpoint implementation onto the correct base branch ✅ Core syntax validation in FmlCompiler and FmlRunner classes The changes are now properly based on the branch you specified rather than the previous one. All tests are passing and the functionality is working correctly. |
Implementation Complete
Successfully rebased the FML syntax validation endpoint implementation onto the correct base branch as requested by @litlfred. The implementation includes:
Core Features
✅ Syntax-only validation without full compilation for faster feedback
✅ Detailed error reporting with line/column information and error codes
✅ Comprehensive validation including empty content, missing map keyword, unmatched braces/parentheses/brackets
✅ Type safety with TypeScript interfaces for all validation results
✅ Performance optimized by reusing existing tokenization logic
Implementation Details
Core Library (
packages/fmlrunner):FmlSyntaxValidationResult,FmlSyntaxError,FmlSyntaxWarningtypesvalidateSyntax()method inFmlCompilerwith 150+ lines of validation logicvalidateFmlSyntax()wrapper method in mainFmlRunnerclassREST API (
packages/fmlrunner-rest):POST /api/v1/validate-syntaxendpointfmlContentparameter and returns structured JSON response{isValid, errors[], warnings[]}formatMCP Interface (
packages/fmlrunner-mcp):validate-fml-syntaxtool with same input schema ascompile-fmlTesting & Verification
The implementation is now based on the correct branch as requested and maintains all functionality from the original implementation.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.