func lexAndEmit(typ Type) func(*Tokeniser) stateFunc {
	return func(t *Tokeniser) stateFunc {
		_, w := t.currentRune()
		t.advance(w)
		t.emit(typ)
		return lexCode
	}
}
// lexAndEmit is a helper function to take in and advance the current string
// by 1 rune before emitting a token of the the type passed in.
lexAndEmit is a helper function to take in and advance the current string
by 1 rune before emitting a token of the the type passed in.
// lexAndEmit is a helper function to take in and advance the current string // by 1 rune before emitting a token of the the type passed in .
func lexAndEmit(typ Type) func(*Tokeniser) stateFunc {
	return func(t *Tokeniser) stateFunc {
		_, w := t.currentRune()
		t.advance(w)
		t.emit(typ)
		return lexCode
	}
}
func lexAndEmit ( typ Type ) func ( * Tokeniser ) stateFunc { return func ( t * Tokeniser ) stateFunc { _ , w := t . currentRune ( ) t . advance ( w ) t . emit ( typ ) return lexCode } }
lexAndEmit is a helper function to take in and advance the current string
by 1 rune before emitting a token of the the type passed in.
lexAndEmit is a helper function to take in and advance the current string by 1 rune before emitting a token of the the type passed in .