parser
Goal
Add call-site type arguments to method calls AND free-function calls via speculative parse with resolve-time fallback (NEVER the unsound deterministic trailing-( rule).
Implementation Sketch
Reuse IN_TYPE (CF-1) + snapshot/try_parse (SN-3) + the channel-constructor < dispatch (KW-1). After a callee name, snapshot, attempt type_args then (; commit only if the generic-call reading resolves, else restore and parse < as comparison. Attach [type_args] into postfix_op (method) and the call-bearing identifier primary (free-function). Add an AST type-arg carrier field to MethodCall / MethodCallNamed / the free-function call node. Reject type_args after a tuple-index member (int_literal member name).
Spec References
Proposal Design (Disambiguation, Grammar); parse.md CF-1/SN-3/KW-1/LB-1/PR-4.
Work Items
- Speculative-parse disambiguation grounded on IN_TYPE + snapshot + channel
<dispatch; resolve-time fallback preserves comparison reading. - Attach
[type_args]into postfix_op (method call) and the call-bearing identifier primary (free-function call). - Add AST type-argument carrier field to MethodCall / MethodCallNamed / free-function call node; reject type_args after a tuple-index member.