visitExpressionStmt method

  1. @override
void visitExpressionStmt(
  1. ExpressionStatement stmt,
  2. EmitterVisitorContext context
)
override

Implementation

@override
void visitExpressionStmt(
    o.ExpressionStatement stmt, EmitterVisitorContext context) {
  stmt.expr.visitExpression(this, context);

  var sourceComment = '';
  var sourceReference = stmt.sourceReference;
  if (sourceReference != null) {
    sourceComment = '/* REF:'
        '${sourceReference.sourceUrl}'
        ':'
        '${sourceReference.startOffset}'
        ':'
        '${sourceReference.endOffset}'
        ' */';
  }
  context.println('$sourceComment;');
}