git.dumitru.net fructose / master src / parser / Parser.ts
master

Tree @master (Download .tar.gz)

Parser.ts @masterraw · history · blame

1
2
3
4
5
6
7
8
9
import Document from "../Document";
import DocumentLocation from "../DocumentLocation";
import ParserError from "./ParserError";
import ParserValue from "./ParserValue";

export default interface Parser<T> {
  readonly name: string;
  parse(doc: Document, loc: DocumentLocation): ParserValue<T> | ParserError;
}