ops

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

func Eval(expr string) (value int, numChars int, err error)

func EvalPrecedence

func EvalPrecedence(expr string) (value int, numChars int, err error)

Types

type Stack

type Stack []Token

func (Stack) Eval

func (s Stack) Eval() int

+1 +2 *3 +4 *5 +6

func (Stack) String

func (s Stack) String() string

type Token

type Token struct {
	Op    rune
	Value int
}

func (Token) String

func (t Token) String() string

Jump to

Keyboard shortcuts

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