| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each 'try' block has a nextstate COP prepended to it. Currently this cop
has the line number of the line following the end of the try block. Fix
it so that it has the line number of the line containing the 'try'
keyword instead.
This is achieved using the same technique as other block-introducing
keywords like 'while': set the .ival of the 'try' token returned by the
lexer to the current line number, then set PL_parser->copline back to that
value after parsing the block but before creating the COP.
This issue was showing up as a failure in
cd t; ./TEST -deparse op/try.t
since that test script is line-number sensitive.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds syntax `defer { BLOCK }` to create a deferred block; code that is
deferred until the scope exits. This syntax is guarded by
use feature 'defer';
Adds a new opcode, `OP_PUSHDEFER`, which is a LOGOP whose `op_other` field
gives the start of an optree to be deferred until scope exit. That op
pointer will be stored on the save stack and invoked as part of scope
unwind.
Included is support for `B::Deparse` to deparse the optree back into
syntax.
|
| |
|
|
|
|
|
|
|
| |
This is a rebasing by @khw of part of GH #18792, which I needed to get
in now to proceed with other commits.
It also strips trailing white space from the affected files.
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: James E Keenan <jkeenan@cpan.org>
Remove 2nd const from patch originally submitted in
https://github.com/Perl/perl5/pull/18726; it was causing two build-time
warnings.
Alyssa Ross is now a Perl author.
|
|
|
|
|
|
|
|
|
| |
* Add feature, experimental warning, keyword
* Basic parsing
* Basic implementation as optree fragment
See also
https://github.com/Perl/perl5/issues/18504
|
|
|
|
|
| |
This was the consensus in
http://nntp.perl.org/group/perl.perl5.porters/258489
|
| |
|
|
|
|
|
| |
A future commit will need it to represent just the meaning of the new
name
|
|
|
|
|
|
|
| |
Rather than know how far we have advanced in parsing when we have to
back up, save the checkpoint position and simply backtrack to it. This
results in slightly more maintainable code that a future commit will
take advantage of.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit copies portions of new_regcurly(), which has been around
since 5.28, into plain regcurly(), as a baby step in preparation for
converting entirely to the new one. These functions are used for
parsing {m,n} quantifiers. Future commits will add capabilities not
available using the old version.
The commit adds an optional parameter, to return to the caller
information it gleans during parsing.
regpiece() is changed by this commit to use this information, instead of
itself reparsing the input. Part of the reason for this commit is that
changes are planned soon to what is legal syntax. With this commit in
place, those changes only have to be done once.
This commit also extracts into a function the calculation of the
quantifier bounds. This allows the logic for that to be done in one
place instead of two.
|
| |
|
|
|
|
| |
This disables use of bareword filehandles except for the built-in handles
|
|
|
|
| |
f23102e2d6 removed DOROP token (KEY_err) but related grammar remained
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
regardless of the fact that both have same value
their meaning is different and should not be mixed
|
|
|
|
|
|
|
|
|
|
|
| |
These variables are only used on emitting diagnostic messages.
Calculating them on-demand will make the code slightly faster
on normal cases.
Note: previously bases[], Bases[] and maxima[] may be completely
optimized out by fusing array accesses into if-brances.
Now they become real arrays, and will slightly increase the number
of dynamic relocations on PIC build.
|
| |
|
|
|
|
| |
t/base/num.t: Add some test for "0odddd" octals.
|
|
|
|
| |
which is what it is doing, instead of the more general SvPV_renew.
|
|
|
|
|
| |
This allows to use the current features bundle
defined by the current version of Perl.
|
|
|
| |
Co-authored-by: Karl Williamson <khw@cpan.org>
|
|
|
|
|
| |
It only does anything under PERL_GLOBAL_STRUCT, which is gone.
Keep the dNOOP defintion for CPAN back-compat
|
|
|
|
|
|
|
| |
This is intended as a minimal commit due to the current stage
of the release process.
fixes #17268
|
|
|
|
|
| |
len is only used in these functions to pass to the other function when
recursing.
|
|
|
|
|
| |
The len variable is used, but the value is overwritten before being
read.
|
| |
|
|
|
|
| |
Introduced in 0ae5281a2d.
|
| |
|
| |
|