diff options
| author | Koichi ITO <koic.ito@gmail.com> | 2024-03-03 21:25:10 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-03-07 14:05:20 +0000 |
| commit | 0e4bfd08e548e90faf5d91bddccf418dc9a62a42 (patch) | |
| tree | 12ac92dffdedf181274593cf0f53798a1e8bb4de /test | |
| parent | 78725f14b287bff19d48dea076be169c74e18b77 (diff) | |
[ruby/prism] Fix an AST and token incompatibility for `Prism::Translation::Parser`
Fixes https://github.com/ruby/prism/pull/2506.
This PR fixes an AST and token incompatibility between Parser gem and `Prism::Translation::Parser`
for symbols quoted with line breaks.
https://github.com/ruby/prism/commit/06ab4df8cd
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/fixtures/dsym_str.txt | 2 | ||||
| -rw-r--r-- | test/prism/snapshots/dsym_str.txt | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/prism/fixtures/dsym_str.txt b/test/prism/fixtures/dsym_str.txt new file mode 100644 index 0000000000..ee68dde88d --- /dev/null +++ b/test/prism/fixtures/dsym_str.txt @@ -0,0 +1,2 @@ +:"foo + bar" diff --git a/test/prism/snapshots/dsym_str.txt b/test/prism/snapshots/dsym_str.txt new file mode 100644 index 0000000000..33a5e2da21 --- /dev/null +++ b/test/prism/snapshots/dsym_str.txt @@ -0,0 +1,11 @@ +@ ProgramNode (location: (1,0)-(2,6)) +├── locals: [] +└── statements: + @ StatementsNode (location: (1,0)-(2,6)) + └── body: (length: 1) + └── @ SymbolNode (location: (1,0)-(2,6)) + ├── flags: forced_us_ascii_encoding + ├── opening_loc: (1,0)-(1,2) = ":\"" + ├── value_loc: (1,2)-(2,5) = "foo\n bar" + ├── closing_loc: (2,5)-(2,6) = "\"" + └── unescaped: "foo\n bar" |
