ObjectSlots

Entries

Link copied to clipboard

The A_Method in which this lexer is defined.

Link copied to clipboard

The module in which this lexer was defined. Other modules cannot see this lexer (i.e., it doesn't get invoke to produce tuples) unless the lexer's definition module is an ancestor of the module being compiled.

Link copied to clipboard

The function to run (as the base call of a fiber), with the character at the current lexing point, to determine if the body function should be attempted.

Link copied to clipboard

The function to run (as the base call of a fiber) to generate some tokens from the source string and position. The function should produce a tuple of potential A_Tokens at this position, as produced by this lexer. Each token may be seeded with the potential tokens that follow it. Since each token also records the LexingState after it, there's no need to produce that separately.

Properties

Link copied to clipboard

In Java it was possible to define this interface in such a way that the name method was abstract and implemented by each specific Enum, but Kotlin breaks this mechanism. BUT – we're able to cast this to Enum to get to that field. I believe this code gets copied down into each specific Enum subclass, so the dynamic type check for the cast is trivially eliminated in each case. And worst case, Hotspot will be able to inline calls to this from sites that are known to be Enums.

Link copied to clipboard

In Java it was possible to define this interface in such a way that the ordinal() method was abstract and implemented by each specific Enum, but Kotlin breaks this mechanism. BUT – we're able to cast this to Enum to get to that field. I believe this code gets copied down into each specific Enum subclass, so the dynamic type check for the cast is trivially eliminated in each case. And worst case, Hotspot will be able to inline calls to this from sites that are known to be Enums.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.