Skip to content

Commit

Permalink
[ocaml][flightplan] No lexer when variable does not contain ocml func…
Browse files Browse the repository at this point in the history
…tions

close #825
  • Loading branch information
dewagter authored and gautierhattenberger committed Sep 9, 2014
1 parent a1ade09 commit 1ad7f90
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sw/lib/ocaml/fp_proc.ml
Expand Up @@ -71,11 +71,10 @@ let transform_expression = fun env e ->
let transform_values = fun attribs_not_modified env attribs ->
List.map
(fun (a, v) ->
let e = parse_expression v in
let v' =
if List.mem (String.lowercase a) attribs_not_modified
then v
else transform_expression env e in
else transform_expression env (parse_expression v) in
(a, v'))
attribs

Expand Down Expand Up @@ -146,7 +145,7 @@ let transform_stage = fun prefix reroutes env xml ->
let attribs = transform_values ["wp"; "vmode"] env attribs in
Xml.Element (tag, attribs, children)
| "call" | "set" ->
let attribs = transform_values [] env attribs in
let attribs = transform_values ["var"] env attribs in
Xml.Element (tag, attribs, children)
| _ -> failwith (sprintf "Fp_proc: Unexpected tag: '%s'" tag)
end
Expand Down

0 comments on commit 1ad7f90

Please sign in to comment.