Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Parser

SHIORI Response parser

Hierarchy

Index

Properties

result

result: Response

section

section: Section = new Section()

Methods

abort_parse

  • abort_parse(): number

begin_parse

  • begin_parse(): number

end_parse

  • end_parse(): number

get_result

  • get_result(): Container

is_parsing

  • is_parsing(): boolean

is_parsing_end

  • is_parsing_end(): boolean

parse

  • parse(transaction: string): Container
  • parse a transaction

    throw

    if transaction is not complete

    Parameters

    • transaction: string

      complete transaction

    Returns Container

    parse_chunk()'s one result

parse_chunk

  • parse_chunk(chunk: string): object

parse_line

  • parse_line(line: string): object | object
  • parse line

    Parameters

    • line: string

      transaction line separated by \r\n

    Returns object | object

    results: result (if state is end), state: parser state

parse_lines

  • parse_lines(lines: string[]): object
  • parse chunk lines

    Parameters

    • lines: string[]

      transaction chunk separated by \r\n

    Returns object

    results: parse_line()'s result, state: parser state

parse_main

  • parse_main(line: string): void

result_builder

Object literals

parsers

parsers: object

headers

headers: Parser = new Header.Parser()

status_line

status_line: Parser = new StatusLine.Parser()

Generated using TypeDoc