author | sundar |
Tue, 12 Jul 2016 21:18:13 +0530 | |
changeset 39662 | e2b36a3779b9 |
parent 31094 | 7a9fa21da791 |
child 41422 | 97eda72f53b6 |
permissions | -rw-r--r-- |
29407 | 1 |
/* |
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
2 |
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
29407 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
package jdk.nashorn.api.tree; |
|
26 |
||
27 |
import java.io.File; |
|
28 |
import java.io.IOException; |
|
29 |
import java.io.PrintWriter; |
|
30 |
import java.io.Reader; |
|
31 |
import java.net.URL; |
|
32 |
import java.nio.file.Path; |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
33 |
import java.util.Arrays; |
29407 | 34 |
import java.util.Map; |
35 |
import java.util.Objects; |
|
36 |
import jdk.nashorn.api.scripting.NashornException; |
|
37 |
import jdk.nashorn.api.scripting.ScriptObjectMirror; |
|
38 |
import jdk.nashorn.internal.ir.FunctionNode; |
|
39 |
import jdk.nashorn.internal.runtime.Context; |
|
40 |
import jdk.nashorn.internal.runtime.ErrorManager; |
|
41 |
import jdk.nashorn.internal.runtime.JSType; |
|
42 |
import jdk.nashorn.internal.runtime.ParserException; |
|
43 |
import jdk.nashorn.internal.runtime.ScriptEnvironment; |
|
44 |
import jdk.nashorn.internal.runtime.Source; |
|
45 |
import jdk.nashorn.internal.runtime.options.Options; |
|
46 |
||
47 |
final class ParserImpl implements Parser { |
|
48 |
||
49 |
private final ScriptEnvironment env; |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
50 |
private final boolean moduleMode; |
29407 | 51 |
|
52 |
ParserImpl(final String... args) throws IllegalArgumentException { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
53 |
Objects.requireNonNull(args); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
54 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
55 |
// handle the parser specific "--es6-module" option |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
56 |
boolean seenModuleOption = false; |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
57 |
for (int idx = 0; idx < args.length; idx++) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
58 |
final String opt = args[idx]; |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
59 |
if (opt.equals("--es6-module")) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
60 |
seenModuleOption = true; |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
61 |
/* |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
62 |
* Nashorn parser does not understand parser API specific |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
63 |
* option. This option implies --language=es6. So, we change |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
64 |
* the option to --language=es6. Note that if user specified |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
65 |
* --language=es6 explicitly, that is okay. Nashorn tolerates |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
66 |
* repeated options! |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
67 |
*/ |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
68 |
args[idx] = "--language=es6"; |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
69 |
break; |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
70 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
71 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
72 |
this.moduleMode = seenModuleOption; |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
73 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
74 |
// append "--parse-only to signal to the Nashorn that it |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
75 |
// is being used in "parse only" mode. |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
76 |
String[] newArgs = Arrays.copyOf(args, args.length + 1, String[].class); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
77 |
newArgs[args.length] = "--parse-only"; |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
78 |
Options options = new Options("nashorn"); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
79 |
options.process(newArgs); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
80 |
this.env = new ScriptEnvironment(options, |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
81 |
new PrintWriter(System.out), new PrintWriter(System.err)); |
29407 | 82 |
} |
83 |
||
84 |
@Override |
|
85 |
public CompilationUnitTree parse(final File file, final DiagnosticListener listener) throws IOException, NashornException { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
86 |
if (moduleMode) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
87 |
return parseModule(file, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
88 |
} |
31094
7a9fa21da791
8085810: Return value of Objects.requireNonNull call can be used
sundar
parents:
29536
diff
changeset
|
89 |
final Source src = Source.sourceFor(Objects.requireNonNull(file).getName(), file); |
29407 | 90 |
return translate(makeParser(src, listener).parse()); |
91 |
} |
|
92 |
||
93 |
@Override |
|
94 |
public CompilationUnitTree parse(final Path path, final DiagnosticListener listener) throws IOException, NashornException { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
95 |
if (moduleMode) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
96 |
return parseModule(path, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
97 |
} |
31094
7a9fa21da791
8085810: Return value of Objects.requireNonNull call can be used
sundar
parents:
29536
diff
changeset
|
98 |
final Source src = Source.sourceFor(Objects.requireNonNull(path).toString(), path); |
29407 | 99 |
return translate(makeParser(src, listener).parse()); |
100 |
} |
|
101 |
||
102 |
@Override |
|
103 |
public CompilationUnitTree parse(final URL url, final DiagnosticListener listener) throws IOException, NashornException { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
104 |
if (moduleMode) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
105 |
return parseModule(url, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
106 |
} |
29407 | 107 |
final Source src = Source.sourceFor(url.toString(), url); |
108 |
return translate(makeParser(src, listener).parse()); |
|
109 |
} |
|
110 |
||
111 |
@Override |
|
112 |
public CompilationUnitTree parse(final String name, final Reader reader, final DiagnosticListener listener) throws IOException, NashornException { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
113 |
if (moduleMode) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
114 |
return parseModule(name, reader, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
115 |
} |
31094
7a9fa21da791
8085810: Return value of Objects.requireNonNull call can be used
sundar
parents:
29536
diff
changeset
|
116 |
final Source src = Source.sourceFor(Objects.requireNonNull(name), Objects.requireNonNull(reader)); |
29407 | 117 |
return translate(makeParser(src, listener).parse()); |
118 |
} |
|
119 |
||
120 |
@Override |
|
121 |
public CompilationUnitTree parse(final String name, final String code, final DiagnosticListener listener) throws NashornException { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
122 |
if (moduleMode) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
123 |
return parseModule(name, code, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
124 |
} |
29407 | 125 |
final Source src = Source.sourceFor(name, code); |
126 |
return translate(makeParser(src, listener).parse()); |
|
127 |
} |
|
128 |
||
129 |
@Override |
|
130 |
public CompilationUnitTree parse(final ScriptObjectMirror scriptObj, final DiagnosticListener listener) throws NashornException { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
131 |
if (moduleMode) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
132 |
return parseModule(scriptObj, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
133 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
134 |
final Map<?, ?> map = Objects.requireNonNull(scriptObj); |
29407 | 135 |
if (map.containsKey("script") && map.containsKey("name")) { |
136 |
final String script = JSType.toString(map.get("script")); |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
137 |
final String name = JSType.toString(map.get("name")); |
29407 | 138 |
final Source src = Source.sourceFor(name, script); |
139 |
return translate(makeParser(src, listener).parse()); |
|
140 |
} else { |
|
141 |
throw new IllegalArgumentException("can't find 'script' and 'name' properties"); |
|
142 |
} |
|
143 |
} |
|
144 |
||
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
145 |
private CompilationUnitTree parseModule(File file, DiagnosticListener listener) throws IOException, NashornException { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
146 |
final Source src = Source.sourceFor(Objects.requireNonNull(file).getName(), file); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
147 |
return makeModule(src, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
148 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
149 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
150 |
private CompilationUnitTree parseModule(Path path, DiagnosticListener listener) throws IOException, NashornException { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
151 |
final Source src = Source.sourceFor(Objects.requireNonNull(path).toString(), path); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
152 |
return makeModule(src, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
153 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
154 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
155 |
private CompilationUnitTree parseModule(URL url, DiagnosticListener listener) throws IOException, NashornException { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
156 |
final Source src = Source.sourceFor(url.toString(), url); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
157 |
return makeModule(src, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
158 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
159 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
160 |
private CompilationUnitTree parseModule(String name, Reader reader, DiagnosticListener listener) throws IOException, NashornException { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
161 |
final Source src = Source.sourceFor(Objects.requireNonNull(name), Objects.requireNonNull(reader)); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
162 |
return makeModule(src, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
163 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
164 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
165 |
private CompilationUnitTree parseModule(String name, String code, DiagnosticListener listener) throws NashornException { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
166 |
final Source src = Source.sourceFor(name, code); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
167 |
return makeModule(src, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
168 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
169 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
170 |
private CompilationUnitTree parseModule(ScriptObjectMirror scriptObj, DiagnosticListener listener) throws NashornException { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
171 |
final Map<?, ?> map = Objects.requireNonNull(scriptObj); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
172 |
if (map.containsKey("script") && map.containsKey("name")) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
173 |
final String script = JSType.toString(map.get("script")); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
174 |
final String name = JSType.toString(map.get("name")); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
175 |
final Source src = Source.sourceFor(name, script); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
176 |
return makeModule(src, listener); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
177 |
} else { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
178 |
throw new IllegalArgumentException("can't find 'script' and 'name' properties"); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
179 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
180 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
181 |
|
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
182 |
private CompilationUnitTree makeModule(Source src, DiagnosticListener listener) { |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
183 |
final FunctionNode modFunc = makeParser(src, listener).parseModule(src.getName()); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
184 |
return new IRTranslator().translate(modFunc); |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
185 |
} |
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
186 |
|
29407 | 187 |
private jdk.nashorn.internal.parser.Parser makeParser(final Source source, final DiagnosticListener listener) { |
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
188 |
final ErrorManager errMgr = listener != null ? new ListenerErrorManager(listener) : new Context.ThrowErrorManager(); |
29407 | 189 |
return new jdk.nashorn.internal.parser.Parser(env, source, errMgr); |
190 |
} |
|
191 |
||
192 |
private static class ListenerErrorManager extends ErrorManager { |
|
39662
e2b36a3779b9
8149929: Nashorn Parser API needs to be updated for ES6
sundar
parents:
31094
diff
changeset
|
193 |
|
29407 | 194 |
private final DiagnosticListener listener; |
195 |
||
196 |
ListenerErrorManager(final DiagnosticListener listener) { |
|
197 |
// null check |
|
198 |
listener.getClass(); |
|
199 |
this.listener = listener; |
|
200 |
} |
|
201 |
||
202 |
@Override |
|
203 |
public void error(final String msg) { |
|
204 |
error(new ParserException(msg)); |
|
205 |
} |
|
206 |
||
207 |
@Override |
|
208 |
public void error(final ParserException e) { |
|
209 |
listener.report(new DiagnosticImpl(e, Diagnostic.Kind.ERROR)); |
|
210 |
} |
|
211 |
||
212 |
@Override |
|
213 |
public void warning(final String msg) { |
|
214 |
warning(new ParserException(msg)); |
|
215 |
} |
|
216 |
||
217 |
@Override |
|
218 |
public void warning(final ParserException e) { |
|
219 |
listener.report(new DiagnosticImpl(e, Diagnostic.Kind.WARNING)); |
|
220 |
} |
|
221 |
} |
|
222 |
||
29536
805894cd3c6b
8075207: Nashorn parser API returns StatementTree objects in out of order
sundar
parents:
29407
diff
changeset
|
223 |
private static CompilationUnitTree translate(final FunctionNode node) { |
29407 | 224 |
return new IRTranslator().translate(node); |
225 |
} |
|
226 |
} |