Module/import upgrades (#4677)
* Parse more import syntax Signed-off-by: Nick Cameron <nrc@ncameron.org> * Remove unnecessary Vec from VariableDeclaration Signed-off-by: Nick Cameron <nrc@ncameron.org> * Parse export import Signed-off-by: Nick Cameron <nrc@ncameron.org> * Factor out an execution module Signed-off-by: Nick Cameron <nrc@ncameron.org> * imports: constants, globs, export import Signed-off-by: Nick Cameron <nrc@ncameron.org> * test fixups Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -230,8 +230,7 @@ describe('testing getNodePathFromSourceRange', () => {
|
||||
expect(result).toEqual([
|
||||
['body', ''],
|
||||
[0, 'index'],
|
||||
['declarations', 'VariableDeclaration'],
|
||||
[0, 'index'],
|
||||
['declaration', 'VariableDeclaration'],
|
||||
['init', ''],
|
||||
['body', 'PipeExpression'],
|
||||
[2, 'index'],
|
||||
@ -250,8 +249,7 @@ describe('testing getNodePathFromSourceRange', () => {
|
||||
const expected = [
|
||||
['body', ''],
|
||||
[0, 'index'],
|
||||
['declarations', 'VariableDeclaration'],
|
||||
[0, 'index'],
|
||||
['declaration', 'VariableDeclaration'],
|
||||
['init', ''],
|
||||
['body', 'PipeExpression'],
|
||||
[3, 'index'],
|
||||
@ -293,8 +291,7 @@ describe('testing getNodePathFromSourceRange', () => {
|
||||
expect(result).toEqual([
|
||||
['body', ''],
|
||||
[1, 'index'],
|
||||
['declarations', 'VariableDeclaration'],
|
||||
[0, 'index'],
|
||||
['declaration', 'VariableDeclaration'],
|
||||
['init', ''],
|
||||
['cond', 'IfExpression'],
|
||||
['left', 'BinaryExpression'],
|
||||
@ -324,8 +321,7 @@ describe('testing getNodePathFromSourceRange', () => {
|
||||
expect(result).toEqual([
|
||||
['body', ''],
|
||||
[1, 'index'],
|
||||
['declarations', 'VariableDeclaration'],
|
||||
[0, 'index'],
|
||||
['declaration', 'VariableDeclaration'],
|
||||
['init', ''],
|
||||
['then_val', 'IfExpression'],
|
||||
['body', 'IfExpression'],
|
||||
@ -353,7 +349,8 @@ describe('testing getNodePathFromSourceRange', () => {
|
||||
expect(result).toEqual([
|
||||
['body', ''],
|
||||
[0, 'index'],
|
||||
['items', 'ImportStatement'],
|
||||
['selector', 'ImportStatement'],
|
||||
['items', 'ImportSelector'],
|
||||
[1, 'index'],
|
||||
['name', 'ImportItem'],
|
||||
])
|
||||
|
Reference in New Issue
Block a user