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
buigfix: given scala toplevel mtags #5247
buigfix: given scala toplevel mtags #5247
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One nitpick, we should allow whitespace before COLON
|given [T]: List[T] = Nil | ||
|given given_Char: Char = '?' | ||
|given `given_Float`: Float = 3.0 | ||
|given `* *` : Long = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|given `* *` : Long = 5 | |
|given `* *`: Long = 5 |
I was confused why * *
didn't show in result, but it was because of a whitespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you're so right. I forgot that also turns into a token. Thanks for noticing.
consumeParams() | ||
scanner.curr.token match { | ||
case COLON => identifier | ||
case _ => None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fail if there is a whitespace before COLON
8efec56
to
c4cf7df
Compare
c4cf7df
to
1a3ae52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Previously:
In ScalatopLevelMtags we expected an identifier after
given
keyword, so we would fail ongiven [A]...
.Now:
ScalatopLevelMtags
on an error, instead we create a report and keep indexing.