@@ -121,7 +121,7 @@ TODO: Optimize this data structure? It's very large at the moment.
121121"""
122122struct TaggedRange
123123 head:: SyntaxHead # Kind,flags
124- orig_kind:: Kind # Kind of the original token for leaf tokens, or K"Nothing "
124+ orig_kind:: Kind # Kind of the original token for leaf tokens, or K"None "
125125 first_byte:: UInt32 # First byte in the input text
126126 last_byte:: UInt32 # Last byte in the input text
127127 start_mark:: UInt32 # Index of first emitted range which this range covers
362362
363363# Bump the next `n` tokens
364364# flags and remap_kind are applied to any non-trivia tokens
365- function _bump_n (stream:: ParseStream , n:: Integer , flags, remap_kind= K "Nothing " )
365+ function _bump_n (stream:: ParseStream , n:: Integer , flags, remap_kind= K "None " )
366366 if n <= 0
367367 return
368368 end
@@ -375,7 +375,7 @@ function _bump_n(stream::ParseStream, n::Integer, flags, remap_kind=K"Nothing")
375375 is_trivia = k ∈ (K " Whitespace" , K " Comment" , K " NewlineWs" )
376376 f = is_trivia ? TRIVIA_FLAG : flags
377377 is_dotted (tok) && (f |= DOTOP_FLAG)
378- outk = (is_trivia || remap_kind == K "Nothing " ) ? k : remap_kind
378+ outk = (is_trivia || remap_kind == K "None " ) ? k : remap_kind
379379 range = TaggedRange (SyntaxHead (outk, f), k, first_byte (tok),
380380 last_byte (tok), lastindex (stream. ranges)+ 1 )
381381 push! (stream. ranges, range)
393393Shift the current token from the input to the output, adding the given flags.
394394"""
395395function bump (stream:: ParseStream , flags= EMPTY_FLAGS; skip_newlines= false ,
396- error= nothing , remap_kind:: Kind = K "Nothing " )
396+ error= nothing , remap_kind:: Kind = K "None " )
397397 emark = position (stream)
398398 _bump_n (stream, _lookahead_index (stream, 1 , skip_newlines), flags, remap_kind)
399399 if ! isnothing (error)
@@ -438,7 +438,7 @@ lexing ambiguities. There's no special whitespace handling — bump any
438438whitespace if necessary with bump_trivia.
439439"""
440440function bump_glue (stream:: ParseStream , kind, flags, num_tokens)
441- span = TaggedRange (SyntaxHead (kind, flags), K "Nothing " ,
441+ span = TaggedRange (SyntaxHead (kind, flags), K "None " ,
442442 first_byte (stream. lookahead[1 ]),
443443 last_byte (stream. lookahead[num_tokens]),
444444 lastindex (stream. ranges) + 1 )
@@ -541,7 +541,7 @@ should be a previous return value of `position()`.
541541"""
542542function emit (stream:: ParseStream , mark:: ParseStreamPosition , kind:: Kind ,
543543 flags:: RawFlags = EMPTY_FLAGS; error= nothing )
544- range = TaggedRange (SyntaxHead (kind, flags), K "Nothing " , mark. input_byte,
544+ range = TaggedRange (SyntaxHead (kind, flags), K "None " , mark. input_byte,
545545 stream. next_byte- 1 , mark. output_index+ 1 )
546546 if ! isnothing (error)
547547 _emit_diagnostic (stream, first_byte (range), last_byte (range), error= error)
0 commit comments