Skip to content

v0.1.25

Choose a tag to compare

@gmpassos gmpassos released this 24 Apr 07:08
· 454 commits to master since this release
  • ApolloCodeGeneratorDart:
    • generateASTExpression:
      • Fixed string template merging logic to correctly handle variable accesses and literal strings by swapping checks on expression1 and expression2.
      • Improved merging of adjacent quoted strings with different quote types by adding _tryMergeQuotedStrings and related helper methods.
      • Added robust checks for unescaped quotes inside strings to safely convert quote types.
    • Added helper methods:
      • _isQuotedString, _isSingleQuoteString, _isDoubleQuoteString
      • _canConvertQuote, _convertQuote
      • _mergeQuotedStrings, _tryMergeQuotedStrings
  • DartGrammarDefinition:
    • Refactored expression parsing to delegate expression operation precedence and logical operator handling to computeFinalExpression.
  • DartGrammarLexer:
    • Refactored to extend new BaseGrammarLexer abstract class.
    • Moved common lexer methods and token handling to BaseGrammarLexer.
    • Updated whitespace and comment parsers to static methods for reuse.
  • BaseGrammarLexer (new):
    • Added as base class for grammar lexers with common token and identifier parsing.
    • Added expression operation precedence handling via computeFinalExpression and reduceExpressionBlock.
  • Java11GrammarLexer:
    • Refactored to extend BaseGrammarLexer.
    • Removed duplicated token and identifier parsing code.
    • Updated whitespace and comment parsers to static methods.
  • Java11GrammarDefinition:
    • Refactored expression parsing to use computeFinalExpression for operator precedence.
  • Tests:
    • Added comprehensive Dart arithmetic and logical expression tests covering operator precedence, mixed numeric types, and complex expressions.
    • Updated multiple Dart and Java11 test definitions to normalize expression grouping from a + (b + c) to (a + b) + c for consistent operator associativity.
    • Fixed string concatenation tests to correctly merge adjacent string literals and variables.
    • Updated WASM tests to fix generated bytecode for integer operations.
    • Fixed linear regression and forecast tests with corrected arithmetic expressions.
    • Improved test outputs to reflect corrected expression evaluation and string concatenation results.