Skip to content
New issue

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

Addresses typed class properties. #74

Open
wants to merge 1 commit into
base: 1.x-1.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion grammar_parser/reader.inc
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,18 @@ class PGPReader extends PGPParser {
$this->functionCalls[] = &$node/*->data*/;
}
else { // TODO Added 2010-01-27
if ($this->previousTokenValue() == "?") {
$token = &$this->tokens[key($this->tokens)];
$token[1] = $this->previousTokenValue() . $token[1];
}

prev($this->tokens);
$node->data = $this->buildAssignment($modifiers);

// Allow proper handling of typed class properties introduced in
// PHP 7.4 by preventing modifiers from stacking against future
// expressions.
$modifiers = array();
}
}
break;
Expand Down Expand Up @@ -2044,7 +2054,7 @@ class PGPReader extends PGPParser {
default:
prev($this->tokens);
$expression->values->insertLast($this->buildExpression(array(',', ';')));
// $expression->warning = 'unexected syntax in ' . __METHOD__ . '(' . __LINE__ . ')';
// $expression->warning = 'unexpected syntax in ' . __METHOD__ . '(' . __LINE__ . ')';
// $expression->extra = $this->cleanToken();
// return $expression;
break;
Expand Down