MCPcopy Create free account
hub / github.com/dengsgo/math-engine / getNextToken

Method getNextToken

engine/ast.go:92–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92func (a *AST) getNextToken() *Token {
93 a.currIndex++
94 if a.currIndex < len(a.Tokens) {
95 a.currTok = a.Tokens[a.currIndex]
96 return a.currTok
97 }
98 return nil
99}
100
101func (a *AST) getTokPrecedence() int {
102 if p, ok := precedence[a.currTok.Tok]; ok {

Callers 4

parseNumberMethod · 0.95
parseFunCallerOrConstMethod · 0.95
parsePrimaryMethod · 0.95
parseBinOpRHSMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected