1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-08-15 20:02:56 +02:00
Commit Graph

1024 Commits

Author SHA1 Message Date
Tim Voronov
d24fac821b Refactor compiler and error handling: introduce multi-error support, improve snippet generation, standardize error listener, update compiler context, and enhance test cases. 2025-07-29 18:35:55 -04:00
Tim Voronov
b2163ebc14 Add error handling and refactor compiler context: introduce error handling for variable declarations, update compiler context to use file source, and enhance error reporting for compilation issues. 2025-07-29 14:04:48 -04:00
Tim Voronov
4671a45951 Update FQL parser: regenerate parser with updated serialized ATN values. 2025-07-26 22:05:33 -04:00
Tim Voronov
1071b7ffc2 Add generated parser and listener code for FQL using ANTLR. 2025-07-26 21:58:51 -04:00
Tim Voronov
0ee8e0fcf6 Remove fql_lexer.go: delete unused generated lexer code from the parser package. 2025-07-26 21:58:20 -04:00
Tim Voronov
74f3452ec4 Refactor LoopCollectCompiler: simplify aggregation function call handling, optimize register allocation, streamline loop source setup, and update function arguments for consistency. 2025-07-26 15:18:22 -04:00
Tim Voronov
7039a97417 Update integration tests: replace SkipCaseArray and DebugCaseArray with CaseArray for consistency across test cases. 2025-07-26 14:59:11 -04:00
Tim Voronov
5185abd714 Refactor LoopCollectCompiler: replace CollectorSpec with Collector, improve grouping and aggregation handling, update emitter methods, standardize key loading logic, streamline function naming and argument handling, add Count function to collections, and enhance code comments for readability. 2025-07-26 14:55:53 -04:00
Tim Voronov
b65780acb6 Add comprehensive comments to ExprCompiler, LiteralCompiler, StmtCompiler, and WaitCompiler to improve code readability and maintainability. Document struct purposes, method parameters, return values, and inline explanations for complex sections consistently across the files. 2025-07-26 10:46:31 -04:00
Tim Voronov
43e47779a3 Add comprehensive comments to the file, following the same style as used in the other files:- Add a comment for the LoopCompiler struct explaining its purpose- Add comments for each method explaining what it does, its parameters, and return values- Add inline comments for complex code sections to explain the logic- Ensure comments are consistent with the style used in other files 2025-07-26 10:28:01 -04:00
Tim Voronov
e619212ac6 Refactor LoopCollectCompiler: enhance COLLECT clause processing by improving aggregation and grouping handling, optimizing register usage, and updating projection logic. 2025-07-26 10:22:33 -04:00
Tim Voronov
d7d25bb0b3 Refactor ExprCompiler to use variable name for symbol resolution and update integration tests by replacing SkipCaseArray and DebugCaseArray with CaseArray for consistency. 2025-07-26 10:15:43 -04:00
Tim Voronov
8aa36442e9 Fix for loop variable increment in loop_collect_agg.go, update test cases to replace SkipCaseArray with DebugCaseArray and DebugCaseArray with CaseArray. 2025-07-25 09:54:28 -04:00
Tim Voronov
81b7cfd2eb Refactor loop collection: enhance CollectorSpec with destination handling, streamline projection logic, improve aggregation handling, optimize register allocation, and update COLLECT integration tests. 2025-07-25 09:50:56 -04:00
Tim Voronov
8c41c503a0 Refactor LoopCollectCompiler: replace aggregateSelector with core.AggregateSelector, introduce CollectorSpec struct, streamline grouping and aggregation handling, optimize register usage, finalize projection logic, update go.mod dependencies, and enhance integration tests for COLLECT queries. 2025-07-24 17:15:02 -04:00
Tim Voronov
0e02058703 Refactor ExprCompiler and LoopCollectCompiler: extract function name compilation logic, introduce aggregateSelector struct, improve aggregation handling with grouped and global selectors, optimize collector setup, and enhance loop processing. 2025-07-21 22:01:03 -04:00
Tim Voronov
fa02a1fd19 Refactor loop collection logic: standardize collector type handling, update grouping initialization, optimize register allocation, improve selector variable compilation, and enhance COLLECT integration tests. 2025-07-21 16:00:30 -04:00
Tim Voronov
0210fef01e Merge branch 'next' into feat/next-drop-globals 2025-07-21 11:51:58 -04:00
Tim Voronov
99dbfe34a5 Refactor loop collection logic: improve grouping key compilation, restructure collector finalization, update grouping context handling, and optimize register allocation for COLLECT queries. 2025-07-21 11:51:35 -04:00
Tim Voronov
948b6b698e Add tests for function calls and variable declarations: implement unit tests for function call behavior and variable handling in the compiler, enhancing test coverage and ensuring correctness. 2025-07-21 11:28:32 -04:00
Tim Voronov
2827103f1e Refactor loop projection logic: remove redundant loop parameter from projection functions, optimize group variable handling, and enhance integration tests for COLLECT queries. 2025-07-14 12:21:20 -04:00
Tim Voronov
b0d89cc3b6 Refactor loop compilation: introduce ScopeProjection for improved scope management, optimize key/value variable handling, update scope packing/unpacking logic, enhance integration tests, and organize imports. 2025-07-08 12:56:31 -04:00
Tim Voronov
c3364ed4d8 Refactor LIST, MAP, and RANGE opcodes to LOADARRAY, LOADOBJECT, and LOADRANGE, update related emitter methods, adjust compiler logic for loop and scope handling, improve integration tests, and enhance disassembler output for updated opcodes. 2025-07-07 20:36:36 -04:00
Tim Voronov
2248f42c3e Refactor namespaces and standard library integration: remove NamespaceContainer from compiler, migrate namespace logic to runtime, replace WithFunctions with new standard library helpers in tests, and improve error handling in function registration. 2025-07-07 18:03:19 -04:00
Tim Voronov
a575483d0d Validate program input in disassembler, add ErrInvalidProgram, and update opcode formatting for improved clarity. 2025-07-07 16:29:18 -04:00
Tim Voronov
d39c5ce889 Refactor loop compilation to ensure scope management with EnterScope and ExitScope, update variable declaration for key/value names, and ensure compatibility with FOR-IN loops. 2025-07-07 16:29:07 -04:00
Tim Voronov
f20e75f1b1 Refactor loop initialization logic to include loop depth in label names, update operand formatting in disassembler, skip test cases using SkipCaseArray, and improve integration test coverage for nested FOR loops. 2025-07-07 13:29:50 -04:00
Tim Voronov
c6c1309264 Add panic recovery and disassembly output to integration test cases for better debugging of VM compilation errors. 2025-07-07 11:49:29 -04:00
Tim Voronov
924c5282cf Organize imports across integration and unit test files for consistent structure. Initialize functions map in SymbolTable safely and refactor disassembler label handling logic. 2025-07-07 11:27:22 -04:00
Tim Voronov
8893605445 Refactor logical operator compilation (AND, OR) to improve label usage and short-circuit evaluation, update label definitions in Emitter, enhance disassembler with function and label metadata, and implement function validation in vm. 2025-07-03 21:17:38 -04:00
Tim Voronov
09df483164 Refactor iterator-related opcodes (OpIterSkip, OpIterLimit) to fix operand handling and label resolution in vm, emitter, and disassembler. Update instruction formatting and improve disassembler output. 2025-07-03 18:03:04 -04:00
Tim Voronov
a1e98c3c3c Refactor logical operator compilation to optimize short-circuit evaluation, add assembly utilities (assembler and disassembler), and migrate integration tests from bytecode to compiler package for improved organization. 2025-07-03 16:56:24 -04:00
Tim Voronov
ea827fc2f4 Refactor FOR-WHILE loop compilation to ensure proper LoopKind handling and value/key resolution, update map operations, and add integration tests for COLLECT scenarios. 2025-07-02 22:34:14 -04:00
Tim Voronov
0b528b62c0 Refactor FOR-WHILE loop compilation to ensure proper LoopKind handling and value/key resolution, update map operations, and add integration tests for COLLECT scenarios. 2025-07-02 21:14:33 -04:00
Tim Voronov
b3970fbb43 Add integration tests for FOR-WHILE loops with LIMIT scenarios and custom function usage 2025-07-02 20:02:37 -04:00
Tim Voronov
d2098cadb8 Refactor FOR-WHILE loop compilation to ensure compatibility with FOR-IN loops, update value register resolution, and add integration tests for sorting scenarios. 2025-07-02 16:33:50 -04:00
Tim Voronov
802672711e Refactor FOR-IN loop cleanup handling; add conditional jump logic for custom iterators. Update integration test case to replace SkipCaseArray with CaseArray. 2025-07-02 14:46:24 -04:00
Tim Voronov
b66007e9c7 Migrate integration tests from bytecode to compiler package for improved structure and clarity. 2025-07-02 13:33:39 -04:00
Tim Voronov
74a2ced589 Introduce base utilities in integration tests for improved reuse and consistency. Refactor test cases to use base.Run and base.Exec. Add new shortcuts.go for shared helpers. 2025-07-02 13:31:02 -04:00
Tim Voronov
2f25e4e4be Remove redundant base imports from integration tests and refactor usage of UseCase to TestCase for improved clarity and consistency. 2025-07-02 13:30:01 -04:00
Tim Voronov
b95d39a552 Refactor loop handling and RETURN statement compilation; enhance register assignment, optimize operand usage, and simplify integration test cases with new helpers and better error handling. 2025-07-02 12:54:01 -04:00
Tim Voronov
17a0778331 Refactor FOR and WHILE loop compilation to introduce labeled jumps, add LoopKind distinction for ForIn and ForWhile loops, and improve loop operation consistency. Update integration and bytecode tests with new helper functions and scenarios. 2025-07-02 12:35:40 -04:00
Tim Voronov
714672ceb0 Refactor emitter and loop compilation to replace positional jumps with labeled jumps, improve label management, and optimize control flow handling. Update integration tests and add utility for safe function execution. 2025-07-01 17:34:48 -04:00
Tim Voronov
223c28aa6b Remove outdated compiler benchmarks, refactor function registration in namespace, and migrate math stdlib functions to simplified argument handling. Add new benchmarks for function calls and sorting scenarios. 2025-06-30 17:02:09 -04:00
Tim Voronov
e09f981560 Refactor loop and dataset handling; introduce Patchx method for emitter, add FindParent to loop table, and update DISTINCT logic with nested loop support. Expand integration tests for DISTINCT scenarios. 2025-06-28 14:29:53 -04:00
Tim Voronov
7dbcc24e04 Add COUNT_DISTINCT function to stdlib collections, update related integration tests, and refactor min/max calculation methods for clarity and consistency. 2025-06-27 14:42:47 -04:00
Tim Voronov
f48f819607 Remove obsolete TestCollectAggregateAdditional test file, refactor aggregation logic with skipping empty accumulators, add Length support to collectors and sorters, and update integration tests for grouping and array operations. 2025-06-27 13:47:00 -04:00
Tim Voronov
54c036e9c8 Remove unused HTML element attribute manipulation functionality, including attribute getters, setters, and related utility code, across drivers and stdlib. 2025-06-25 20:48:48 -04:00
Tim Voronov
e60a02ec12 Refactor loop aggregation logic; optimize destination register handling, adjust collector allocation, and improve resource management in nested aggregation scenarios. Update integration tests with consistent formatting for nested FOR cases. 2025-06-25 16:23:39 -04:00
Tim Voronov
dd817e7115 Add nested FOR loop integration tests with grouping and concatenated gender scenarios 2025-06-25 14:31:52 -04:00