This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Many symbols without scopes #137
Open
Description
The support for js is pretty bad. Most of the issues are in the way of parsing variable names.
Load this example into atom. When I say something is not tagged
I mean its scope is only .source.js
.
import * as p from 'point'; //test
import { x as y } from 'coordinates'; //test
const ANSWER = 42; // ANSWER not tagged (fixed by #138, #140)
var one, two, three, four; // variables not tagged
var five = 5, six = 6; // variables not tagged
function someFunc(arg1, arg2, arg3) {
var aVariable = 'ok'; // aVariable not tagged
aVariable = 'nope'; // aVariable not tagged
var anArray = new Array() // anArray not tagged (fixed)
anArray.slice() // anArray not tagged (fixed)
anArray.otherMethod() // anArray, otherMethod not tagged (fixed)
randomGlobal.prop.omg() // not tagged (fixed)
var anObject = {
key1: 'val1' // key1 not tagged
key2: function(one, two) {
}
}
}
var funcVar = function(arg1, arg2, arg3) {
}
class Car extends Vehicle {
constructor(speed, cost) {
super(speed);
var cindex = Symbol('cost'); // cindex not tagged
this[cindex] = cost; // cindex not tagged
this.intro = `This is a car runs at ${speed}.`;
}
}
for (let num of [1, 2, 3]) { // num not tagged
console.log(num + 0b111110111);
}
Giving these symbols correct scopes will greatly improve the support in the coming SymbolProvider
in the soon-to-be-bundled-in-core autocomplete-plus.