Skip to content

Commit

Permalink
refactor(semantic): rename fields in snapshots from flag to flags
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Aug 20, 2024
1 parent e27ad4d commit adf2f07
Show file tree
Hide file tree
Showing 285 changed files with 1,737 additions and 1,736 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/block/inherited
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 1,
"node": "BlockStatement",
"symbols": []
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"flags": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"id": 0,
"name": "a",
"node": "VariableDeclarator(a)",
"references": [
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 0,
"name": "a",
"node_id": 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/block/scope.ts
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 1,
"node": "BlockStatement",
"symbols": [
{
"flag": "SymbolFlags(BlockScopedVariable)",
"flags": "SymbolFlags(BlockScopedVariable)",
"id": 0,
"name": "i",
"node": "VariableDeclarator(i)",
"references": [
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 0,
"name": "i",
"node_id": 11
}
]
},
{
"flag": "SymbolFlags(BlockScopedVariable)",
"flags": "SymbolFlags(BlockScopedVariable)",
"id": 1,
"name": "j",
"node": "VariableDeclarator(j)",
Expand All @@ -35,7 +35,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/block/scope.ts
]
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,50 +7,50 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode | Function | Arrow)",
"flags": "ScopeFlags(StrictMode | Function | Arrow)",
"id": 1,
"node": "ArrowFunctionExpression",
"symbols": []
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(BlockScopedVariable | ConstVariable | ArrowFunction)",
"flags": "SymbolFlags(BlockScopedVariable | ConstVariable | ArrowFunction)",
"id": 0,
"name": "foo",
"node": "VariableDeclarator(foo)",
"references": [
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 0,
"name": "foo",
"node_id": 13
},
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 2,
"name": "foo",
"node_id": 19
}
]
},
{
"flag": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"flags": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"id": 1,
"name": "a",
"node": "VariableDeclarator(a)",
"references": [
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 1,
"name": "a",
"node_id": 15
},
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 3,
"name": "a",
"node_id": 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 1,
"node": "TSTypeAliasDeclaration",
"symbols": []
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(TypeAlias)",
"flags": "SymbolFlags(TypeAlias)",
"id": 0,
"name": "T",
"node": "TSTypeAliasDeclaration",
"references": [
{
"flag": "ReferenceFlags(Type)",
"flags": "ReferenceFlags(Type)",
"id": 1,
"name": "T",
"node_id": 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/call-expression
[
{
"children": [],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"flags": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"id": 0,
"name": "T",
"node": "VariableDeclarator(T)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 1,
"node": "BlockStatement",
"symbols": []
Expand All @@ -16,12 +16,12 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 3,
"node": "BlockStatement",
"symbols": [
{
"flag": "SymbolFlags(FunctionScopedVariable | CatchVariable)",
"flags": "SymbolFlags(FunctionScopedVariable | CatchVariable)",
"id": 1,
"name": "e",
"node": "CatchParameter",
Expand All @@ -30,24 +30,24 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/inherited
]
}
],
"flag": "ScopeFlags(StrictMode | CatchClause)",
"flags": "ScopeFlags(StrictMode | CatchClause)",
"id": 2,
"node": "CatchClause",
"symbols": []
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"flags": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"id": 0,
"name": "a",
"node": "VariableDeclarator(a)",
"references": [
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 0,
"name": "a",
"node_id": 12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.ts
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 1,
"node": "BlockStatement",
"symbols": []
Expand All @@ -16,26 +16,26 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.ts
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 3,
"node": "BlockStatement",
"symbols": [
{
"flag": "SymbolFlags(FunctionScopedVariable | CatchVariable)",
"flags": "SymbolFlags(FunctionScopedVariable | CatchVariable)",
"id": 0,
"name": "e",
"node": "CatchParameter",
"references": [
{
"flag": "ReferenceFlags(Read)",
"flags": "ReferenceFlags(Read)",
"id": 0,
"name": "e",
"node_id": 8
}
]
},
{
"flag": "SymbolFlags(BlockScopedVariable)",
"flags": "SymbolFlags(BlockScopedVariable)",
"id": 1,
"name": "a",
"node": "VariableDeclarator(a)",
Expand All @@ -44,25 +44,25 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/catch/scope.ts
]
}
],
"flag": "ScopeFlags(StrictMode | CatchClause)",
"flags": "ScopeFlags(StrictMode | CatchClause)",
"id": 2,
"node": "CatchClause",
"symbols": []
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"flags": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"id": 2,
"name": "unresolved",
"node": "VariableDeclarator(unresolved)",
"references": []
},
{
"flag": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"flags": "SymbolFlags(BlockScopedVariable | ConstVariable)",
"id": 3,
"name": "dontReference2",
"node": "VariableDeclarator(dontReference2)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 1,
"node": "TSTypeAliasDeclaration",
"symbols": []
},
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 2,
"node": "Class(Foo)",
"symbols": []
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(TypeAlias)",
"flags": "SymbolFlags(TypeAlias)",
"id": 0,
"name": "T",
"node": "TSTypeAliasDeclaration",
"references": [
{
"flag": "ReferenceFlags(Type)",
"flags": "ReferenceFlags(Type)",
"id": 0,
"name": "T",
"node_id": 14
}
]
},
{
"flag": "SymbolFlags(Class)",
"flags": "SymbolFlags(Class)",
"id": 1,
"name": "Foo",
"node": "Class(Foo)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati
"children": [
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 1,
"node": "TSTypeAliasDeclaration",
"symbols": []
},
{
"children": [],
"flag": "ScopeFlags(StrictMode)",
"flags": "ScopeFlags(StrictMode)",
"id": 2,
"node": "Class(Foo)",
"symbols": []
}
],
"flag": "ScopeFlags(StrictMode | Top)",
"flags": "ScopeFlags(StrictMode | Top)",
"id": 0,
"node": "Program",
"symbols": [
{
"flag": "SymbolFlags(TypeAlias)",
"flags": "SymbolFlags(TypeAlias)",
"id": 0,
"name": "T",
"node": "TSTypeAliasDeclaration",
"references": [
{
"flag": "ReferenceFlags(Type)",
"flags": "ReferenceFlags(Type)",
"id": 0,
"name": "T",
"node_id": 14
}
]
},
{
"flag": "SymbolFlags(Class)",
"flags": "SymbolFlags(Class)",
"id": 1,
"name": "Foo",
"node": "Class(Foo)",
Expand Down
Loading

0 comments on commit adf2f07

Please sign in to comment.