(context, func)
| 31867 | setContextFlag(val, 32768 /* NodeFlags.AwaitContext */); |
| 31868 | } |
| 31869 | function doOutsideOfContext(context, func) { |
| 31870 | // contextFlagsToClear will contain only the context flags that are |
| 31871 | // currently set that we need to temporarily clear |
| 31872 | // We don't just blindly reset to the previous flags to ensure |
| 31873 | // that we do not mutate cached flags for the incremental |
| 31874 | // parser (ThisNodeHasError, ThisNodeOrAnySubNodesHasError, and |
| 31875 | // HasAggregatedChildData). |
| 31876 | var contextFlagsToClear = context & contextFlags; |
| 31877 | if (contextFlagsToClear) { |
| 31878 | // clear the requested context flags |
| 31879 | setContextFlag(/*val*/ false, contextFlagsToClear); |
| 31880 | var result = func(); |
| 31881 | // restore the context flags we just cleared |
| 31882 | setContextFlag(/*val*/ true, contextFlagsToClear); |
| 31883 | return result; |
| 31884 | } |
| 31885 | // no need to do anything special as we are not in any of the requested contexts |
| 31886 | return func(); |
| 31887 | } |
| 31888 | function doInsideOfContext(context, func) { |
| 31889 | // contextFlagsToSet will contain only the context flags that |
| 31890 | // are not currently set that we need to temporarily enable. |
no test coverage detected
searching dependent graphs…