Skip to content
This repository
Browse code

tightening rules for non-implemented parts

  • Loading branch information...
commit 793dac5e5b3ddcac66c42db0434e97c3475d611f 1 parent 4070a9c
Douglas Campos qmx authored
4 src/main/java/org/dynjs/exception/DynJSException.java
@@ -23,4 +23,8 @@ public DynJSException(){
23 23 public DynJSException(Exception e) {
24 24 super(e);
25 25 }
  26 +
  27 + public DynJSException(String message) {
  28 + super(message);
  29 + }
26 30 }
73 src/main/java/org/dynjs/parser/Executor.java
@@ -17,6 +17,7 @@
17 17
18 18 import me.qmx.jitescript.CodeBlock;
19 19 import org.antlr.runtime.tree.CommonTree;
  20 +import org.dynjs.exception.DynJSException;
20 21 import org.dynjs.parser.statement.*;
21 22 import org.dynjs.runtime.DynThreadContext;
22 23 import org.dynjs.runtime.RT;
@@ -99,15 +100,15 @@ public Statement defineFunction(final String identifier, final List<String> args
99 100 }
100 101
101 102 public Statement defineShlOp(Statement l, Statement r) {
102   - return null;
  103 + throw new DynJSException("not implemented yet");
103 104 }
104 105
105 106 public Statement defineShrOp(Statement l, Statement r) {
106   - return null;
  107 + throw new DynJSException("not implemented yet");
107 108 }
108 109
109 110 public Statement defineShuOp(Statement l, Statement r) {
110   - return null;
  111 + throw new DynJSException("not implemented yet");
111 112 }
112 113
113 114 public Statement defineDivOp(Statement l, Statement r) {
@@ -119,15 +120,15 @@ public Statement defineModOp(Statement l, Statement r) {
119 120 }
120 121
121 122 public Statement defineDeleteOp(Statement expression) {
122   - return null;
  123 + throw new DynJSException("not implemented yet");
123 124 }
124 125
125 126 public Statement defineVoidOp(Statement expression) {
126   - return null;
  127 + throw new DynJSException("not implemented yet");
127 128 }
128 129
129 130 public Statement defineTypeOfOp(Statement expression) {
130   - return null;
  131 + throw new DynJSException("not implemented yet");
131 132 }
132 133
133 134 public Statement defineIncOp(Statement expression) {
@@ -139,15 +140,15 @@ public Statement defineDecOp(Statement expression) {
139 140 }
140 141
141 142 public Statement definePosOp(Statement expression) {
142   - return null;
  143 + throw new DynJSException("not implemented yet");
143 144 }
144 145
145 146 public Statement defineNegOp(Statement expression) {
146   - return null;
  147 + throw new DynJSException("not implemented yet");
147 148 }
148 149
149 150 public Statement defineInvOp(Statement expression) {
150   - return null;
  151 + throw new DynJSException("not implemented yet");
151 152 }
152 153
153 154 public Statement defineNotOp(Statement expression) {
@@ -179,11 +180,11 @@ public Statement defineGteRelOp(Statement l, Statement r) {
179 180 }
180 181
181 182 public Statement defineInstanceOfRelOp(Statement l, Statement r) {
182   - return null;
  183 + throw new DynJSException("not implemented yet");
183 184 }
184 185
185 186 public Statement defineInRelOp(Statement l, Statement r) {
186   - return null;
  187 + throw new DynJSException("not implemented yet");
187 188 }
188 189
189 190 public Statement defineLorOp(final Statement l, final Statement r) {
@@ -195,15 +196,15 @@ public Statement defineLandOp(Statement l, Statement r) {
195 196 }
196 197
197 198 public Statement defineAndBitOp(Statement l, Statement r) {
198   - return null;
  199 + throw new DynJSException("not implemented yet");
199 200 }
200 201
201 202 public Statement defineOrBitOp(Statement l, Statement r) {
202   - return null;
  203 + throw new DynJSException("not implemented yet");
203 204 }
204 205
205 206 public Statement defineXorBitOp(Statement l, Statement r) {
206   - return null;
  207 + throw new DynJSException("not implemented yet");
207 208 }
208 209
209 210 public Statement defineEqOp(final Statement l, final Statement r) {
@@ -247,27 +248,27 @@ public Statement defineSubAssOp(Statement l, Statement r) {
247 248 }
248 249
249 250 public Statement defineShlAssOp(Statement l, Statement r) {
250   - return null;
  251 + throw new DynJSException("not implemented yet");
251 252 }
252 253
253 254 public Statement defineShrAssOp(Statement l, Statement r) {
254   - return null;
  255 + throw new DynJSException("not implemented yet");
255 256 }
256 257
257 258 public Statement defineShuAssOp(Statement l, Statement r) {
258   - return null;
  259 + throw new DynJSException("not implemented yet");
259 260 }
260 261
261 262 public Statement defineAndAssOp(Statement l, Statement r) {
262   - return null;
  263 + throw new DynJSException("not implemented yet");
263 264 }
264 265
265 266 public Statement defineXorAssOp(Statement l, Statement r) {
266   - return null;
  267 + throw new DynJSException("not implemented yet");
267 268 }
268 269
269 270 public Statement defineOrAssOp(Statement l, Statement r) {
270   - return null;
  271 + throw new DynJSException("not implemented yet");
271 272 }
272 273
273 274 public Statement defineQueOp(Statement ex1, Statement ex2, Statement ex3) {
@@ -275,7 +276,7 @@ public Statement defineQueOp(Statement ex1, Statement ex2, Statement ex3) {
275 276 }
276 277
277 278 public Statement defineThisLiteral() {
278   - return null;
  279 + throw new DynJSException("not implemented yet");
279 280 }
280 281
281 282 public Statement defineNullLiteral() {
@@ -283,7 +284,7 @@ public Statement defineNullLiteral() {
283 284 }
284 285
285 286 public Statement defineRegExLiteral(String s) {
286   - return null;
  287 + throw new DynJSException("not implemented yet");
287 288 }
288 289
289 290 public Statement defineTrueLiteral() {
@@ -330,23 +331,23 @@ public Statement forStepVar(Statement varDef, Statement expr1, Statement expr2,
330 331 }
331 332
332 333 public Statement forStepExpr(Statement expr1, Statement expr2, Statement expr3, Statement statement) {
333   - return null;
  334 + throw new DynJSException("not implemented yet");
334 335 }
335 336
336 337 public Statement forIterVar(Statement varDef, Statement expr1, Statement statement) {
337   - return null;
  338 + throw new DynJSException("not implemented yet");
338 339 }
339 340
340 341 public Statement forIterExpr(Statement expr1, Statement expr2, Statement statement) {
341   - return null;
  342 + throw new DynJSException("not implemented yet");
342 343 }
343 344
344 345 public Statement continueStatement(String id) {
345   - return null;
  346 + throw new DynJSException("not implemented yet");
346 347 }
347 348
348 349 public Statement breakStatement(String id) {
349   - return null;
  350 + throw new DynJSException("not implemented yet");
350 351 }
351 352
352 353 public Statement exprListStatement(final List<Statement> exprList) {
@@ -367,15 +368,15 @@ public Statement resolveCallExpr(Statement lhs, List<Statement> args) {
367 368 }
368 369
369 370 public Statement switchStatement(Statement expr, Statement _default, List<Statement> cases) {
370   - return null;
  371 + throw new DynJSException("not implemented yet");
371 372 }
372 373
373 374 public Statement switchCaseClause(Statement expr, List<Statement> statements) {
374   - return null;
  375 + throw new DynJSException("not implemented yet");
375 376 }
376 377
377 378 public Statement switchDefaultClause(List<Statement> statements) {
378   - return null;
  379 + throw new DynJSException("not implemented yet");
379 380 }
380 381
381 382 public Statement throwStatement(Statement expression) {
@@ -392,23 +393,23 @@ public CodeBlock getCodeBlock() {
392 393 }
393 394
394 395 public Statement tryStatement(Statement block, Statement _catch, Statement _finally) {
395   - return null;
  396 + throw new DynJSException("not implemented yet");
396 397 }
397 398
398 399 public Statement tryCatchClause(String id, Statement block) {
399   - return null;
  400 + throw new DynJSException("not implemented yet");
400 401 }
401 402
402 403 public Statement tryFinallyClause(Statement block) {
403   - return null;
  404 + throw new DynJSException("not implemented yet");
404 405 }
405 406
406 407 public Statement withStatement(Statement expression, Statement statement) {
407   - return null;
  408 + throw new DynJSException("not implemented yet");
408 409 }
409 410
410 411 public Statement labelledStatement(String label, Statement statement) {
411   - return null;
  412 + throw new DynJSException("not implemented yet");
412 413 }
413 414
414 415 public Statement objectValue(List<Statement> namedValues) {
@@ -424,7 +425,7 @@ public Statement propertyNameString(String string) {
424 425 }
425 426
426 427 public Statement propertyNameNumeric(Statement numericLiteral) {
427   - return null;
  428 + throw new DynJSException("not implemented yet");
428 429 }
429 430
430 431 public Statement namedValue(final Statement propertyName, final Statement expr) {

0 comments on commit 793dac5

Please sign in to comment.
Something went wrong with that request. Please try again.