Skip to content

Commit 65ffbcf

Browse files
authored
Updated JavaScript processing
1 parent d8ba713 commit 65ffbcf

14 files changed

+3309
-252
lines changed

ASTBasicTerm.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,12 @@ else if ("literal".equals(tag) ||
613613
{ if ('\'' == value.charAt(0))
614614
{ BasicExpression ve = new BasicExpression("\"" + value.substring(1,value.length()-1) + "\"");
615615
ve.setType(new Type("String",null));
616+
ve.setElementType(new Type("String",null));
616617
ve.setUmlKind(Expression.VALUE);
617-
UnaryExpression res =
618-
new UnaryExpression("->char2byte", ve);
619-
res.setType(new Type("int", null));
620-
return res;
618+
return ve;
621619
}
622620
v.setType(new Type("String",null));
621+
v.setElementType(new Type("String",null));
623622
v.setUmlKind(Expression.VALUE);
624623
return v;
625624
}
@@ -677,6 +676,20 @@ public Vector jsexpressionListToKM3(java.util.Map vartypes,
677676
return res;
678677
}
679678

679+
public Vector jsvariableDeclarationToKM3(java.util.Map vartypes,
680+
java.util.Map varelemtypes, Vector types, Vector entities)
681+
{ System.out.println(">> jsvariableDeclarationToKM3 for " + tag + " with value " + value);
682+
System.out.println();
683+
684+
// if ("identifier".equals(tag))
685+
{ Attribute attr =
686+
new Attribute(value,new Type("OclAny", null), ModelElement.INTERNAL);
687+
Vector res = new Vector();
688+
res.add(attr);
689+
return res;
690+
}
691+
}
692+
680693
public Vector jsstatementListToKM3(java.util.Map vartypes,
681694
java.util.Map varelemtypes, Vector types, Vector entities)
682695
{ Vector res = new Vector();

0 commit comments

Comments
 (0)