Skip to content
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

TextReader does not error immediately when encountering a null type annotation #162

Open
byronlin13 opened this issue Sep 16, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@byronlin13
Copy link
Contributor

	r := NewReaderString(`null.string ::1`)
	r.Next()
	fmt.Println(r.Err())

Currently this code snippet does not return an error. This is because the text reader parses null as a symbol token and sets the current type as string. When you call r.Next() again it will parse :: as a invalid symbol and will error out.

We should read the null and check if it is an annotation by peeking forward in the stream for ::, skipping whitespaces(tabs, new lines, etc)

@R-maan
Copy link
Contributor

R-maan commented Sep 17, 2020

A partial fix in these 2 commits: 98cf37c and aef5860

They are not merged as this comment explains: #158 (comment)

@therapon therapon added the enhancement New feature or request label Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants