parse

final Either<ParseError, List<LecsNode>> parse(List<Tokentokens)

Generates a parse tree represented by a List of LecsNode from a List of Token or returns a ParseError documenting the first parse error encountered when iterating the List of Token.

This method may report the following ParseError:

Return

Either the first ParseError reported during parsing or the List of LecsNode produced from tokens.

Parameters

tokens

A List of Token to parse.