Browse thread
GenerateFold
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Nicolas Pouillard <nicolas.pouillard@g...> |
| Subject: | Re: GenerateFold |
On 5/31/07, Joel Reymont <joelr1@gmail.com> wrote:
> I can remove everything but class fold = ... in my code [1] but I
> would still get the error I mentioned previously. Is there an issue
> with GenerateFold?
>
> Thanks, Joel
>
> [1] Code...
>
> (* Remove annotations for unit testing *)
>
> class map = Camlp4Filters.GenerateMap.generated;;
>
> let strip_token_loc = object
> inherit map as super
> method expr e =
> match super#expr e with
> | `TokenPos (a, _) -> a
> | e -> e
> end
>
> let strip_stmt x = strip_token_loc#statement x;;
>
> class fold = Camlp4Filters.GenerateFold.generated;;
>
> let is_fun_arg = object
self is missing
let is_fun_arg = object (self)
> inherit fold as super
> val found = false
> method found = found
> method input_decl x =
> match super#input_decl x with
> | `FunArgDecl _ -> {< found = true >}
> | _ -> self
> end
>
> let is_fun x = (is_fun_arg#statement x)#found;;
>
> module Camlp4Trash = struct
> INCLUDE "easy_ast.ml";;
> end;;
>
>
> --
> http://topdog.cc - EasyLanguage to C# translator
> http://wagerlabs.com - Blog
>
>
>
>
>
>
--
Nicolas Pouillard