parser

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package parser defines the calc language grammar.

Index

Constants

This section is empty.

Variables

View Source
var Keywords = [...]string{"if", "else", "while", "for", "return", "yield", "true", "false"}

Keywords is a list of keywords.

Functions

This section is empty.

Types

type Error added in v1.4.0

type Error = c.Error

func Parse

func Parse(input string) ([]node.Type, *Error)

Parse parses the input string and returns an AST or a parse error.

type Type added in v1.3.0

type Type struct{}

Type is an empty struct that implements Parse. Useful to dependency inject the parser.

func (Type) Parse added in v1.3.0

func (t Type) Parse(input string) ([]node.Type, *Error)

Parse parses the input string and returns an AST or a parse error.

Jump to

Keyboard shortcuts

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