isColonTerminator function

bool isColonTerminator(
  1. String chr
)

This checks for the presence of : or EOF and is used to determine movement names and metakeys. Without a catch for EOF, this has the potential to infinite loop on malformed sources.

Implementation

bool isColonTerminator(String chr) => chr == ":" || chr == Token.EOF;