import { type Semantics } from "https://dotland.deno.dev/x/ohm_js@v17.1.0/index.d.ts";
A Semantics is a family of operations and/or attributes for a given grammar. Each operation/attribute has a unique name within the Semantics. A grammar may have any number of Semantics instances associated with it -- this means that the clients of a grammar (even in the same program) never have to worry about operation/attribute name clashes.
Call Signatures
Returns a dictionary containing operations and attributes defined by this Semantics on the result of a matched grammar. Operations are no-arg functions and attributes are properties.
Methods
Add a new operation named name to this Semantics, using the semantic actions contained in actionDict. It is an error if there is already an operation or attribute called name in this semantics. Returns this Semantics.
Add a new attribute named name to this Semantics, using the semantic actions contained in actionDict. It is an error if there is already an operation or attribute called name in this semantics. Returns this Semantics.
Extend the operation named name with the semantic actions contained in actionDict. name must be the name of an operation in the super semantics. Returns this Semantics.
Extend the attribute named name with the semantic actions contained in actionDict. name must be the name of an attribute in the super semantics. Returns this Semantics.