UNPKG

chop-logic-core

Version:

Core classes, methods and functions for calculating logical formulas and constructing proofs within the Chop Logic project.

17 lines (16 loc) 894 B
import type { PropSymbol } from "../../models"; /** * Creates a `PropSymbol` representing a propositional logic symbol. * * - If the character is a parenthesis, it is classified as `GlyphType.Parenthesis`. * - If the character is a known logical glyph, it is classified as `GlyphType.Operator`. * - If the character is a Latin letter, it is classified as `GlyphType.Variable`, and its view is the lowercase letter. * - Throws an error if the character is unrecognized. * * @param char - A single character representing a logical symbol. * @param position - The position of the symbol in the input expression. * @returns A `PropSymbol` containing the atom, type, position, and view. * @throws {Error} If the character is not a recognized logical symbol or a Latin letter. * @category Builders */ export declare function createPropSymbol(char: string, position: number): PropSymbol;