BetweenFlags API Documentation
BetweenFlags.StartFlag
— TypeStartFlag(flag::String,
flag_boundaries_left::Vector{String},
flag_boundaries_right::Vector{String})
A "start" flag that BetweenFlags looks for to denote the start position of a given scope.
BetweenFlags.StopFlag
— TypeStopFlag(flag::String,
flag_boundaries_left::Vector{String},
flag_boundaries_right::Vector{String})
A "stop" flag that BetweenFlags looks for to denote the stop position of a given scope.
BetweenFlags.FlagPair
— TypeFlagPair(start::Flag, stop::Flag)
A flag pair that defines the start and stop of the substring of interest.
julia>
using BetweenFlags
# find: ["\nfunction", " function", ";function"]
start_flag = StartFlag("function",
["\n", "\s", ";"],
["\n", "\s"])
# find: ["\nend", " end", ";end"]
stop_flag = StopFlag("end",
["\n", "\s", ";"],
["\n", "\s", ";"])
flag_pair = FlagPair{ScopeType}(start_flag, stop_flag)
BetweenFlags.TokenStream
— TypeTokenStream
A token stream, containing
flag_set
aFlagSet
code
a string of code to be tokenizedtoken_stream
a token stream (dict) whose keys are the flag IDs, and whose values are vectors ofInt
s indicating the nestedness of the flag.