Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
feat(rome_js_parser): EcmaScript @decorators #4252
Browse files Browse the repository at this point in the history
  • Loading branch information
denbezrukov committed Apr 19, 2023
1 parent 1e8935d commit 8f57744
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 201 deletions.
7 changes: 0 additions & 7 deletions crates/rome_js_parser/src/syntax/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2479,13 +2479,6 @@ fn parse_decorator(p: &mut JsParser) -> ParsedSyntax {
Present(m.complete(p, JS_DECORATOR))
}

// test ts ts_class_decorator
// function test() {}
// @test
// class Test {}
// @test.a?.c @test @test
// class Test2{}

/// Skips over any TypeScript decorator syntax.
pub(crate) fn skip_ts_decorators(p: &mut JsParser) {
if !p.at(T![@]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "foo" with { type, "json" };
import "bar" \u{61}ith { type: "json" };
import { foo } with { type: "json" };
import "lorem"
assert { type: "json" }
with { type: "json" }
import foo2 from "foo.json" with { "type": "json", type: "html", "type": "js" };
import "x" with;
import ipsum from "ipsum.json" with { type: "json", lazy: true, startAtLine: 1 };
Expand Down
Loading

0 comments on commit 8f57744

Please sign in to comment.