func runREPL(name string) func(string) {
	interp := &interpreter.Interpreter{Name: name}
	return func(code string) {
		scanner := &token.Tokeniser{Name: name, Input: code}
		// start scanning
		scanner.Run()
		p := parser.Parser{Tokeniser: scanner}
		stmt := p.RunSingle()
		if p.HasError {
			return
		}
		r := resolver.Resolver{Name: name}
		r.ResolveStmt(stmt)
		if r.HasError {
			return
		}
		interp.RunSingle(stmt)
	}
}
// TODO: Fix REPL with resolver
Fix REPL with resolver
// TODO : Fix REPL with resolver
func runREPL(name string) func(string) {
	interp := &interpreter.Interpreter{Name: name}
	return func(code string) {
		scanner := &token.Tokeniser{Name: name, Input: code}
		scanner.Run()
		p := parser.Parser{Tokeniser: scanner}
		stmt := p.RunSingle()
		if p.HasError {
			return
		}
		r := resolver.Resolver{Name: name}
		r.ResolveStmt(stmt)
		if r.HasError {
			return
		}
		interp.RunSingle(stmt)
	}
}
func runREPL ( name string ) func ( string ) { interp := & interpreter . Interpreter { Name : name } return func ( code string ) { scanner := & token . Tokeniser { Name : name , Input : code } scanner . Run ( ) p := parser . Parser { Tokeniser : scanner } stmt := p . RunSingle ( ) if p . HasError { return } r := resolver . Resolver { Name : name } r . ResolveStmt ( stmt ) if r . HasError { return } interp . RunSingle ( stmt ) } }
Fix REPL with resolver
Fix REPL with resolver
// start scanning