Skip to content

[meta] Scopes for EOD and data section(s) #4350

@michaelblyons

Description

@michaelblyons

What happened?

Several languages have a concept of an "everything after this marker is literal data." To what extent should they share scopes, and what should those scopes be?

PERL

https://perldoc.perl.org/perldata#Special-Literals

while (my $line = <DATA>) { print $line; }
close DATA;
__DATA__
Hello world.

Ruby

https://docs.ruby-lang.org/en/master/Object.html#DATA

puts DATA.gets
__END__
hello world!

YAML

https://www.yaml.info/learn/document.html#end
This is not quite the same, since you can start a new document with ---.

%YAML 1.2
---
foo: bar
...
hello world

Context: #4348

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions