Skip to content

Commit 3e36d5e

Browse files
committed
Clarify __END__ comment
1 parent 78aa15a commit 3e36d5e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

include/prism/parser.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,11 @@ struct pm_parser {
557557
/** The list of magic comments that have been found while parsing. */
558558
pm_list_t magic_comment_list;
559559

560-
/** The optional location of the __END__ keyword and its contents. */
560+
/**
561+
* An optional location that represents the location of the __END__ marker
562+
* and the rest of the content of the file. This content is loaded into the
563+
* DATA constant when the file being parsed is the main file being executed.
564+
*/
561565
pm_location_t data_loc;
562566

563567
/** The list of warnings that have been found while parsing. */

lib/prism/parse_result.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ class ParseResult
369369
# The list of magic comments that were encountered during parsing.
370370
attr_reader :magic_comments
371371

372-
# An optional location that represents the location of the content after the
373-
# __END__ marker. This content is loaded into the DATA constant when the
374-
# file being parsed is the main file being executed.
372+
# An optional location that represents the location of the __END__ marker
373+
# and the rest of the content of the file. This content is loaded into the
374+
# DATA constant when the file being parsed is the main file being executed.
375375
attr_reader :data_loc
376376

377377
# The list of errors that were generated during parsing.

0 commit comments

Comments
 (0)