concurix-instrument
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -67,2 +67,15 @@ "use strict"; | ||
// Return blocks with comma operators are evil. | ||
// If we see them attempt to wrap the SequenceExpression with parens | ||
if (node.argument && node.argument.type == "SequenceExpression") { | ||
proxy = proxy + "(" | ||
var endParen = actualEnd | ||
// Semicolon check. | ||
if (content.slice(actualEnd - 1, actualEnd) === ";") { | ||
endParen-- | ||
} | ||
insertions.push({pos: endParen, insertion: ")", pri: 2}) | ||
actualEnd++ | ||
} | ||
if (parent.type != "BlockStatement") { | ||
@@ -75,3 +88,3 @@ // If not in a BlockStatement, need to put it in one. | ||
insertions.push({pos: node.range[0], remove: toRemove.length, insertion: proxy, pri: 1}) | ||
insertions.push({pos: actualEnd, insertion: preserveIndent + exitInsert + preserveIndent + reply, pri: 2}) | ||
insertions.push({pos: actualEnd, insertion: preserveIndent + exitInsert + preserveIndent + reply, pri: 3}) | ||
} | ||
@@ -78,0 +91,0 @@ else { |
{ | ||
"name": "concurix-instrument", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Apply Concurix tracing instrumentation to client code.", | ||
@@ -5,0 +5,0 @@ "main": "instrument.js", |
28941
696