Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining named regular expressions using nested let statements. #41

Open
ciaran16 opened this issue Jul 11, 2016 · 1 comment
Open

Defining named regular expressions using nested let statements. #41

ciaran16 opened this issue Jul 11, 2016 · 1 comment

Comments

@ciaran16
Copy link

If I define a named regexp using nested let statements I get an error when trying to use it.

For example:

let int_lit =
  let digit = [%sedlex.regexp? '0'..'9'] in
  [%sedlex.regexp? Plus digit]

Then later on:

match%sedlex buf with
| int_lit -> ...

Sedlex: unbound regexp int_lit.

@pmetzger
Copy link
Member

pmetzger commented Oct 8, 2017

I've noticed this same problem. In general let ... in seems fragile for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants