UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

18 lines (17 loc) 968 B
import type { AutoSelectPredicate } from './auto-select-defaults'; /** * This takes an {@link NormalizedAst} and returns an auto-select predicate for {@link reconstructToCode}, * which will automatically include lines marked by these special comments! * Please make sure to create one per source as it will use it to cache. * * We support two formats: * - Line comments in the form of `# flowr@include_next_line` or `# flowr@include_this_line`. * - Block comments which start with `# flowr@include_start` and end with `# flowr@include_end`. * This supports nesting, but they have to appear on a single line. * * Please note that these comments have to start exactly with this content to work. * * @param and - Predicate to composite this one with, If you do not pass a predicate, you may assume composition with * {@link doNotAutoSelect}. */ export declare function makeMagicCommentHandler(and?: AutoSelectPredicate): AutoSelectPredicate;