@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
27 lines • 844 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RParameter = void 0;
const model_1 = require("../model");
const type_1 = require("../type");
/**
* Helper for working with {@link RParameter} AST nodes.
*/
exports.RParameter = {
...model_1.RNode,
name: 'RParameter',
/**
* Type guard for {@link RParameter} nodes.
* @see {@link RParameter.isDotDotDotDot} - to check whether a parameter is the special `...` parameter
*/
is(node) {
return node?.type === type_1.RType.Parameter;
},
/**
* Type guard for the special `...` parameter.
* @see {@link RParameter.is} - to check whether a node is a parameter at all
*/
isDotDotDotDot(node) {
return exports.RParameter.is(node) && node.special;
}
};
//# sourceMappingURL=r-parameter.js.map