summaryrefslogtreecommitdiff
path: root/docs/stats.txt
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-28 16:01:10 +0200
committerPaul Buetow <paul@buetow.org>2026-02-28 16:01:10 +0200
commit075bc33d15b4d11fa03f381c3e03437d9f759c22 (patch)
tree67f65db39e0f89b36f5a38189eb4a6245eab65a4 /docs/stats.txt
parent952357132060dd874fc550d35e0e4f8bc61efd87 (diff)
Refactor _process() by extracting per-operator handler functions [SRP]
_process() was a 510-line function with a nested switch(operator) x switch(type) structure. Extracted 17 static helper functions: - _resolve_composite_op(): maps two-token operator pairs (!=, ==, <=, >=, <<, >>) to their canonical single TokenType - _op_assign(): handles variable and array-element assignment - _op_add(), _op_sub(), _op_mult(), _op_div(): arithmetic operators - _op_eq(), _op_neq(), _op_lt(), _op_gt(), _op_le(), _op_ge(): comparison operators (result always TT_INTEGER) - _op_and(), _op_or(), _op_xor(), _op_lshift(), _op_rshift(): bitwise operators (doubles/strings coerced to int) _process() is now a ~70-line dispatcher. Assignment is guarded by `else if` so it only fires when p_token_op2 == NULL, preserving the original semantics exactly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'docs/stats.txt')
-rw-r--r--docs/stats.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/stats.txt b/docs/stats.txt
index 190942c..fdb7486 100644
--- a/docs/stats.txt
+++ b/docs/stats.txt
@@ -1,6 +1,6 @@
make[1]: Entering directory '/home/paul/git/fype'
===> Num of C source files : 46
-===> Num of C source lines : 8602
+===> Num of C source lines : 8686
===> Num of Fype source examples : 19
-===> Num of Fype source lines : 822
+===> Num of Fype source lines : 883
make[1]: Leaving directory '/home/paul/git/fype'