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

Block comments between code are parsed to unexpected expression #37664

Closed
Moelf opened this issue Sep 19, 2020 · 1 comment
Closed

Block comments between code are parsed to unexpected expression #37664

Moelf opened this issue Sep 19, 2020 · 1 comment
Labels
parser Language parsing and surface syntax

Comments

@Moelf
Copy link
Sponsor Contributor

Moelf commented Sep 19, 2020

julia> a = 3
3

julia> a a
ERROR: syntax: extra token "a" after end of expression
Stacktrace:
 [1] top-level scope at none:1

julia> a#==#a
9

julia> Meta.parse("a#==#a")
:(a * a)

should probably be parsed as :(a a) instead

@Moelf Moelf changed the title Block comments parsed between code unexpected results Block comments between code are parsed to unexpected expression Sep 19, 2020
@JeffBezanson JeffBezanson added the parser Language parsing and surface syntax label Sep 21, 2020
@belamenso
Copy link
Contributor

belamenso commented Sep 21, 2020

@JeffBezanson Hi, I am new to Julia development and would be interested in fixing this issue as my first contribution.
If I understand correctly, any syntax "A#= multi-line comment =#B" should parse as "A B", that is any multi-line comment is equivalent to a single space, like for example in C++?

belamenso added a commit to belamenso/julia that referenced this issue Sep 24, 2020
belamenso added a commit to belamenso/julia that referenced this issue Sep 25, 2020
belamenso added a commit to belamenso/julia that referenced this issue Sep 25, 2020
belamenso added a commit to belamenso/julia that referenced this issue Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

3 participants