use of claw.tatsu.xcodeml.abstraction.NestedDoStatement in project claw-compiler by C2SM-RCM.
the class ScaForward method analyze.
@Override
public boolean analyze(XcodeProgram xcodeml, Translator translator) {
Xnode next = _claw.getPragma().nextSibling();
if (next == null) {
xcodeml.addError("Directive is not followed by a valid statement.", _claw.getPragma());
return false;
}
if (Xnode.isOfCode(next, Xcode.EXPR_STATEMENT) || Xnode.isOfCode(next, Xcode.F_ASSIGN_STATEMENT)) {
_isNestedInAssignment = Xnode.isOfCode(next, Xcode.F_ASSIGN_STATEMENT);
Xnode fctCallNode = next.matchSeq(Xcode.FUNCTION_CALL);
if (fctCallNode != null) {
_fCall = new FunctionCall(fctCallNode);
return analyzeForward(xcodeml);
}
} else if (Xnode.isOfCode(next, Xcode.F_DO_STATEMENT)) {
_doStatements = new NestedDoStatement(next);
return analyzeForwardWithDo(xcodeml);
}
xcodeml.addError("Directive is not followed by a valid statement.", _claw.getPragma());
return false;
}
Aggregations