mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 17:06:31 +08:00
[ocaml][flightplan] No lexer when variable does not contain ocml functions
close #825
This commit is contained in:
committed by
Gautier Hattenberger
parent
a1ade09173
commit
1ad7f901ca
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user