@@ -557,9 +557,38 @@ else if (Expression.isDouble(value))
557557
558558 /* JavaScript processing: */
559559
560+ public Vector jsupdateForm (java .util .Map vartypes ,
561+ java .util .Map varelemtypes , Vector types , Vector ents )
562+ { return new Vector (); }
563+
560564 public Expression jsexpressionToKM3 (java .util .Map vartypes ,
561565 java .util .Map varelemtypes , Vector types , Vector ents )
562- { if ("numericLiteral" .equals (tag ))
566+ { if ("this" .equals (value ))
567+ { Expression expr =
568+ BasicExpression .newVariableBasicExpression ("self" );
569+ return expr ;
570+ }
571+
572+ if ("super" .equals (value ))
573+ { Expression expr =
574+ BasicExpression .newVariableBasicExpression ("super" );
575+ return expr ;
576+ }
577+
578+ if ("null" .equals (value ) || "undefined" .equals (value ))
579+ { Expression expr =
580+ BasicExpression .newVariableBasicExpression ("null" );
581+ expr .setType (new Type ("OclAny" , null ));
582+ return expr ;
583+ }
584+
585+ if ("true" .equals (value ))
586+ { return new BasicExpression (true ); }
587+
588+ if ("false" .equals (value ))
589+ { return new BasicExpression (false ); }
590+
591+ if ("numericLiteral" .equals (tag ))
563592 {
564593 BasicExpression v = new BasicExpression (value );
565594 if (Expression .isInteger (value ))
@@ -578,13 +607,7 @@ else if (Expression.isDouble(value))
578607 }
579608 else if ("literal" .equals (tag ) ||
580609 "propertyName" .equals (tag ))
581- { if ("null" .equals (value ))
582- { return new BasicExpression ("null" ); }
583- if ("true" .equals (value ))
584- { return new BasicExpression (true ); }
585- if ("false" .equals (value ))
586- { return new BasicExpression (false ); }
587-
610+ {
588611 BasicExpression v = new BasicExpression (value );
589612 if (Expression .isString (value ))
590613 { if ('\'' == value .charAt (0 ))
@@ -645,6 +668,27 @@ else if ("identifier".equals(tag))
645668 return null ;
646669 }
647670
671+ public Vector jsexpressionListToKM3 (java .util .Map vartypes ,
672+ java .util .Map varelemtypes , Vector types , Vector entities )
673+ { System .out .println (">> jsexpressionListToKM3 for " + tag + " with value " + value );
674+ System .out .println ();
675+
676+ Vector res = new Vector ();
677+ return res ;
678+ }
679+
680+ public Vector jsstatementListToKM3 (java .util .Map vartypes ,
681+ java .util .Map varelemtypes , Vector types , Vector entities )
682+ { Vector res = new Vector ();
683+ return res ;
684+ }
685+
686+
687+ public Vector jsstatementToKM3 (java .util .Map vartypes ,
688+ java .util .Map varelemtypes , Vector types , Vector entities )
689+ { return new Vector (); }
690+
691+
648692
649693 /* Java processing */
650694
0 commit comments