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

MessageNotUnderstood: Text>>findLastOccurrenceOfString:startingAt: #5282

Closed
Ducasse opened this issue Dec 1, 2019 · 3 comments · Fixed by #5298
Closed

MessageNotUnderstood: Text>>findLastOccurrenceOfString:startingAt: #5282

Ducasse opened this issue Dec 1, 2019 · 3 comments · Fixed by #5298
Assignees
Milestone

Comments

@Ducasse
Copy link
Member

@Ducasse Ducasse commented Dec 1, 2019

How to reproduce

  • Open Transcript
  • In a method type
    -- ()
    -- then remove the last )
    -- adding space or removing space produces

MessageNotUnderstood: Text>>findLastOccurrenceOfString:startingAt:
MessageNotUnderstood: Text>>findLastOccurrenceOfString:startingAt:

@Ducasse Ducasse added this to the 8.0.0 milestone Dec 1, 2019
@Ducasse

This comment has been minimized.

Copy link
Member Author

@Ducasse Ducasse commented Dec 1, 2019

Steven I would like to pair program with you with your debugger to see how we can fix this.
I have the impression that a Text is passed instead of a String.

@kasperosterbye

This comment has been minimized.

Copy link
Contributor

@kasperosterbye kasperosterbye commented Dec 2, 2019

Should be simple, but I am not going to ruin your learning experience :-)

@MarcusDenker

This comment has been minimized.

Copy link
Member

@MarcusDenker MarcusDenker commented Dec 3, 2019

this has to do with RBParser>>#parseErrorNode:, it is called on a Text object but the method is only in string... it seems that it can be fixed by making sure to hand a string to the parser for syntax highlight:

privateStyle: aText
| ast |
ast := classOrMetaClass compiler
source: aText asString;
noPattern: self isForWorkspace ;
options: #(+ optionParseErrors + optionSkipSemanticWarnings);
requestor: workspace;
parse.
ast doSemanticAnalysis.
^ self style: aText ast: ast

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