MCPcopy Create free account
hub / github.com/dim-an/cod / emitWord

Method emitWord

shells/tokenize.go:259–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

257}
258
259func (t *tokenizer) emitWord() {
260 curPos := t.reader.GetPosition()
261 if t.builder.Len() > 0 || t.nonEmpty {
262 data := t.builder.String()
263 _, isReserved := reservedWords[data]
264 t.result = append(t.result, Token{
265 Decoded: data,
266 OrigBegin: t.curBegin,
267 OrigEnd: curPos,
268 IsReserved: isReserved,
269 IsBroken: t.broken,
270 IsScary: t.scary,
271 })
272 t.builder.Reset()
273 }
274 t.curBegin = curPos
275 t.nonEmpty = false
276 t.scary = false
277 t.broken = false
278}
279
280func (t *tokenizer) parseAsciiString(end byte) (err error) {
281 if end == '\\' {

Callers 5

tokenizeMethod · 0.95
parseSingleQuoteMethod · 0.95
parseDoubleQuoteMethod · 0.95
parseAsciiStringMethod · 0.95
parseAsciiCharMethod · 0.95

Calls 2

GetPositionMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected