mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-09 22:16:10 +03:00
refactor(runtime): ignore function definition while parsing raw events
This commit is contained in:
parent
541f014396
commit
97cf14b3f5
@ -367,15 +367,10 @@ module EventParser = struct
|
||||
let rec parse_events (ctx : context) : context =
|
||||
match ctx.rest with
|
||||
| [] -> { ctx with events = ctx.events |> List.rev }
|
||||
| VariableDefinition (name, value) :: rest when is_var_def name ->
|
||||
parse_events
|
||||
{
|
||||
ctx with
|
||||
events =
|
||||
VarComputation { pos = None; name; value; fun_calls = None }
|
||||
:: ctx.events;
|
||||
rest;
|
||||
}
|
||||
| VariableDefinition (name, _) :: rest when is_var_def name ->
|
||||
(* VariableDefinition without position corresponds to a function
|
||||
definition which are ignored for now in structured events. *)
|
||||
parse_events { ctx with rest }
|
||||
| DecisionTaken pos :: VariableDefinition (name, value) :: rest
|
||||
when is_subscope_input_var_def name -> (
|
||||
match name with
|
||||
|
Loading…
Reference in New Issue
Block a user