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

Completion in class comment leads to DNU #4863

Open
Ducasse opened this issue Oct 8, 2019 · 2 comments

Comments

@Ducasse
Copy link
Member

commented Oct 8, 2019

I made a typo
:nl and I got a dnu in the class comment pane.

@MarcusDenker

This comment has been minimized.

Copy link
Member

commented Oct 9, 2019

same happened at the start of a method in the method pane.

reason: #parseFaultyMethod: does not return a method in this case but just a RBParseErrorNode.

two fixes needed:

  1. fix #parseFaultyMethod: (should be done as part of this PR)

  2. class comment pane should not be a code editor a it is not code (we should add another issue for that)

@MarcusDenker

This comment has been minimized.

Copy link
Member

commented Oct 9, 2019

something like:

parseFaultyMethod: aString
"parse aString even if syntactically incorrect. Instead of raising an error, we create an AST with RB RBParseErrorNode"
| ast |
ast := self parseMethod: aString onError: self errorNodeBlock.
^(ast class == RBMethodNode)
ifFalse: [ RBMethodNode selector: #faulty body: ast asSequenceNode ]
ifTrue: [ ast ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.