Comments (3)
I'm wondering if I'm misunderstanding the purpose of scope
.
I tried removing the position check in inspectIdentifier
, but that ended up breaking a number of valid test cases. So clearly a different or smarter approach is required.
case 1: (x|, y) => z
Removing the position check added y
to the current scope, which isn't what we want.
If scope
is for intellisense, then x shouldn't be included. If scope
is used to represent a hierarchy of symbols, then we need an easy way to determine which scope members should be excluded from intellisense results (i.e. what assignmentKeyNodeIdMap
is doing now).
case 2: s|ection foo; x = 1; y = 2;
Since the cursor is on the section keyword/declaration, we shouldn't have any members in scope.
from powerquery-parser.
I resolved case 1 by not calling inspectIdentifier
when processing the section.
For case 2, I updated the related test cases and added TODO comments.
I think this scenario is related to #56 in that there are certain cursor positions where we should be returning an empty scope, or providing additional context so the intellisense layer knows that the current list of identifiers shouldn't be included in suggestions.
from powerquery-parser.
Should be resolved in #70
from powerquery-parser.
Related Issues (20)
- [Enhancement] Add support for the new null coalescing operator ?? HOT 1
- [Enhancement] Add SectionAccessExpression
- [Enhancement] Remove LexerSnapshot HOT 2
- [BUG] Sequences using variables causes a parse error HOT 1
- Parser error when function return type is nullable HOT 5
- [BUG] escaped quote inside of quoted identifier HOT 1
- [BUG] Parser error on record type definition - Did you leave a dangling comma? HOT 2
- [BUG] Invalid identifier allowed as record field name HOT 1
- [BUG] Inconsistent parsing of identifiers with PowerBI HOT 5
- [BUG] parser error with empty table type declaration
- Identifier not parsed with unicode symbols [BUG] HOT 5
- This repo is missing important files
- [Enhancement] New language keyword `catch`
- [BUG] maybeNormalizeNumber doesn't work on hex literals HOT 1
- [Enhancement] Is there a python version of the parser? HOT 1
- [BUG] - Recursive Section Member Reference Isn't Accepted as Valid HOT 4
- [Enhancement] Reason tag for CancellationToken HOT 1
- field-specification Deviation Double-Check
- [BUG] Inconsistent and maybe buggy parsing of generalized-identifier compared to Power-BI HOT 1
- [BUG] Quoted identifiers and unquoted identifiers sometimes parse differently
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerquery-parser.