示例#1
0
文件: lex.go 项目: rwcarlsen/goledger
func lexAccount(l *lex.Lexer) lex.StateFn {
	for {
		nr := l.Next()
		nnr := l.Peek()
		if isSpace(nr) && isSpace(nnr) || isNewline(nr) {
			l.Backup()
			l.Emit(tokAccount)
			l.AcceptRun(indent)
			l.Ignore()
			return nil
		}
	}
}