René's URL Explorer Experiment


Title: Heredoc's body range is wrong when multiple heredocs used · Issue #93 · lib-ruby-parser/lib-ruby-parser · GitHub

Open Graph Title: Heredoc's body range is wrong when multiple heredocs used · Issue #93 · lib-ruby-parser/lib-ruby-parser

X Title: Heredoc's body range is wrong when multiple heredocs used · Issue #93 · lib-ruby-parser/lib-ruby-parser

Description: Hi, thank you for so useful library. Today I found a problem about a heredoc. Its body location range seems wrong when multiple heredocs are used. Example Ruby code that reproduces the problem: puts(<<~H1, <<~H2) 1 H1 2 H2 You can see th...

Open Graph Description: Hi, thank you for so useful library. Today I found a problem about a heredoc. Its body location range seems wrong when multiple heredocs are used. Example Ruby code that reproduces the problem: put...

X Description: Hi, thank you for so useful library. Today I found a problem about a heredoc. Its body location range seems wrong when multiple heredocs are used. Example Ruby code that reproduces the problem: put...

Opengraph URL: https://github.com/lib-ruby-parser/lib-ruby-parser/issues/93

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Heredoc's body range is wrong when multiple heredocs used","articleBody":"Hi, thank you for so useful library.\r\nToday I found a problem about a heredoc. Its body location range seems wrong when multiple heredocs are used.\r\n\r\nExample Ruby code that reproduces the problem:\r\n\r\n```ruby\r\nputs(\u003c\u003c~H1, \u003c\u003c~H2)\r\n1\r\nH1\r\n2\r\nH2\r\n```\r\n\r\nYou can see the problem by this Rust code that parse the above Ruby code and prints the AST.\r\n\r\n```rust\r\nfn main() {\r\n    let src = \"puts(\u003c\u003c~H1, \u003c\u003c~H2)\r\n1\r\nH1\r\n2\r\nH2\";\r\n    let parser = lib_ruby_parser::Parser::new(src, Default::default());\r\n    let result = parser.do_parse();\r\n    dbg!(result.ast);\r\n}\r\n```\r\n\r\nThere are two `Heredoc` nodes in the AST. However, the second body range includes the first body range.\r\n\r\n- `H1` ... `heredoc_body_l: 19...21`\r\n- `H2`  ... `heredoc_body_l: 19...26`\r\n\r\nWhole print result:\r\n\r\n```\r\n[src/main.rs:9] result.ast = Some(\r\n    Send(\r\n        Send {\r\n            recv: None,\r\n            method_name: \"puts\",\r\n            args: [\r\n                Heredoc(\r\n                    Heredoc {\r\n                        parts: [\r\n                            Str(\r\n                                Str {\r\n                                    value: Bytes {\r\n                                        raw: [\r\n                                            49,\r\n                                            10,\r\n                                        ],\r\n                                    },\r\n                                    begin_l: None,\r\n                                    end_l: None,\r\n                                    expression_l: 19...21,\r\n                                },\r\n                            ),\r\n                        ],\r\n                        heredoc_body_l: 19...21,\r\n                        heredoc_end_l: 21...23,\r\n                        expression_l: 5...10,\r\n                    },\r\n                ),\r\n                Heredoc(\r\n                    Heredoc {\r\n                        parts: [\r\n                            Str(\r\n                                Str {\r\n                                    value: Bytes {\r\n                                        raw: [\r\n                                            50,\r\n                                            10,\r\n                                        ],\r\n                                    },\r\n                                    begin_l: None,\r\n                                    end_l: None,\r\n                                    expression_l: 19...26,\r\n                                },\r\n                            ),\r\n                        ],\r\n                        heredoc_body_l: 19...26,\r\n                        heredoc_end_l: 26...28,\r\n                        expression_l: 12...17,\r\n                    },\r\n                ),\r\n            ],\r\n            dot_l: None,\r\n            selector_l: Some(\r\n                0...4,\r\n            ),\r\n            begin_l: Some(\r\n                4...5,\r\n            ),\r\n            end_l: Some(\r\n                17...18,\r\n            ),\r\n            operator_l: None,\r\n            expression_l: 0...18,\r\n        },\r\n    ),\r\n)\r\n```","author":{"url":"https://github.com/ryym","@type":"Person","name":"ryym"},"datePublished":"2023-12-17T02:52:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/93/lib-ruby-parser/issues/93"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c84719fd-068f-9c04-0751-b18fe86dc141
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC5D0:18F78E:F4B9A:13B659:69900D61
html-safe-noncedc40a26d111c7947049036c68cd627af1a524ad46ae4bfa180d47caf331425e3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUQwOjE4Rjc4RTpGNEI5QToxM0I2NTk6Njk5MDBENjEiLCJ2aXNpdG9yX2lkIjoiMTI4OTc3NjUyODk4MTIzMjk5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5c485632ab9ed1df99a9654a5495da37bc328e2716ca7557752f1eb51c6d3ea9
hovercard-subject-tagissue:2045031888
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lib-ruby-parser/lib-ruby-parser/93/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9bee1da95f89f1e19ca97f9586130616ac72b2951ca4f315bf4e32c26aff6542/lib-ruby-parser/lib-ruby-parser/issues/93
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9bee1da95f89f1e19ca97f9586130616ac72b2951ca4f315bf4e32c26aff6542/lib-ruby-parser/lib-ruby-parser/issues/93
og:image:altHi, thank you for so useful library. Today I found a problem about a heredoc. Its body location range seems wrong when multiple heredocs are used. Example Ruby code that reproduces the problem: put...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameryym
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
go-importgithub.com/lib-ruby-parser/lib-ruby-parser git https://github.com/lib-ruby-parser/lib-ruby-parser.git
octolytics-dimension-user_id71789678
octolytics-dimension-user_loginlib-ruby-parser
octolytics-dimension-repository_id298071274
octolytics-dimension-repository_nwolib-ruby-parser/lib-ruby-parser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id298071274
octolytics-dimension-repository_network_root_nwolib-ruby-parser/lib-ruby-parser
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/issues/93#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Flib-ruby-parser%2Flib-ruby-parser%2Fissues%2F93
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Flib-ruby-parser%2Flib-ruby-parser%2Fissues%2F93
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=lib-ruby-parser%2Flib-ruby-parser
Reloadhttps://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/issues/93
Reloadhttps://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/issues/93
Reloadhttps://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/issues/93
lib-ruby-parser https://patch-diff.githubusercontent.com/lib-ruby-parser
lib-ruby-parserhttps://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Flib-ruby-parser%2Flib-ruby-parser
Fork 10 https://patch-diff.githubusercontent.com/login?return_to=%2Flib-ruby-parser%2Flib-ruby-parser
Star 242 https://patch-diff.githubusercontent.com/login?return_to=%2Flib-ruby-parser%2Flib-ruby-parser
Code https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser
Issues 3 https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/issues
Pull requests 1 https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/pulls
Discussions https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/discussions
Actions https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/actions
Projects 0 https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/projects
Security 0 https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/security
Insights https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/pulse
Code https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser
Issues https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/issues
Pull requests https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/pulls
Discussions https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/discussions
Actions https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/actions
Projects https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/projects
Security https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/security
Insights https://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/pulse
Heredoc's body range is wrong when multiple heredocs usedhttps://patch-diff.githubusercontent.com/lib-ruby-parser/lib-ruby-parser/issues/93#top
https://github.com/ryym
https://github.com/ryym
ryymhttps://github.com/ryym
on Dec 17, 2023https://github.com/lib-ruby-parser/lib-ruby-parser/issues/93#issue-2045031888
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.