CS Parser

Class: ResultSet

ResultSet()

A container that stores parse results

Constructor

new ResultSet()

Source:
ResultSet.js, line 4

Methods

add(Result, KeepsArray) → ResultSet

Saves the provided data as a parsing result. You can pass an array as multiple results

Parameters:
Name Type Default Description
Result mixed | Array.<mixed> | ResultSet

The data to add

KeepsArray boolean false

If true, stores the result as a single result even if it is an array

Source:
ResultSet.js, line 18
Returns:

This

Type:
ResultSet

traverse(Fn, Arg)

Performs traversal

Parameters:
Name Type Default Description
Fn function

The callback that receives every single result as the 1st parameter

Arg mixed null

Additional argument to pass to Fn as the 2nd parameter

Source:
ResultSet.js, line 32

© 2018 Satoshi Soma

Licensed under the Apache License 2.0

Documentation generated by JSDoc 3.6.11 using Docolatte theme on Tue, 05 Sep 2023 18:54:56 GMT

    Hint: You don't need to click on the search box to input.

    Just start typing your words at any time to search for it.

    Classes

    • Composite
      • addChild
      • addChildren
      • traverse
      • verifyChild
    • Context
      • addChild
      • addChildren
      • cleanupChildren
      • clearBuffer
      • end
      • outline
      • parseChunk
      • populate
      • start
      • step
      • traverse
      • updateState
      • verifyChild
    • ContextManager
      • feed
    • Main
      • create
      • newRule
    • Parser
      • addRule
      • addRules
      • onComplete
      • onStart
      • parse
      • parseFile
    • ResultSet
      • add
      • traverse
    • Rule
      • addChild
      • addChildren
      • endsWith
      • express
      • fin
      • init
      • on
      • parse
      • startsWith
      • traverse
      • verifyChild