newLexer

fun newLexer(lexerFilterFunction: A_Function, lexerBodyFunction: A_Function?, lexerMethod: A_Method, definitionModule: A_Module): A_Lexer

Answer a new, fully populated lexer. Also install it in the given module and method. Note that the references from the lexer to the module and method should be considered back-pointers.

Return

A new method with no name.

Parameters

lexerFilterFunction

A function that tests the character at the current lexing point to determine whether to run the body of this lexer.

lexerBodyFunction

The function that creates runs of tokens from source code.

lexerMethod

The method associated with the lexer.

definitionModule

The module in which the lexer is defined.