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

malformed identifiers get through #1780

Merged
merged 1 commit into from
Feb 27, 2015
Merged

malformed identifiers get through #1780

merged 1 commit into from
Feb 27, 2015

Conversation

rothrock
Copy link
Contributor

Issue: 1768

We weren't checking return codes from scanString.
Added text descriptions for BADSTRING and BADESCAPE tokens.

Issue: 1768

We weren't checking return codes from scanString.
Added text descriptions for BADSTRING and BADESCAPE tokens.
@@ -137,7 +137,7 @@ func (s *Scanner) scanIdent() (tok Token, pos Pos, lit string) {
} else if ch == '.' {
buf.WriteRune(ch)
} else if ch == '"' {
if tok0, pos0, lit0 := s.scanString(); tok == BADSTRING || tok == BADESCAPE {
if tok0, pos0, lit0 := s.scanString(); tok0 == BADSTRING || tok0 == BADESCAPE {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

@corylanou
Copy link
Contributor

+1

rothrock added a commit that referenced this pull request Feb 27, 2015
malformed identifiers get through
@rothrock rothrock merged commit 325f613 into master Feb 27, 2015
@rothrock rothrock deleted the 1768 branch February 27, 2015 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants