From: Thomas Refis <thomas.refis@gmail.com>
To: "Matej Košík" <mail@matej-kosik.net>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] how to get location of a polymorphic variant via compiler libs
Date: Thu, 19 Oct 2017 12:01:30 +0100 [thread overview]
Message-ID: <CAJ_epFMRSBPJ8Yb9Uio61jRNwPRsy6QpJBuOHN4C2VCaU05z0w@mail.gmail.com> (raw)
In-Reply-To: <59fb8cd9-0b10-b3a8-7ebf-d7a0b5d1583a@matej-kosik.net>
[-- Attachment #1: Type: text/plain, Size: 714 bytes --]
https://github.com/ocaml/ocaml/blob/trunk/parsing/parsetree.mli#L144
2017-10-19 11:55 GMT+01:00 Matej Košík <mail@matej-kosik.net>:
> Hi,
>
> I am using compiler-libs for getting locations of lexical items I am
> interested in.
> (modules, values, types, non-polymorphic variants, record labels).
>
> If I have a code like this:
>
> type t = [`Foo | `Bar]
>
> does the parse-tree hold the location of "`Foo" (or "`Bar") somewhere?
>
> (I am not interested in the location of the whole type definition --- just
> the location of a specific polymorphic variant/constructor.)
>
> The attachment display the available parse-tree I can see
> (and not able to find bits I am interested in)
>
[-- Attachment #2: Type: text/html, Size: 1140 bytes --]
prev parent reply other threads:[~2017-10-19 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 10:55 Matej Košík
2017-10-19 11:01 ` Thomas Refis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ_epFMRSBPJ8Yb9Uio61jRNwPRsy6QpJBuOHN4C2VCaU05z0w@mail.gmail.com \
--to=thomas.refis@gmail.com \
--cc=caml-list@inria.fr \
--cc=mail@matej-kosik.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox