use of com.perl5.lang.htmlmason.parser.stubs.HTMLMasonFlagsStatementStub in project Perl5-IDEA by Camelcade.
the class HTMLMasonFlagsStatementImpl method getParentComponentPath.
@Nullable
@Override
public String getParentComponentPath() {
HTMLMasonFlagsStatementStub stub = getStub();
if (stub != null) {
return stub.getParentComponentPath();
}
PsiPerlCommaSequenceExpr expr = PsiTreeUtil.findChildOfType(this, PsiPerlCommaSequenceExpr.class);
if (expr != null) {
PsiElement firstChild = expr.getFirstChild();
PsiElement lastChild = expr.getLastChild();
if (firstChild instanceof PerlString && StringUtil.equals("inherit", ElementManipulators.getValueText(firstChild)) && lastChild instanceof PerlString) {
return ElementManipulators.getValueText(lastChild);
}
}
return UNDEF_RESULT;
}
Aggregations