New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic on dollar vars #78

Closed
odino opened this Issue Dec 24, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@odino
Copy link
Collaborator

odino commented Dec 24, 2018

⧐  $1
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/abs-lang/abs/lexer.(*Lexer).readCommand(0xc0000f0060, 0xc000070cc8, 0x10)
	/go/src/github.com/abs-lang/abs/lexer/lexer.go:286 +0xdd
github.com/abs-lang/abs/lexer.(*Lexer).NextToken(0xc0000f0060, 0x10, 0x53de80, 0x553801, 0xc000070a80)
	/go/src/github.com/abs-lang/abs/lexer/lexer.go:127 +0x473
github.com/abs-lang/abs/parser.(*Parser).nextToken(0xc000166000)
	/go/src/github.com/abs-lang/abs/parser/parser.go:122 +0x5b
github.com/abs-lang/abs/parser.New(0xc0000f0060, 0xc0000f0060)
	/go/src/github.com/abs-lang/abs/parser/parser.go:114 +0x140a
github.com/abs-lang/abs/repl.Run(0xc00014e004, 0x2, 0x1)
	/go/src/github.com/abs-lang/abs/repl/repl.go:100 +0x8e
github.com/abs-lang/abs/repl.executor(0xc00014e004, 0x2)
	/go/src/github.com/abs-lang/abs/repl/repl.go:91 +0x76
github.com/c-bata/go-prompt.(*Prompt).Run(0xc0000c8000)
	/go/src/github.com/c-bata/go-prompt/prompt.go:73 +0x764
github.com/abs-lang/abs/repl.Start(0x581860, 0xc00000e010, 0x581880, 0xc00000e018)
	/go/src/github.com/abs-lang/abs/repl/repl.go:61 +0xec
main.main()
	/go/src/github.com/abs-lang/abs/main.go:26 +0x11f
exit status 2
Makefile:12: recipe for target 'repl' failed
make: *** [repl] Error 1

@odino odino added the bug label Dec 24, 2018

@odino odino added this to the preview-3 milestone Dec 24, 2018

@odino

This comment has been minimized.

Copy link
Collaborator

odino commented Dec 27, 2018

⧐  $11111111111111111111111111
bash: 111111111111111111111111: command not found

⧐  $echo 2
bash: cho: command not found

⧐  $eecho 2

⧐  $eecho 2)
2
⧐  

Lol I see what's happening here... :)

@odino odino closed this in 5e7d003 Dec 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment