MCPcopy Create free account
hub / github.com/microsoft/typescript-go / char

Method char

internal/scanner/scanner.go:426–431  ·  view source on GitHub ↗

NOTE: even though this returns a rune, it only decodes the current byte. It must be checked against utf8.RuneSelf to verify that a call to charAndSize is not needed.

()

Source from the content-addressed store, hash-verified

424// It must be checked against utf8.RuneSelf to verify that a call to charAndSize
425// is not needed.
426func (s *Scanner) char() rune {
427 if s.pos < s.end {
428 return rune(s.text[s.pos])
429 }
430 return -1
431}
432
433// NOTE: this returns a rune, but only decodes the byte at the offset.
434func (s *Scanner) charAt(offset int) rune {

Callers 15

ScanMethod · 0.95
ScanJsxTokenExMethod · 0.95
ScanJsxIdentifierMethod · 0.95
ScanJsxAttributeValueMethod · 0.95
ScanJSDocTokenMethod · 0.95
scanIdentifierMethod · 0.95
scanStringMethod · 0.95
scanEscapeSequenceMethod · 0.95
scanUnicodeEscapeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected