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

Quotation, retour à la ligne et location incorrecte #4246

Closed
vicuna opened this issue Mar 29, 2007 · 1 comment
Closed

Quotation, retour à la ligne et location incorrecte #4246

vicuna opened this issue Mar 29, 2007 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Mar 29, 2007

Original bug ID: 4246
Reporter: kerneis
Assigned to: ertai
Status: closed (set by @xavierleroy on 2010-04-29T12:18:13Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10+dev
Fixed in version: 3.10+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

Dans le cas précis de l'utilisation de la quotation par défaut placée en début de ligne (sans aucun espace avant), la location est incorrecte : le retour à la ligne n'est pas pris en compte.

Additional information

En utilisant l'exemple lambda_quot fourni avec ocaml et en le
modifiant :

13:02 gabriel % cat lambda_test_bug.ml
value id = << fun x -> x >> ;
value zero = << fun s -> fun z -> z >> ;
value succ = << fun n -> fun s -> fun z -> s n >> ;
value one =
<< 3 + >> ;

13:03 gabriel % camlp4of ./_build/lambda_quot.cmo lambda_test_bug.ml
File "lambda_test_bug.ml", line 4, characters 16-17:
While expanding quotation "lam":
Parse error: illegal begin of term

13:02 gabriel % cat lambda_test.ml
value id = << fun x -> x >> ;
value zero = << fun s -> fun z -> z >> ;
value succ = << fun n -> fun s -> fun z -> s n >> ;
value one =
<< 3 + >> ;

13:02 gabriel % camlp4of ./_build/lambda_quot.cmo lambda_test.ml
File "lambda_test.ml", line 5, characters 3-4:
While expanding quotation "lam":
Parse error: illegal begin of term

En utilisant <:lam< ... >>, même sans espace en début de ligne, la location est correcte également.

@vicuna
Copy link
Author

vicuna commented Mar 29, 2007

Comment author: ertai

C'est corrigé dans le CVS.

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

No branches or pull requests

1 participant