mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(semantic): remove SymbolFlags::TypeLiteral (#7415)
This commit is contained in:
parent
79ab8cca0e
commit
d7d073578d
2 changed files with 7 additions and 10 deletions
|
|
@ -30,10 +30,8 @@ impl<'s, 'a> Symbol<'s, 'a> {
|
|||
const IMPORT: SymbolFlags = SymbolFlags::Import.union(SymbolFlags::TypeImport);
|
||||
// note: intetionally do not use `SymbolFlags::is_type` here, since that
|
||||
// can return `true` for values
|
||||
const TYPE: SymbolFlags = SymbolFlags::TypeAlias
|
||||
.union(SymbolFlags::TypeLiteral)
|
||||
.union(SymbolFlags::TypeParameter)
|
||||
.union(SymbolFlags::Interface);
|
||||
const TYPE: SymbolFlags =
|
||||
SymbolFlags::TypeAlias.union(SymbolFlags::TypeParameter).union(SymbolFlags::Interface);
|
||||
const ENUM: SymbolFlags = SymbolFlags::Enum.union(SymbolFlags::EnumMember);
|
||||
const NAMESPACE_LIKE: SymbolFlags =
|
||||
SymbolFlags::NameSpaceModule.union(SymbolFlags::ValueModule);
|
||||
|
|
|
|||
|
|
@ -91,12 +91,11 @@ bitflags! {
|
|||
const RegularEnum = 1 << 10;
|
||||
const ConstEnum = 1 << 11;
|
||||
const EnumMember = 1 << 12;
|
||||
const TypeLiteral = 1 << 13;
|
||||
const TypeParameter = 1 << 14;
|
||||
const NameSpaceModule = 1 << 15;
|
||||
const ValueModule = 1 << 16;
|
||||
const TypeParameter = 1 << 13;
|
||||
const NameSpaceModule = 1 << 14;
|
||||
const ValueModule = 1 << 15;
|
||||
// In a dts file or there is a declare flag
|
||||
const Ambient = 1 << 17;
|
||||
const Ambient = 1 << 16;
|
||||
|
||||
const Enum = Self::ConstEnum.bits() | Self::RegularEnum.bits();
|
||||
const Variable = Self::FunctionScopedVariable.bits() | Self::BlockScopedVariable.bits();
|
||||
|
|
@ -104,7 +103,7 @@ bitflags! {
|
|||
const BlockScoped = Self::BlockScopedVariable.bits() | Self::Enum.bits() | Self::Class.bits();
|
||||
|
||||
const Value = Self::Variable.bits() | Self::Class.bits() | Self::Enum.bits() | Self::EnumMember.bits() | Self::ValueModule.bits();
|
||||
const Type = Self::Class.bits() | Self::Interface.bits() | Self::Enum.bits() | Self::EnumMember.bits() | Self::TypeLiteral.bits() | Self::TypeParameter.bits() | Self::TypeAlias.bits();
|
||||
const Type = Self::Class.bits() | Self::Interface.bits() | Self::Enum.bits() | Self::EnumMember.bits() | Self::TypeParameter.bits() | Self::TypeAlias.bits();
|
||||
|
||||
/// Variables can be redeclared, but can not redeclare a block-scoped declaration with the
|
||||
/// same name, or any other value that is not a variable, e.g. ValueModule or Class
|
||||
|
|
|
|||
Loading…
Reference in a new issue