Skip to content

Commit 8a993e2

Browse files
committed
Remove utility function for combining parser flags
This seemed like a good idea at the time but using the raw flags directly is quite ok too, no need for the extra abstraction.
1 parent 8fa959b commit 8a993e2

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/parse_stream.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@ end
3434
# Return true if any of `test_flags` are set
3535
has_flags(flags::RawFlags, test_flags) = (flags & test_flags) != 0
3636

37-
# Function for combining flags. (Do we want this?)
38-
function flags(; trivia::Bool=false,
39-
infix::Bool=false,
40-
dotop::Bool=false,
41-
try_catch_after_finally::Bool=false,
42-
numeric::Int=0)
43-
flags = RawFlags(0)
44-
trivia && (flags |= TRIVIA_FLAG)
45-
infix && (flags |= INFIX_FLAG)
46-
dotop && (flags |= DOTOP_FLAG)
47-
try_catch_after_finally && (flags |= TRY_CATCH_AFTER_FINALLY_FLAG)
48-
numeric != 0 && (flags |= set_numeric_flags(numeric))
49-
return flags::RawFlags
50-
end
51-
5237
#-------------------------------------------------------------------------------
5338
struct SyntaxHead
5439
kind::Kind

0 commit comments

Comments
 (0)