Interface IProductionSemanticProvider
Provides an interface to run semantic actions on a reduced production.
public interface IProductionSemanticProvider
Methods
Fuse(ref ParserState, ProductionHandle, Span<object?>)
Combines the semantic values of the members of a production into a single object. This method is called by the parser when a production is reduced.
object? Fuse(ref ParserState parserState, ProductionHandle production, Span<object?> members)
Parameters
parserState
ParserStateThe state of the parsing operation.
production
ProductionHandleThe identifier of the production that got reduced.
members
Span<object>A Span<T> with the semantic values of each member of the production. The span can be used as a scratch buffer by the method and does not have to be cleared at the end.
Returns
- object
The semantic value of the production as a whole.
See Also
ISemanticProvider<TChar, T>