Skip to content

Commit

Permalink
To be able to access the vars defined in the playground / workspace, …
Browse files Browse the repository at this point in the history
…we need to compile with the editor as the requestor.

This PR just makes sure to parse with a requestor, it does not yet try to suggest the variabls defined by the requestor
  • Loading branch information
MarcusDenker committed Dec 2, 2019
1 parent 8863f3b commit 0a686f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/NECompletion/CompletionContext.class.st
Expand Up @@ -12,7 +12,8 @@ Class {
'node',
'isWorkspace',
'class',
'entries'
'entries',
'editor'
],
#classVars : [
'SorterClass'
Expand Down Expand Up @@ -75,6 +76,7 @@ CompletionContext >> engine: aCompletionEngine class: aClass source: aString pos
class := aClass.
source := aString.
position := anInteger.
editor := aCompletionEngine editor.

isWorkspace:= aCompletionEngine
ifNotNil: [ aCompletionEngine isScripting ]
Expand Down Expand Up @@ -139,6 +141,7 @@ CompletionContext >> parseSource [
ast := class compiler
source: source;
noPattern: isWorkspace;
requestor: editor;
options: #(+ optionParseErrors + optionSkipSemanticWarnings);
parse.
ast doSemanticAnalysis.
Expand Down

0 comments on commit 0a686f2

Please sign in to comment.