|
1 | 1 | import { |
2 | | - Arr, Assign, Base, Block, Call, Class, Code, Comment, Existence, Expansion, Extends, |
3 | | - For, If, In, Literal, ModuleDeclaration, Obj, Op, Param, Parens, Range, Return, Splat, Switch, TaggedTemplateCall, |
4 | | - Throw, Try, Value, While, |
5 | | -} from 'decaffeinate-coffeescript/lib/coffee-script/nodes'; |
| 2 | + Arr, Assign, Base, Block, Call, Class, Code, Existence, Expansion, Extends, For, If, In, Literal, ModuleDeclaration, |
| 3 | + Obj, Op, Param, Parens, Range, Return, Splat, StringWithInterpolations, Switch, TaggedTemplateCall, Throw, Try, Value, |
| 4 | + While, |
| 5 | +} from 'decaffeinate-coffeescript2/lib/coffeescript/nodes'; |
6 | 6 | import { Node } from '../nodes'; |
7 | 7 | import ParseContext from '../util/ParseContext'; |
8 | 8 | import UnsupportedNodeError from '../util/UnsupportedNodeError'; |
@@ -79,7 +79,7 @@ export default function mapAny(context: ParseContext, node: Base): Node { |
79 | 79 | return mapObj(context, node); |
80 | 80 | } |
81 | 81 |
|
82 | | - if (node instanceof Parens) { |
| 82 | + if (node instanceof Parens || node instanceof StringWithInterpolations) { |
83 | 83 | return mapParens(context, node); |
84 | 84 | } |
85 | 85 |
|
@@ -143,10 +143,5 @@ export default function mapAny(context: ParseContext, node: Base): Node { |
143 | 143 | return mapModuleDeclaration(context, node); |
144 | 144 | } |
145 | 145 |
|
146 | | - if (node instanceof Comment) { |
147 | | - throw new UnsupportedNodeError( |
148 | | - node, 'Expected comment notes to be filtered out by mapBlock rather than processed directly.'); |
149 | | - } |
150 | | - |
151 | 146 | throw new UnsupportedNodeError(node); |
152 | 147 | } |
0 commit comments