Options
All
  • Public
  • Public/Protected
  • All
Menu

The ParserPlugin is the most basic building block of an ArgdownApplication. It takes a string provided in IArgdownRequest.input and scans it for tokens. The resulting tokens list is added to the IArgdownResponse.tokens response property. The tokens are parsed into an abstract syntax tree (AST). The AST is added to the IArgdownResponse.ast response property.

The AST is then used by the ModelPlugin to build the basic data model used by most other plugins.

Lexer errors are added to IArgdownResponse.lexerErrors response property. Parser errors are added to the IArgdownResponse.parserErrors response property. These errors can be used to build an Argdown linter.

Hierarchy

  • ParserPlugin

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ParserPlugin(config?: IParserPluginSettings): ParserPlugin

Properties

defaults

defaults: IParserPluginSettings = {}

name

name: string = "ParserPlugin"

The name of the plugin

prepare

prepare: IRequestHandler = ...

Called each time the plugin's processor is run, before any other method of this plugin is called. Use this to add default settings to the request and to check that all required data is present in the response. If not, throw an ArgdownPluginError to cancel the the current processor's execution.

Methods

getSettings

run

Generated using TypeDoc