parser

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package parser defines the actual parser for DLiteScript.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser defines the parser itself.

func NewParser

func NewParser(tokens []*token.Token) *Parser

NewParser creates a new instance of the Parser struct.

func (*Parser) GetCurrentCharPos

func (p *Parser) GetCurrentCharPos() int

GetCurrentCharPos gets the current character position.

func (*Parser) GetNextToken

func (p *Parser) GetNextToken() (*token.Token, error)

GetNextToken gets the next token and advances the current token index.

func (*Parser) Parse

func (p *Parser) Parse() (ast.ExprNode, error)

Parse parses the expression string supplied in the struct.

func (*Parser) PeekNextToken

func (p *Parser) PeekNextToken() (*token.Token, error)

PeekNextToken gets the next token without advancing the current token index.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL