1. 18 Feb, 2026 5 commits
  2. 17 Feb, 2026 12 commits
    • Roman Alifanov's avatar
      Update documentation for AWK sync and dict.field fix · 9f47c906
      Roman Alifanov authored
      - CLAUDE.md: expanded @awk section with new features
      - README.md: updated @awk supported features list
      - LANGUAGE_SPEC.md: added AWK extras, dict.field syntax
      9f47c906
    • Roman Alifanov's avatar
      Sync AWK codegen with bash codegen, fix dict.field assignment · a8f275f6
      Roman Alifanov authored
      AWK codegen:
      - Add string interpolation: "Hello {name}" -> ("Hello " name "!")
      - Add env.VAR support via ENVIRON["VAR"]
      - Add time.now() via systime()
      - Add str.chr() via sprintf("%c", n)
      - Add assert_eq() for equality assertions
      - Add print() as statement
      - Add method calls as statements (arr.push, dict.set)
      
      Bash codegen:
      - Fix dict.field = value for dict variables (was using wrong storage)
      - Fix dict.field read to use dict["field"] syntax
      a8f275f6
    • Roman Alifanov's avatar
      Add obj.field = value syntax for object field assignment · 5e6d896e
      Roman Alifanov authored
      Support assigning to object fields from outside the class using
      obj.field = value syntax with all compound operators (=, +=, -=, *=, /=, ..=).
      Also support typed parameters in functions to enable field assignment
      on passed objects.
      5e6d896e
    • Roman Alifanov's avatar
      27136f0b
    • Roman Alifanov's avatar
      Add env.VAR = value syntax for setting environment variables · 573f120a
      Roman Alifanov authored
      - env.VAR = value generates export VAR="value"
      - Supports interpolation: env.GREETING = "Hello, {name}!"
      - Add 2 tests for env.set functionality
      - Update all documentation files
      573f120a
    • Roman Alifanov's avatar
      Add env.VAR syntax for environment variables · 25773938
      Roman Alifanov authored
      - Access env vars directly: env.HOME, env.USER, env.PATH
      - Generates ${VAR} without fork (no shell.capture needed)
      - Type is 'any', can be explicitly typed: port: int = env.PORT
      - Add 4 tests for env variables including int arithmetic
      - Update all documentation files
      25773938
    • Roman Alifanov's avatar
      Add optional static typing with TypeScript-style syntax · 5121e024
      Roman Alifanov authored
      - Add TypeAnnotation AST node for type annotations
      - Add ClassField dataclass for typed class fields
      - Extend Parameter, FunctionDecl, Assignment with type_annotation field
      - Add type parsing: parse_type(), parse_type_annotation(), parse_function_type()
      - Support types: string, int, float, bool, any, void, T[], dict[K,V], classes, (A) => B
      - Add type checking at compile time with configurable error handling
      - Add --no-type-check and --warn-types CLI flags
      - Fix callback variable calls (prioritize callback_vars, use $() capture)
      - Document closure limitation (lambdas can't capture outer variables)
      - Add 28 new tests for typing and callbacks (279 total)
      5121e024
    • Roman Alifanov's avatar
      Add user decorators, callbacks, and UTF-8 urlencode · 15296652
      Roman Alifanov authored
      - User decorators (@obj.method(args)) for handler registration
      - Callbacks: pass functions/lambdas as arguments
      - Fix UTF-8 urlencode with LC_ALL=C
      - Fix dict field access in class methods
      - Refactor telegram_echobot to use decorators
      - Add tests for callbacks and user decorators
      - Update documentation (LANGUAGE_SPEC, README)
      15296652
    • Roman Alifanov's avatar
      Refactor: unified method registry and codegen cleanup · d68d4f71
      Roman Alifanov authored
      - Split methods.py into methods/ directory with separate modules
      - Add awk_builtin field to Method for unified AWK generation
      - Replace hardcoded method dispatch in awk_codegen with generate_awk()
      - Add RET_VAR/RET_ARR constants, replace hardcoded __CT_RET
      - Migrate all codegen files to use indented() context manager
      d68d4f71
    • Roman Alifanov's avatar
      Refactor stdlib.py to use declarative method definitions · c3bf25cc
      Roman Alifanov authored
      - Import method definitions from methods.py for consistency
      - Define bash implementations in STRING_IMPLS, ARRAY_IMPLS, DICT_IMPLS
      - Generate stdlib functions from these definitions
      - Use context manager (with self.indented()) for cleaner code
      - Reduce code duplication and improve maintainability
      c3bf25cc
    • Roman Alifanov's avatar
      Improve parameter passing for arrays, dicts and class instances · 0e7f2d60
      Roman Alifanov authored
      - Add proper type tracking for function and method parameters
      - DCE now tracks array-returning methods (keys, split, slice)
      - Fix split/slice to return arrays via __CT_RET_ARR
      - Add foreach support for inline split expressions
      - Detect object parameters by unknown method calls
      - Add comprehensive tests for parameter passing
      
      New test classes:
      - TestFunctionParameterPassing (11 tests)
      - TestClassInstancePassing (4 tests)
      0e7f2d60
    • Roman Alifanov's avatar
      Fix critical codegen bugs for complex expressions · a9fe7b9d
      Roman Alifanov authored
      - String interpolation with operators: {a == b} now generates proper
        bash comparison instead of invalid ${a == b}
      - Double method call in conditions: CSE precompute now correctly reuses
        temp variable for CallExpr to avoid calling method twice
      - arr.push() with method call: detect side effects and call method
        separately to avoid subshell state isolation
      - charAt() with newline: use printf X marker to preserve trailing newlines
      - this.field.method() and obj.field.method(): handle nested MemberAccess
        in return statements and assignments
      - Namespace vs variable collision: check if identifier is known variable
        before treating as namespace
      - return func() with arrays: use _generate_call_arg for proper nameref
      a9fe7b9d
  3. 16 Feb, 2026 20 commits