mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-21 18:04:03 +01:00
Script checker: setting a File's length, hidden or readonly counts as a file write
Setting a File object's length truncates or pads the file, and setting readonly or hidden changes it, but script.check reported no outside category for those assignments. It now reports file.write and filesWritten for them: plain and compound assignment, ++ and -- before or after, and the property name as a string literal in brackets. A new integration test lists every global and member the script host adds to the JavaScript engine (the own properties of the global object, of each object or function it holds and of each function's prototype, compared with a plain engine) and fails when one has no row. Each name that reaches outside the document has a probe script, and the test checks that script.check gives it the expected outside id. vc is listed as not checked: script.check reads scripts written for the reference app's scripting, and what vc.run does depends on the command. The test also checks that the checker lists every preprocessor directive the host reads, through the new DirectiveName::ALL. File object properties: https://extendscript.docsforadobe.dev/file-system-access/file-object/
This commit is contained in:
1 parent
063f550802
commit
417ed94431
8 files changed
+273
-19
No files matched your search
@@ -32,6 +32,7 @@ mod pen_rubber_band;
|
||||
mod ruler_guide_nodes;
|
||||
mod ruler_guide_perf;
|
||||
mod ruler_origin;
|
||||
mod script_host_vs_scriptcheck;
|
||||
mod selection_commands;
|
||||
mod stroke_visibility;
|
||||
mod text_stroke_scale;
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
//! Every global and member the script host (`script.run`) adds to the JavaScript engine is in one of
|
||||
//! the tables below, and each name that reaches outside the document has the `outside` id
|
||||
//! `script.check` (`vectorcraft-scriptcheck`) gives it. The names are read from a run: the own
|
||||
//! properties of the global object, of each object or function it holds and of each function's
|
||||
//! `prototype`, with a setter listed again as `name=`. The names a plain `vectorcraft_js::Realm` also
|
||||
//! has are the language's, which reach files and other apps only through the host; `eval` and
|
||||
//! `Function` still have rows, since they run code the checker can't read. A name the host adds
|
||||
//! without a row fails the test.
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_engine::Session;
|
||||
use vectorcraft_js::{DirectiveName, JsValue, Realm};
|
||||
use vectorcraft_scriptcheck::{Limits, check};
|
||||
|
||||
/// The names that reach outside the document: each with a script that uses it and the `outside` id
|
||||
/// the checker gives that script.
|
||||
const OUTSIDE: &[(&str, &str, &str)] = &[
|
||||
("eval", "eval(s);", "unseenCode"),
|
||||
("Function", "var g = new Function(s);", "unseenCode"),
|
||||
("$.evalFile", "$.evalFile(p);", "unseenCode"),
|
||||
("$.getenv", "var h = $.getenv(n);", "environment"),
|
||||
("$.setenv", "$.setenv(n, v);", "environment"),
|
||||
("File.prototype.open", "var f = new File(p); f.open('w');", "filesWritten"),
|
||||
("File.prototype.write", "var f = new File(p); f.write(s);", "filesWritten"),
|
||||
("File.prototype.writeln", "var f = new File(p); f.writeln(s);", "filesWritten"),
|
||||
("File.prototype.copy", "var f = new File(p); f.copy(q);", "filesWritten"),
|
||||
("File.prototype.createAlias", "var f = new File(p); f.createAlias(q);", "filesWritten"),
|
||||
("File.prototype.remove", "var f = new File(p); f.remove();", "filesWritten"),
|
||||
("File.prototype.rename", "var f = new File(p); f.rename(q);", "filesWritten"),
|
||||
("File.prototype.length=", "var f = new File(p); f.length = 0;", "filesWritten"),
|
||||
("File.prototype.hidden=", "var f = new File(p); f.hidden = true;", "filesWritten"),
|
||||
("File.prototype.readonly=", "var f = new File(p); f.readonly = true;", "filesWritten"),
|
||||
("File.prototype.execute", "var f = new File(p); f.execute();", "filesOpened"),
|
||||
("Folder.prototype.create", "var d = new Folder(p); d.create();", "filesWritten"),
|
||||
("Folder.prototype.remove", "var d = new Folder(p); d.remove();", "filesWritten"),
|
||||
("Folder.prototype.rename", "var d = new Folder(p); d.rename(q);", "filesWritten"),
|
||||
("Folder.prototype.execute", "var d = new Folder(p); d.execute();", "filesOpened"),
|
||||
];
|
||||
|
||||
/// The names the host adds that stay inside the document and the run, by the object that has them.
|
||||
/// Reading a file or a folder, a file dialog and a message to the person do not change anything
|
||||
/// outside it.
|
||||
const INSIDE: &[(&str, &str)] = &[
|
||||
("", "$ File Folder alert confirm localize prompt toSource"),
|
||||
("Object.prototype.", "toSource"),
|
||||
("localize.", "length"),
|
||||
("toSource.", "length"),
|
||||
(
|
||||
"$.",
|
||||
"about appEncoding appEncoding= bp build buildDate colorPicker decimalPoint engineName error fileName flags \
|
||||
flags= gc global hiresTimer includePath level line locale locale= localize localize= memCache memCache= os screens \
|
||||
sleep stack strict version write writeln",
|
||||
),
|
||||
("File.", "decode encode fs isEncodingAvailable openDialog saveDialog length prototype"),
|
||||
(
|
||||
"File.prototype.",
|
||||
"absoluteURI alias changePath close constructor created creator displayName encoding encoding= eof error error= \
|
||||
exists fsName fullName getRelativeURI hidden length lineFeed lineFeed= modified name openDlg parent path read \
|
||||
readch readln readonly relativeURI resolve saveDlg seek tell toString type",
|
||||
),
|
||||
(
|
||||
"Folder.",
|
||||
"appData appPackage commonFiles current current= decode desktop encode fs isEncodingAvailable length myDocuments \
|
||||
prototype selectDialog startup system temp trash userData",
|
||||
),
|
||||
(
|
||||
"Folder.prototype.",
|
||||
"absoluteURI alias changePath constructor created displayName error error= exists fsName fullName getFiles \
|
||||
getRelativeURI modified name parent path relativeURI resolve selectDlg toString",
|
||||
),
|
||||
];
|
||||
|
||||
/// The name the checker does not read, which also stands for its members: `script.check` reads
|
||||
/// scripts written for the reference app, `vc` is VectorCraft's own API, and what `vc.run` does
|
||||
/// depends on the command it runs.
|
||||
const NOT_CHECKED: &str = "vc";
|
||||
|
||||
/// An expression whose value is the list of names, one to a line.
|
||||
const LIST: &str = r#"(function () {
|
||||
var out = [];
|
||||
function add(o, prefix) {
|
||||
var own = Object.getOwnPropertyNames(o);
|
||||
for (var i = 0; i < own.length; i++) {
|
||||
out.push(prefix + own[i]);
|
||||
var d = Object.getOwnPropertyDescriptor(o, own[i]);
|
||||
if (d && d.set) out.push(prefix + own[i] + "=");
|
||||
}
|
||||
}
|
||||
var g = (function () { return this; })();
|
||||
var globals = Object.getOwnPropertyNames(g);
|
||||
add(g, "");
|
||||
for (var i = 0; i < globals.length; i++) {
|
||||
var v = g[globals[i]];
|
||||
if (v !== null && (typeof v == "object" || typeof v == "function")) {
|
||||
add(v, globals[i] + ".");
|
||||
if (typeof v == "function" && v.prototype !== null && typeof v.prototype == "object") add(v.prototype, globals[i] + ".prototype.");
|
||||
}
|
||||
}
|
||||
return out.join("\n");
|
||||
})()"#;
|
||||
|
||||
/// The names a script run by the host has.
|
||||
fn host_names() -> BTreeSet<String> {
|
||||
let mut s = Session::new();
|
||||
let r = s.execute("script.run", &json!({"source": format!("vc.log({LIST});"), "name": "list.js"})).unwrap();
|
||||
let text = r["log"][0].as_str().unwrap_or_else(|| panic!("no list in {r}"));
|
||||
text.lines().map(str::to_string).collect()
|
||||
}
|
||||
|
||||
/// The names a plain JavaScript engine has.
|
||||
fn language_names() -> BTreeSet<String> {
|
||||
match Realm::new().run(LIST) {
|
||||
Ok(JsValue::String(text)) => text.lines().map(str::to_string).collect(),
|
||||
other => panic!("no list: {other:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
fn table_names() -> BTreeSet<String> {
|
||||
let inside = INSIDE.iter().flat_map(|(prefix, names)| names.split_whitespace().map(move |n| format!("{prefix}{n}")));
|
||||
OUTSIDE.iter().map(|(n, ..)| n.to_string()).chain(inside).chain([NOT_CHECKED.to_string()]).collect()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_name_the_host_adds_has_a_row() {
|
||||
let host = host_names();
|
||||
let language = language_names();
|
||||
let table = table_names();
|
||||
let not_checked = |n: &&String| n.starts_with(&format!("{NOT_CHECKED}."));
|
||||
let missing: Vec<_> = host.difference(&language).filter(|n| !table.contains(*n) && !not_checked(n)).collect();
|
||||
assert!(missing.is_empty(), "the host adds these names, which no table here lists: {missing:?}");
|
||||
let gone: Vec<_> = table.difference(&host).collect();
|
||||
assert!(gone.is_empty(), "the tables list these names, which a script run by the host does not have: {gone:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_name_that_reaches_outside_has_its_checker_id() {
|
||||
for (name, script, id) in OUTSIDE {
|
||||
let r = check("probe.jsx", script.as_bytes(), None, &Limits::default());
|
||||
let ids: Vec<_> = r.outside.iter().map(|o| o.id).collect();
|
||||
assert!(ids.contains(id), "{name}: the checker gives {ids:?} for {script:?}, not {id}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A line with the directive `d`. The match has no catch-all, so a new directive needs a row, and
|
||||
/// [`DirectiveName::from_name`] reads only the directives in [`DirectiveName::ALL`].
|
||||
fn directive_line(d: DirectiveName) -> &'static str {
|
||||
match d {
|
||||
DirectiveName::Include => "#include \"lib.jsxinc\"",
|
||||
DirectiveName::IncludePath => "#includepath \"lib\"",
|
||||
DirectiveName::Script => "#script Tidy",
|
||||
DirectiveName::Strict => "#strict on",
|
||||
DirectiveName::Target => "#target vectorcraft",
|
||||
DirectiveName::TargetEngine => "#targetengine session",
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_checker_lists_every_directive_the_host_reads() {
|
||||
for d in DirectiveName::ALL {
|
||||
let line = directive_line(d);
|
||||
let r = check("probe.jsx", format!("{line}\nvar a = 1;\n").as_bytes(), None, &Limits::default());
|
||||
let listed: Vec<_> = r.directives.iter().map(|d| d.name.to_string()).collect();
|
||||
assert_eq!(listed, [d.as_str()], "{line}");
|
||||
}
|
||||
}
|
||||
+11
-9
@@ -288,17 +288,19 @@ pub enum DirectiveName {
|
||||
}
|
||||
|
||||
impl DirectiveName {
|
||||
/// Every directive a preprocessor line can name.
|
||||
pub const ALL: [DirectiveName; 6] = [
|
||||
DirectiveName::Include,
|
||||
DirectiveName::IncludePath,
|
||||
DirectiveName::Script,
|
||||
DirectiveName::Strict,
|
||||
DirectiveName::Target,
|
||||
DirectiveName::TargetEngine,
|
||||
];
|
||||
|
||||
/// The directive named `name`, compared without case.
|
||||
pub fn from_name(name: &str) -> Option<DirectiveName> {
|
||||
const NAMES: [(&str, DirectiveName); 6] = [
|
||||
("include", DirectiveName::Include),
|
||||
("includepath", DirectiveName::IncludePath),
|
||||
("script", DirectiveName::Script),
|
||||
("strict", DirectiveName::Strict),
|
||||
("target", DirectiveName::Target),
|
||||
("targetengine", DirectiveName::TargetEngine),
|
||||
];
|
||||
NAMES.iter().find(|(n, _)| n.eq_ignore_ascii_case(name)).map(|(_, d)| *d)
|
||||
DirectiveName::ALL.into_iter().find(|d| d.as_str().eq_ignore_ascii_case(name))
|
||||
}
|
||||
|
||||
pub fn as_str(self) -> &'static str {
|
||||
|
||||
@@ -239,6 +239,10 @@ enum Pending<'s> {
|
||||
MenuString(Option<usize>, &'s str),
|
||||
/// `.open(`: a string literal with the open mode may follow.
|
||||
Open(Option<usize>),
|
||||
/// A File object's `length`, `hidden` or `readonly` (`f.length`, `f['length']`): an assignment
|
||||
/// or an update (`++`, `--`) that sets it may follow. With `true`, a prefix update came before
|
||||
/// the receiver, and it sets the property unless a member or a call follows it.
|
||||
Setter(Option<usize>, bool),
|
||||
/// A platform name where a property key or a label may stand (first, or after `{`, `,`, `;` or
|
||||
/// `}`): it is a key or a label when `:` follows.
|
||||
Name(&'s str, Option<usize>),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! The platform features, menu commands and later syntax the analysis recognises.
|
||||
|
||||
use super::{Analyzer, FeatureId, NEWER, OutsideId, Pending, Sig, T, catalog, is, member_mark, newer_number, report, unquote, word};
|
||||
use super::{Analyzer, COMPOUND, FeatureId, NEWER, OutsideId, Pending, Sig, T, catalog, is, member_mark, newer_number, report, unquote, word};
|
||||
|
||||
/// A global name of the platform the report looks for (`$`, `File`, `Socket`, `alert`, `eval`…).
|
||||
pub(super) fn platform_name(n: &str) -> bool {
|
||||
@@ -72,6 +72,17 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
|
||||
self.open_mode(&unquote(t.text, 2), l);
|
||||
}
|
||||
}
|
||||
Pending::Setter(l, prefix) => {
|
||||
let sets = if prefix {
|
||||
!t.is(".") && !t.is("[") && !t.is("(")
|
||||
} else {
|
||||
// An update operator after a line break belongs to the next line's operand.
|
||||
t.kind == T::Punct && (t.text == "=" || COMPOUND.contains(&t.text) || (matches!(t.text, "++" | "--") && !t.nl))
|
||||
};
|
||||
if sets {
|
||||
self.file_setter(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
match t.kind {
|
||||
T::Ident => self.name(t, line),
|
||||
@@ -113,7 +124,29 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
|
||||
match pending {
|
||||
Pending::Window(l) | Pending::WindowType(l) => self.acc.feature(FeatureId::ScriptuiWindow, l),
|
||||
Pending::Menu(l) | Pending::MenuString(l, _) => self.menu(None, l),
|
||||
Pending::Open(_) | Pending::Name(..) | Pending::None => {}
|
||||
Pending::Setter(l, true) => self.file_setter(l),
|
||||
Pending::Open(_) | Pending::Setter(_, false) | Pending::Name(..) | Pending::None => {}
|
||||
}
|
||||
}
|
||||
|
||||
/// A File object's `length`, `hidden` or `readonly` set at `line`: the file changes.
|
||||
fn file_setter(&mut self, line: Option<usize>) {
|
||||
self.acc.feature(FeatureId::FileWrite, line);
|
||||
self.acc.outside(OutsideId::FilesWritten, line, None);
|
||||
}
|
||||
|
||||
/// `name`, a property of `receiver` read with `.` or as a string literal in brackets, `before`
|
||||
/// coming before the receiver: when it is a File object's setter, the next token says whether it
|
||||
/// is set ([`Pending::Setter`]). An update operator in `before` is a prefix (`++f.length`) when
|
||||
/// the receiver is on its line, or when it starts a line or comes where an expression may start;
|
||||
/// otherwise it ends the operand before it (`i++` and a line break, then `f.length`).
|
||||
fn setter(&mut self, name: &str, receiver: Option<Sig<'s>>, before: Option<Sig<'s>>, line: Option<usize>) {
|
||||
if catalog::FILE_SETTERS.contains(&name) && self.file_receiver(receiver, before) {
|
||||
// Before a receiver that ends in `)` (`new File(i++).length`), the operator is inside the
|
||||
// parentheses.
|
||||
let update = before.filter(|b| (b.is("++") || b.is("--")) && receiver.is_some_and(|r| r.kind == T::Ident));
|
||||
let prefix = update.is_some_and(|b| b.nl || b.expr || receiver.is_some_and(|r| !r.nl));
|
||||
self.pending = Pending::Setter(line, prefix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,6 +203,7 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
|
||||
if n == catalog::REFLECT {
|
||||
self.acc.feature(FeatureId::Reflection, line);
|
||||
}
|
||||
self.setter(n, h1, h2, line);
|
||||
return;
|
||||
}
|
||||
if member_mark(h0) {
|
||||
@@ -231,6 +265,11 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
|
||||
fn punct(&mut self, t: &Sig<'s>, line: Option<usize>) {
|
||||
let [h0, h1, h2, h3] = self.h;
|
||||
match t.text {
|
||||
// `f['length']`: a File object's setter may follow.
|
||||
"]" if is(h1, "[") && h0.is_some_and(|s| s.kind == T::Str) => {
|
||||
let name = h0.map(|s| unquote(s.text, 16)).unwrap_or_default();
|
||||
self.setter(&name, h2, h3, line);
|
||||
}
|
||||
"(" => self.call(line),
|
||||
// `Name.prototype["+"] = …` defines an operator.
|
||||
"=" => {
|
||||
@@ -251,10 +290,7 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
|
||||
let Some(callee) = h0.filter(|s| s.kind == T::Ident) else { return };
|
||||
let n = callee.text;
|
||||
if is(h1, ".") {
|
||||
// The receiver is a variable holding a File or Folder object (not a property of the same
|
||||
// name), or a File or Folder object made in place or held in grouping parentheses
|
||||
// ([`Sig::file`]).
|
||||
let file = h2.is_some_and(|r| r.file || (r.kind == T::Ident && !member_mark(h3) && self.files.contains(r.text)));
|
||||
let file = self.file_receiver(h2, h3);
|
||||
if n == catalog::MENU_COMMAND {
|
||||
self.pending = Pending::Menu(line);
|
||||
} else if n == catalog::OPEN && file {
|
||||
@@ -288,6 +324,13 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether `receiver`, which `before` comes before, is a variable holding a File or Folder object
|
||||
/// (not a property of the same name), or a File or Folder object made in place or held in
|
||||
/// grouping parentheses ([`Sig::file`]).
|
||||
fn file_receiver(&self, receiver: Option<Sig<'s>>, before: Option<Sig<'s>>) -> bool {
|
||||
receiver.is_some_and(|r| r.file || (r.kind == T::Ident && !member_mark(before) && self.files.contains(r.text)))
|
||||
}
|
||||
|
||||
fn string(&mut self, t: &Sig<'s>, line: Option<usize>) {
|
||||
let [h0, h1, h2, _] = self.h;
|
||||
if t.text.contains(catalog::ACTION_TEXT) {
|
||||
|
||||
@@ -32,6 +32,9 @@ pub(crate) const FOLDER: &str = "Folder";
|
||||
pub(crate) const FILE_READS: &[&str] = &["read", "readch", "readln"];
|
||||
pub(crate) const FOLDER_READS: &[&str] = &["getFiles"];
|
||||
pub(crate) const FILE_WRITES: &[&str] = &["write", "writeln", "remove", "rename", "copy", "createAlias", "create"];
|
||||
/// The properties of a File object whose setting changes the file: its length, and its hidden and
|
||||
/// read-only flags.
|
||||
pub(crate) const FILE_SETTERS: &[&str] = &["length", "hidden", "readonly"];
|
||||
pub(crate) const FILE_DIALOGS: &[&str] = &["openDialog", "saveDialog"];
|
||||
pub(crate) const FOLDER_DIALOGS: &[&str] = &["selectDialog"];
|
||||
pub(crate) const INSTANCE_DIALOGS: &[&str] = &["openDlg", "saveDlg", "selectDlg"];
|
||||
|
||||
@@ -530,6 +530,40 @@ fn the_scripts_own_platform_names_are_not_the_platforms() {
|
||||
assert_eq!(r.outside.iter().map(|o| o.id).collect::<Vec<_>>(), ["filesWritten"]);
|
||||
}
|
||||
|
||||
/// Setting a File object's length, hidden or read-only flag changes the file; reading them, comparing
|
||||
/// them and setting them on another object does not.
|
||||
#[test]
|
||||
fn setting_a_files_length_or_flags_writes_it() {
|
||||
let r = report(concat!(
|
||||
"var f = new File(p);\n",
|
||||
"f.length = 0;\n",
|
||||
"f.readonly = true;\n",
|
||||
"f.hidden |= 1;\n",
|
||||
"f.length++;\n",
|
||||
"new File(q).length = 4;\n",
|
||||
"if (x) --f.length;\n",
|
||||
"f['readonly'] = false;\n",
|
||||
"++\n",
|
||||
"f.length;\n",
|
||||
"var k = ++\n",
|
||||
"f['length'];\n",
|
||||
"++f.length.x; var z = new File(i++).length;\n",
|
||||
"var n = f.length;\n",
|
||||
"if (f.readonly == true) {}\n",
|
||||
"o.length = 0;\n",
|
||||
"o.f.length = 0;\n",
|
||||
"var s = [1]; s.length = 0;\n",
|
||||
"var m = f['length'];\n",
|
||||
"i++\n",
|
||||
"f.length;\n",
|
||||
"f.length\n",
|
||||
"++i;\n",
|
||||
));
|
||||
let outside: Vec<(&str, &[usize])> = r.outside.iter().map(|o| (o.id, o.lines.as_slice())).collect();
|
||||
assert_eq!(outside, [("filesWritten", &[2, 3, 4, 5, 6, 7, 8, 10, 12][..])]);
|
||||
assert_eq!(feature(&r, "file.write").map(|f| f.lines.as_slice()), Some(&[2, 3, 4, 5, 6, 7, 8, 10, 12][..]));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_function_after_a_line_that_ends_a_statement_is_a_declaration() {
|
||||
let r = report("var n = 1\nfunction File() {}\nFile('x');\nvar m = 2 /* a\n */ function Socket() {}\nnew Socket();\n");
|
||||
|
||||
+4
-4
@@ -2556,10 +2556,10 @@ control character, in the first 8 KiB) or `tooLarge` (over 8 MiB). For a script,
|
||||
- `menuCommands.strings` lists the string literals the script passes to `executeMenuCommand`
|
||||
(`app.executeMenuCommand('…')`), each with a count and its lines, and `menuCommands.dynamic` counts the calls
|
||||
whose argument isn't a string literal.
|
||||
- `outside` lists what the script does outside the document: `filesWritten` (with the open modes used),
|
||||
`filesOpened` (files opened in other apps), `network`, `nativeCode`, `otherApps` (messages to other apps),
|
||||
`environment` (environment variables), `unseenCode` (`eval`, `new Function` and `$.evalFile`) and
|
||||
`preferences` (the reference app's preferences changed).
|
||||
- `outside` lists what the script does outside the document: `filesWritten` (with the open modes used; setting a
|
||||
File object's `length`, `hidden` or `readonly` counts too), `filesOpened` (files opened in other apps), `network`,
|
||||
`nativeCode`, `otherApps` (messages to other apps), `environment` (environment variables), `unseenCode` (`eval`,
|
||||
`new Function` and `$.evalFile`) and `preferences` (the reference app's preferences changed).
|
||||
- `problems` lists what would stop the script loading as written (strings, comments, regular expressions,
|
||||
template literals and XML literals that aren't closed, brackets that don't match, syntax newer than ES3 and
|
||||
unknown directives) and notes on its text (bytes that aren't valid UTF-8, mixed line endings, and nesting deeper
|
||||
|
||||
Reference in new issue
Block a user