mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
doc(ast): document why Directive.directive is a raw string
This commit is contained in:
parent
35167599bc
commit
89b49bdb07
1 changed files with 3 additions and 1 deletions
|
|
@ -922,7 +922,9 @@ pub struct Directive {
|
|||
#[cfg_attr(feature = "serde", serde(flatten))]
|
||||
pub span: Span,
|
||||
pub expression: StringLiteral,
|
||||
// directives should always use the unescaped raw string
|
||||
/// 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.
|
||||
/// <https://tc39.es/ecma262/#sec-directive-prologues-and-the-use-strict-directive>
|
||||
pub directive: Atom,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue