MCPcopy Index your code
hub / github.com/Shopify/go-lua / scanError

Method scanError

scanner.go:101–110  ·  view source on GitHub ↗
(message string, token rune)

Source from the content-addressed store, hash-verified

99}
100
101func (s *scanner) scanError(message string, token rune) {
102 buff := chunkID(s.source)
103 if token != 0 {
104 message = fmt.Sprintf("%s:%d: %s near %s", buff, s.lineNumber, message, s.tokenToString(token))
105 } else {
106 message = fmt.Sprintf("%s:%d: %s", buff, s.lineNumber, message)
107 }
108 s.l.push(message)
109 s.l.throw(SyntaxError)
110}
111
112func (s *scanner) incrementLineNumber() {
113 old := s.current

Callers 7

syntaxErrorMethod · 0.95
numberErrorMethod · 0.95
saveMethod · 0.95
readMultiLineMethod · 0.95
escapeErrorMethod · 0.95
readStringMethod · 0.95
scanMethod · 0.95

Calls 4

tokenToStringMethod · 0.95
chunkIDFunction · 0.85
pushMethod · 0.80
throwMethod · 0.80

Tested by

no test coverage detected