We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the docs for PPI::Statement::Compound, it says:
PPI::Statement::Compound
type The type method returns the syntactic type of the compound statement. There are four basic compound statement types. The 'if' type includes all variations of the if and unless statements, including any 'elsif' or 'else' parts of the compound statement. The 'while' type describes the standard while and until statements, but again does not describes simple statements with a trailing while. The 'for' type covers the C-style for loops, regardless of whether they were declared using 'for' or 'foreach'. The 'foreach' type covers loops that iterate over collections, regardless of whether they were declared using 'for' or 'foreach'. All of the compounds are a variation on one of these four. Returns the simple string 'if', 'for', 'foreach' or 'while', or undef if the type cannot be determined.
The type method returns the syntactic type of the compound statement.
There are four basic compound statement types.
The 'if' type includes all variations of the if and unless statements, including any 'elsif' or 'else' parts of the compound statement.
The 'while' type describes the standard while and until statements, but again does not describes simple statements with a trailing while.
The 'for' type covers the C-style for loops, regardless of whether they were declared using 'for' or 'foreach'.
The 'foreach' type covers loops that iterate over collections, regardless of whether they were declared using 'for' or 'foreach'.
All of the compounds are a variation on one of these four.
Returns the simple string 'if', 'for', 'foreach' or 'while', or undef if the type cannot be determined.
However, parsing the code { foo(); next; bar(); } gives a PPI::Statement::Compound with the type 'continue', which is not mentioned.
{ foo(); next; bar(); }
'continue'
The docs should be updated to include the missing type.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the docs for
PPI::Statement::Compound
, it says:However, parsing the code
{ foo(); next; bar(); }
gives aPPI::Statement::Compound
with the type'continue'
, which is not mentioned.The docs should be updated to include the missing type.
The text was updated successfully, but these errors were encountered: