infix

open override fun infix(type: T, parselet: InfixParser<T, E>, override: Boolean)

Registers a infix parselets into the grammar.

Parameters

type

The token type to associate the parselet with.

parselet

The infix parselet to register.

override

If set to true, imported parselets overrides existing ones. If false, they throw.

open override fun infix(type: T, precedence: Int, override: Boolean, block: InfixFunction<T, E>)

Registers a infix parselets into the grammar.

Parameters

type

The token type to associate the parselet with.

override

If set to true, imported parselets overrides existing ones. If false, they throw.

block

The code to execute when the type matches.