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

Limit parsing of endless heredocs #23

Open
nobodywasishere opened this issue Dec 10, 2024 · 0 comments · May be fixed by #36
Open

Limit parsing of endless heredocs #23

nobodywasishere opened this issue Dec 10, 2024 · 0 comments · May be fixed by #36
Labels
enhancement New feature or request

Comments

@nobodywasishere
Copy link
Member

It would be useful if possible, when a heredoc_end isn't found, that the rest of the file isn't captured by the heredoc_content, and instead terminates early on the following line (where the heredoc_body starts)

image

So that example would be something like:

(source_file
  (call
    receiver: (identifier)
    method: (identifier)
    arguments: (argument_list
      (heredoc_start)
      (identifier))
 (heredoc_body
   (heredoc_content) # this would be empty or not part of the tree
   (MISSING 'HEREDOC_END')) # this would be on the line following the heredoc_start
 (call
   method: (identifier)
   arguments: (argument_list
     (string)))
@nobodywasishere nobodywasishere added the enhancement New feature or request label Dec 10, 2024
@nobodywasishere nobodywasishere linked a pull request Dec 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant