Represents the sequence of tokens found by the parser. A Tuple accepts a `NEUTRAL` element

### Type parameters

- #### T

### Hierarchy

- Tuple

## Index

### Properties

- isEmpty
- value

### Methods

- append
- array
- at
- first
- join
- last
- single
- size

## Properties

### isEmpty

isEmpty: boolean

- Defined in masala-parser.d.ts:135

### value

value: T[]

- Defined in masala-parser.d.ts:133

Wrapped array

## Methods

### append

- append(neutral: NEUTRAL): this
- append<Y>(other: Tuple<Y>): Tuple<T | Y>
- append<Y>(element: Y): Tuple<T | Y>

- - Defined in masala-parser.d.ts:198

  The tuple will not change with the NEUTRAL element. It will concatenate the two tuples as one, or add a single element if it's not a Tuple. Therefore a Tuple can wrap multiple arrays.

  #### Parameters

  - ##### neutral: NEUTRAL

    : neutral element

    See TupleParser

  #### Returns this

- - Defined in masala-parser.d.ts:200

  #### Type parameters

  - #### Y

  #### Parameters

  - ##### other: Tuple<Y>

  #### Returns Tuple<T | Y>

- - Defined in masala-parser.d.ts:202

  #### Type parameters

  - #### Y

  #### Parameters

  - ##### element: Y

  #### Returns Tuple<T | Y>

### array

- array(): Array<T>

- - Defined in masala-parser.d.ts:165

  Returns all tokens in an array

       const parser = C.char('a')
           .then(C.char('b'))
           .then(C.char('c')
           .array(); // Parsing will return ['a','b','c']

  See single

  #### Returns Array<T>

### at

- at(index: number): T

- - Defined in masala-parser.d.ts:181

  Returns value at index

  #### Parameters

  - ##### index: number

  #### Returns T

### first

- first(): T

- - Defined in masala-parser.d.ts:175

  Returns the first element of the Tuple

  #### Returns T

### join

- join(separator?: string): string

- - Defined in masala-parser.d.ts:187

  Join elements as one string joined by optional separator (ie empty '' separator by default)

  #### Parameters

  - ##### Optional separator: string

    join separator

  #### Returns string

### last

- last(): T

- - Defined in masala-parser.d.ts:170

  Returns the last element of the Tuple

  #### Returns T

### single

- single(): T

- - Defined in masala-parser.d.ts:153

  Returns the first token. It's up to the coder to know if there is only one token

  -     const parser = C.char('a')
          .then(C.char('b'))
          .drop()
          .then(C.char('c')
          .single(); // Parsing will return 'c'

    See array

  #### Returns T

### size

- size(): number

- - Defined in masala-parser.d.ts:139

  Number of elements in the wrapped array

  #### Returns number

Generated using TypeDoc