Skip to content

Package io.github.qishr.cascara.common.lang.processor

Interface Parser

java.lang.Object
        io.github.qishr.cascara.common.lang.processor.Parser

All Implemented Interfaces:
    Processor

All Known Implementing Classes:
    JsonParser, XmlParser, YamlParser


public interface Parser

Method Summary

Modifier and Type Method Description
public abstract N parse(String text) Entry point for parsing a source string.
public abstract N parse(List tokens) Parses the top-level document structure and handles stream boundaries.

Method Details

parse

public abstract N parse(String text)

Entry point for parsing a source string.

Parameters:

text - The raw text source.

Returns:

The root AstNode.


parse

public abstract N parse(List tokens)

Parses the top-level document structure and handles stream boundaries.

Parameters:

tokens - A list of tokens representing the tokenized text source.

Returns:

The root AstNode.