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

The order of multiple Heredocs might be wrong in syntax #15

Closed
clouds56 opened this issue Sep 15, 2022 · 2 comments
Closed

The order of multiple Heredocs might be wrong in syntax #15

clouds56 opened this issue Sep 15, 2022 · 2 comments

Comments

@clouds56
Copy link

According to the raku docs, this code should work

my ($first, $second) = qq:to/END1/, qq:to/END2/; 
  FIRST
  MULTILINE
  STRING
  END1
   SECOND
   MULTILINE
   STRING
   END2 
say $first;  # OUTPUT: «FIRST␤MULTILINE␤STRING␤»
say $second; # OUTPUT: «SECOND␤MULTILINE␤STRING␤»

while the syntax could only recognize (which could not compile)

my ($first, $second) = qq:to/END1/, qq:to/END2/; 
   SECOND
   MULTILINE
   STRING
   END2 
  FIRST
  MULTILINE
  STRING
  END1
say $first;  # OUTPUT: «FIRST␤MULTILINE␤STRING␤»
say $second; # OUTPUT: «SECOND␤MULTILINE␤STRING␤»
@clouds56
Copy link
Author

The interesting thing is that the Github seems only recognize wrong syntax as well

@bscan
Copy link
Owner

bscan commented Sep 16, 2022

Hi @clouds56! Thanks for using the extension, I hope it's working well for you. For syntax highlighting, I mostly just copied the highlighting from here https://github.com/Raku/atom-language-perl6 . Looks like this issue is fairly similar: Raku/atom-language#63 . Although the development in that repo is not very active, I think it's still good to centralize issues there.

Github has the same issue because it also uses that repo https://github.com/github/linguist/blob/master/vendor/README.md

@bscan bscan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
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