diff options
Diffstat (limited to 'otherlibs/labltk/compiler')
-rw-r--r-- | otherlibs/labltk/compiler/compile.ml | 11 | ||||
-rw-r--r-- | otherlibs/labltk/compiler/parser.mly | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/otherlibs/labltk/compiler/compile.ml b/otherlibs/labltk/compiler/compile.ml index b6b1fcd88..76be09ddb 100644 --- a/otherlibs/labltk/compiler/compile.ml +++ b/otherlibs/labltk/compiler/compile.ml @@ -612,10 +612,19 @@ let rec converterCAMLtoTK ~context_widget argname ty = String.concat ~sep:"; " (List.map2 vars tyl ~f:(converterCAMLtoTK ~context_widget)) :: ["]"]) + | List ty -> (* Just added for Imagephoto.put *) + String.concat ~sep:" " + [(if !Flags.camltk then + "TkQuote (TkTokenList (List.map (fun y -> " + else + "TkQuote (TkTokenList (List.map ~f:(fun y -> "); + converterCAMLtoTK ~context_widget "y" ty; + ")"; + argname; + "))"] | Function _ -> fatal_error "unexpected function type in converterCAMLtoTK" | Unit -> fatal_error "unexpected unit type in converterCAMLtoTK" | Record _ -> fatal_error "unexpected product type in converterCAMLtoTK" - | List ty -> fatal_error "unexpected list type in converterCAMLtoTK" (* * Produce a list of arguments from a template diff --git a/otherlibs/labltk/compiler/parser.mly b/otherlibs/labltk/compiler/parser.mly index d338a037c..c797f4fb5 100644 --- a/otherlibs/labltk/compiler/parser.mly +++ b/otherlibs/labltk/compiler/parser.mly @@ -109,7 +109,7 @@ Type1 : Type2 : Type1 { $1 } - | Type1 LIST + | Type2 LIST { List $1 } ; |