mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(ast)!: remove FromIn<Expression> for Statement (#8280)
All node creation is meant to go via `AstBuilder`. This is necessary to support Node IDs. Remove this method which breaks that rule. It's not used anyway.
This commit is contained in:
parent
a5e35282ac
commit
5106088b88
1 changed files with 2 additions and 11 deletions
|
|
@ -2,8 +2,8 @@
|
|||
#![warn(missing_docs)]
|
||||
use std::{borrow::Cow, fmt};
|
||||
|
||||
use oxc_allocator::{Box, FromIn, Vec};
|
||||
use oxc_span::{Atom, GetSpan, Span};
|
||||
use oxc_allocator::{Box, Vec};
|
||||
use oxc_span::{Atom, Span};
|
||||
use oxc_syntax::{operator::UnaryOperator, scope::ScopeFlags, symbol::SymbolId};
|
||||
|
||||
use crate::ast::*;
|
||||
|
|
@ -790,15 +790,6 @@ impl Statement<'_> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> FromIn<'a, Expression<'a>> for Statement<'a> {
|
||||
fn from_in(expression: Expression<'a>, allocator: &'a oxc_allocator::Allocator) -> Self {
|
||||
Statement::ExpressionStatement(Box::from_in(
|
||||
ExpressionStatement { span: expression.span(), expression },
|
||||
allocator,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
impl Directive<'_> {
|
||||
/// A Use Strict Directive is an ExpressionStatement in a Directive Prologue whose StringLiteral is either of the exact code point sequences "use strict" or 'use strict'.
|
||||
/// A Use Strict Directive may not contain an EscapeSequence or LineContinuation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue