@npmstuff/argdown-core
Version:
A pluggable parser for the Argdown argumentation syntax
24 lines (23 loc) • 3.75 kB
TypeScript
import { IToken, IParserErrorMessageProvider } from "chevrotain";
export declare const MISSING_TEXT_CONTENT_ERROR = "Missing text content. Please add a line of text or refer to an existing statement or argument instead by replacing the content in this line with [Statement Title] or <Argument Title> (without a colon). If you want to define a statement ([Statement Title]:) or argument (<Argument Title>:), the defining text content has to follow the defined element title without any empty lines in between.";
export declare const INVALID_INFERENCE_ERROR = "Invalid inference. Inferences can either be marked by four hyphens (----) or have the following format: \n--Inference Rule 1, Inference Rule 2 (my meta data property 1: 1, 2, 3; my meta data property 2: value) --";
export declare const INVALID_RELATION_ERROR = "Invalid relation syntax. This may either be caused by a) an invalid relation parent or b) invalid indentation. a) Invalid relation parent: Only statements and arguments can have relations as child elements. b) Invalid Indentation tree: Please check that if there are preceding relations in this paragraph, there is at least one with equal or less indentation.";
export declare const INVALID_INDENTATION_ERROR = "Invalid indentation.";
export declare const MISSING_RELATION_CONTENT_ERROR = "Missing relation content. Please define or refer to a statement or argument (you can define a statement by simply adding a line of text).";
export declare const MISSING_INFERENCE_END_ERROR = "Invalid inference syntax. Please end your inference with two hyphens (--)";
export declare const INVALID_INFERENCE_POSITION_ERROR = "Invalid inference position. An inference may only occur within a premise-conclusion-structure, in which it is preceded by a premise and followed by a conclusion (both of which have to be numbered statements: '(1) Statement').";
export declare const MISSING_INFERENCE_ERROR = "Missing inference. Use four hyphens (----) between two numbered statements to insert an inference in your premise-conclusion-structure and mark the latter statement as a conclusion.";
export declare const MISSING_CONCLUSION_ERROR = "Missing conclusion. Please add a numbered statement after the inference.";
export declare const INVALID_PCS_POSITION_ERROR = "Invalid position of premise conclusion structure (pcs). Make sure the pcs is preceded by an empty line.";
export declare const INVALID_PCS_STATEMENT_CONTENT_ERROR = "Invalid statement content. An argument reference (<Argument Title>) or definition (<Argument Title>:) can not be used as premise or conclusion within a premise-conclusion-structure. Use statement references ([Statement Title]) or definitions ([Statement Title]:) instead.";
export declare const INCOMPLETE_PCS_ERROR = "Incomplete premise-conclusion-structure (pcs). A pcs has to consist of at least one premise (a numbered statement: '(1) Statement Text'), one inference (marked by four hyphens ----) and one conclusion (a numbered statement after an inference). There may no be any empty lines between these elements.";
export declare const INVALID_TEXT_POSITION_ERROR = "Invalid position of text content. Make sure it is not preceded by a statement reference ([Statement Title]) or argument reference (<Argument Title>).";
export interface IArgdownErrorMessageProvider extends IParserErrorMessageProvider {
isRelationToken(token: IToken): boolean;
isRelationRule(ruleName: string): boolean;
getTokenDescription(token: IToken): string;
buildInvalidElementPositionError(token: IToken): string;
buildInvalidParagraphStartError(token: IToken): string;
buildInvalidRelationTextContentError(token: IToken): string;
}
export declare const errorMessageProvider: IArgdownErrorMessageProvider;