diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-01-09 14:02:17 -0500 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-01-09 19:02:26 +0000 |
| commit | 80da9b1547ff69e2cd226f2fa7c43a9adf77de85 (patch) | |
| tree | 69bc77d114b3037a4df62690f422b5eb9d220fac | |
| parent | 55b7121358e2bed9b90001405b651f57fafbeaad (diff) | |
[ruby/prism] Clarify __END__ comment
https://github.com/ruby/prism/commit/3e36d5eabc
| -rw-r--r-- | lib/prism/parse_result.rb | 6 | ||||
| -rw-r--r-- | prism/parser.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/prism/parse_result.rb b/lib/prism/parse_result.rb index 753d72f10b..556c664019 100644 --- a/lib/prism/parse_result.rb +++ b/lib/prism/parse_result.rb @@ -369,9 +369,9 @@ module Prism # The list of magic comments that were encountered during parsing. attr_reader :magic_comments - # An optional location that represents the location of the content after the - # __END__ marker. This content is loaded into the DATA constant when the - # file being parsed is the main file being executed. + # An optional location that represents the location of the __END__ marker + # and the rest of the content of the file. This content is loaded into the + # DATA constant when the file being parsed is the main file being executed. attr_reader :data_loc # The list of errors that were generated during parsing. diff --git a/prism/parser.h b/prism/parser.h index 9f38dc5830..c7ebb64b60 100644 --- a/prism/parser.h +++ b/prism/parser.h @@ -557,7 +557,11 @@ struct pm_parser { /** The list of magic comments that have been found while parsing. */ pm_list_t magic_comment_list; - /** The optional location of the __END__ keyword and its contents. */ + /** + * An optional location that represents the location of the __END__ marker + * and the rest of the content of the file. This content is loaded into the + * DATA constant when the file being parsed is the main file being executed. + */ pm_location_t data_loc; /** The list of warnings that have been found while parsing. */ |
