Beispiel #1
0
void CodeGenerator::printExpression(ExpressionPtr expression, bool isRef) {
  if (isRef) {
    printObjectHeader("UnaryOpExpression", 4);
    printPropertyHeader("expression");
    expression->outputCodeModel(*this);
    printPropertyHeader("operation");
    printValue(PHP_REFERENCE_OP);
    printPropertyHeader("sourceLocation");
    printLocation(expression->getLocation());
    printObjectFooter();
  } else {
    expression->outputCodeModel(*this);
  }
}
Beispiel #2
0
void CodeGenerator::printTypeExpression(ExpressionPtr expression) {
  printObjectHeader("TypeExpression", 2);
  printPropertyHeader("name");
  expression->outputCodeModel(*this);
  printPropertyHeader("sourceLocation");
  printLocation(expression);
  printObjectFooter();
}
Beispiel #3
0
void CodeGenerator::printExpressionVector(ExpressionPtr e) {
  if (e->is(Expression::KindOfExpressionList)) {
    auto sl = static_pointer_cast<ExpressionList>(e);
    printExpressionVector(sl);
  } else {
    printf("V:9:\"HH\\Vector\":1:{");
    e->outputCodeModel(*this);
    printf("}");
  }
}
Beispiel #4
0
void CodeGenerator::printExpressionVector(ExpressionPtr e) {
  printf("V:9:\"HH\\Vector\":1:{");
  e->outputCodeModel(*this);
  printf("}");
}