parser

package
v0.0.0-...-5ca4413 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortByPriority

func SortByPriority(ops []Operator)

Types

type Operator

type Operator struct {
	Index    int
	Name     string
	Priority int
}

func GetNumsOps

func GetNumsOps(expression string) ([]float64, []Operator, error)

func NewOperator

func NewOperator(name string, index, priority int) Operator

func (Operator) GetOperands

func (op Operator) GetOperands(nums []float64) (float64, float64)

func (Operator) Replace

func (op Operator) Replace(nums []float64, ops []Operator, res float64) ([]float64, []Operator)

Jump to

Keyboard shortcuts

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