Guest User

Untitled

a guest
Apr 25th, 2019
88
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package at.tugraz.ist.cc.ClassBodyInfo;
  2.  
  3. import at.tugraz.ist.cc.InformationContainer.ClassContainer;
  4. import at.tugraz.ist.cc.InformationContainer.MethodContainer;
  5. import at.tugraz.ist.cc.JovaParser;
  6. import at.tugraz.ist.cc.TypeInfo.GetType;
  7. import at.tugraz.ist.cc.TypeInfo.TypeInfoChecker;
  8. import at.tugraz.ist.cc.error.ErrorHandler;
  9. import at.tugraz.ist.cc.process.AccessTheMembers;
  10. import at.tugraz.ist.cc.process.AssignmentClass;
  11. import at.tugraz.ist.cc.process.Interposed;
  12. import at.tugraz.ist.cc.process.PartBlock;
  13. import at.tugraz.ist.cc.process.right_values.*;
  14. import org.antlr.v4.runtime.tree.TerminalNode;
  15.  
  16. import java.util.LinkedList;
  17. import java.util.List;
  18.  
  19. import static java.awt.SystemColor.info;
  20.  
  21.  
  22. public class ClassBodyMethodChecker extends Exception {
  23. class InvalidStatementException extends RuntimeException {
  24. InvalidStatementException() { super("");
  25. }
  26. }
  27.  
  28. public ClassBodyInfoChecker bodyInfoChecker;
  29. public JovaParser.Method_declContext method_declContext;
  30. public JovaParser.TypeContext typeContext;
  31. public MethodContainer methodContainer;
  32.  
  33. public ClassBodyMethodChecker(ClassBodyInfoChecker bodyInfoChecker, JovaParser.TypeContext typeContext,
  34. JovaParser.Method_declContext method_declContext, MethodContainer methodContainer)
  35. {
  36. this.bodyInfoChecker = bodyInfoChecker;
  37. this.typeContext = typeContext;
  38. this.method_declContext = method_declContext;
  39. this.methodContainer = methodContainer;
  40. }
  41.  
  42. public ClassBodyMethodChecker(MethodContainer container, ClassBodyInfoChecker checker)
  43. {
  44. methodContainer = container;
  45. bodyInfoChecker = checker;
  46. }
  47.  
  48.  
  49. public void methodBodyChecker(JovaParser.Method_bodyContext method_bodyContext) {
  50.  
  51. for(JovaParser.DeclarationContext declarationsContext: method_bodyContext.declarations().declaration())
  52. {
  53. ClassContainer var_type = null;
  54. String prim_type = null;
  55. GetType getType = new GetType(typeContext);
  56. if(!getType.isPrimitiveType())
  57. var_type = bodyInfoChecker.checker_.getNotPrimitiveType(typeContext);
  58. else
  59. prim_type = bodyInfoChecker.checker_.getPrimitiveType(method_declContext);
  60.  
  61. if(var_type == null && prim_type == null)
  62. {
  63. ErrorHandler.INSTANCE.addUnknownTypeError(declarationsContext.getStart().getLine(),
  64. declarationsContext.getStart().getCharPositionInLine(),
  65. declarationsContext.getStart().getText());
  66. continue;
  67. }
  68.  
  69. if(var_type.getClassName().equals("Main") || prim_type.equals("Main"))
  70. {
  71. ErrorHandler.INSTANCE.addMainInstatiationError(declarationsContext.getStart().getLine(), declarationsContext.getStart().getCharPositionInLine());
  72. continue;
  73. }
  74.  
  75. // System.out.println("primitive = " + primitive_var.getText());
  76.  
  77. //find existing expression and check stand for left-hand side and right-hand side
  78. automaticCastingChecker(declarationsContext, prim_type, var_type, getType);
  79. }
  80. }
  81.  
  82. public void automaticCastingChecker(JovaParser.DeclarationContext declarationContext, String prim_type, ClassContainer var_type, GetType getType)
  83. {
  84. for(JovaParser.Id_listContext id_listContext: declarationContext.id_lists().id_list())
  85. {
  86. if(methodContainer.name_Of_scopes.containsKey(id_listContext.ID().getText()))
  87. {
  88. ErrorHandler.INSTANCE.addVarDoubleDefError(declarationContext.getStart().getLine(), declarationContext.getStart().getCharPositionInLine(),
  89. id_listContext.ID().getText(), declarationContext.getStart().getText(), methodContainer.method_name_, methodContainer.convertParameterNames());
  90. continue;
  91. }
  92.  
  93. Interposed leftValue = null;
  94.  
  95. if(getType.isPrimitiveType())
  96. leftValue = methodContainer.instantiate_primitive_type(prim_type);
  97. else
  98. leftValue = methodContainer.instantiate_notPrimitive_type(var_type);
  99.  
  100. methodContainer.name_Of_scopes.put(id_listContext.ID().getText() , leftValue.getMethod_index());
  101.  
  102. JovaParser.ExprContext exprContext = id_listContext.expr();
  103. if(exprContext != null)
  104. {
  105. //TODO getRightValue == unix !!!
  106. //TODO == isEitherOfNeitherType
  107. //TODO convertToBool == intToBool
  108. //TODO convertToInteger == boolToInt
  109. //RightValue rightValue = getRightValue();
  110. //if(rightValue.getType != leftValue)
  111. //{
  112. // rightValue = getRightValue();
  113. // if(isEitherofNeitherType())
  114. // {
  115. // ErrorHandler.INSTANCE.addBinaryTypeError(
  116. // id_listContext.getStart().getName(),
  117. // id_listContext.getStart().getCharPositionInLine(),
  118. // leftValue.getType().getName(),
  119. // rightValue.getType.getName(),
  120. // id_listContext.ASSIGN.getText());
  121. // //TODO da li treba exception???
  122. // }
  123. // ErrorHandler.INSTANCE.addBinaryTypeCoercionWarning(
  124. // id_listContext.ASSIGN.getSymbol.getLine(),
  125. // id_listContext.ASSIGN.getSymbol.getCharPositionInLine(),
  126. // id_listContext.ASSIGN.getText(),
  127. // leftValue.getType().getName(),
  128. // rightValue.getType().getName(),
  129. // leftValue.getType().getName(),
  130. // rightValue.getType().getName());
  131. //
  132. // if(leftValue.getType() == PrimitiveType.BOOLEAN)
  133. // rightValue = convertToBool();
  134. // else
  135. // rightValue = convertToInteger();
  136. }
  137. }
  138. }
  139.  
  140.  
  141. ///-----------------------------------------------------------------------------------------------------------------
  142.  
  143. public RightValueNode castIntegerToBoolean(RightValueNode val, PartBlock block)
  144. {
  145. return toNodeValue(block, new RightValueBinaryOperator(val, new RightValueInteger(0), OperatorRelationRightValue.OPERATOR_NOT_EQUAL));
  146. }
  147.  
  148. public boolean checkTypeValid(RightValueNode val)
  149. {
  150. boolean a = false;
  151.  
  152. if (val.part_to_single_part() == "int")
  153. {
  154. a = true;
  155. }
  156.  
  157. if (val.part_to_single_part() == "boolean")
  158. {
  159. a = true;
  160. }
  161.  
  162. return a;
  163. }
  164.  
  165. public RightValueNode toNodeValue(PartBlock block, RightValue val)
  166. {
  167. GetType type = new GetType();
  168. Interposed caller = null;
  169. boolean tip = type.isPrimitiveType((JovaParser.TypeContext) val);
  170. if(tip)
  171. caller = methodContainer.instantiate_primitive_type((String)val.part_to_single_part());
  172. else
  173. caller = methodContainer.instantiate_notPrimitive_type((ClassContainer)val.part_to_single_part());
  174.  
  175. block.body_part.add(new AssignmentClass(val,caller));
  176. //System.out.println("tip ovaj = "+ tip);
  177. return caller;
  178. }
  179.  
  180. public RightValue castExprToRightValue(JovaParser.ExprContext ctx)
  181. {
  182. RightValue rv = null;
  183.  
  184. rv = (RightValue) ctx.expr();
  185.  
  186. return rv;
  187. }
  188.  
  189. public RightValueNode castBooleanToInt(RightValueNode cond, PartBlock block)
  190. {
  191. RightValueNode rv = null;
  192. rv = toNodeValue(block, new RightValueTernaryOperator(cond, new RightValueInteger(1), new RightValueInteger(0)));
  193. return rv;
  194. }
  195.  
  196. public LeftRightValueNode handleMemberAccess(JovaParser.Member_accessContext ctx, PartBlock block)
  197. {
  198.  
  199.  
  200. return null;
  201. }
  202.  
  203. public RightValue resolveReturnValue(TerminalNode node)
  204. {
  205. return null;
  206. }
  207.  
  208. public RightValue exprToRightValue(JovaParser.ExprContext expr_ctx, PartBlock block)
  209. {
  210. if (expr_ctx.operand() != null)
  211. {
  212. System.out.println("nije nula = " + expr_ctx.operand().getText());
  213. return castOperandRightValue(expr_ctx.operand(),block);
  214. }
  215.  
  216. System.out.println("expr ctx OPERATOR = " + expr_ctx.OPERATOR().getText());
  217.  
  218. TerminalNode operator = expr_ctx.OPERATOR();
  219.  
  220. RightValue op1, op2;
  221.  
  222. System.out.println("size expr ??? = " + expr_ctx.expr().size());
  223.  
  224. // a = castExprToRightValue(expr_ctx.expr(0));
  225. op1 = (RightValue) expr_ctx.expr(0);
  226. op2 = (RightValue) expr_ctx.expr(1);
  227.  
  228. if (operator != null)
  229. {
  230. /// handle all operators
  231.  
  232. // handle not
  233. if (operator.getText().equals("NOT"))
  234. {
  235.  
  236. }
  237. else if (operator.getText().equals("SIGN"))
  238. {
  239.  
  240. }
  241. else if (operator.getText().equals("RELOP"))
  242. {
  243.  
  244. }
  245. else if (operator.getText().equals("AND"))
  246. {
  247.  
  248. }
  249. else if (operator.getText().equals("OR"))
  250. {
  251.  
  252. }
  253.  
  254. if(op1.getClass().getTypeName().equals("boolean") || op1.getClass().getTypeName().equals("int"))
  255. {
  256. System.out.println("exprtoRV op1.getClass.getTypeName = " + op1.getClass().getTypeName());
  257. ErrorHandler.INSTANCE.addBinaryTypeError(operator.getSymbol().getLine(), operator.getSymbol().getCharPositionInLine(),
  258. op1.getClass().getTypeName(), op2.getClass().getTypeName(), operator.getText());
  259.  
  260. // throw new InvalidStatementException();
  261. }
  262. else if(op2.getClass().getTypeName().equals("boolean") || op2.getClass().getTypeName().equals("int"))
  263. {
  264. System.out.println("exprtoRV op2.getClass.getTypeName = " + op2.getClass().getTypeName());
  265. ErrorHandler.INSTANCE.addBinaryTypeError(operator.getSymbol().getLine(), operator.getSymbol().getCharPositionInLine(),
  266. op1.getClass().getTypeName(), op2.getClass().getTypeName(), operator.getText());
  267.  
  268. // throw new InvalidStatementException();
  269. }
  270.  
  271.  
  272. /// treba mi tip operanda, nije ovo to to.....
  273.  
  274. if (!op1.getClass().getTypeName().equals("int"))
  275. {
  276.  
  277. if (!op1.getClass().getTypeName().equals("boolen"))
  278. {
  279. /// castBooleanToInt
  280. }
  281. else
  282. {
  283. /// rejected type - error
  284. }
  285.  
  286. }
  287.  
  288. if (!op2.getClass().getTypeName().equals("int"))
  289. {
  290.  
  291. if (!op2.getClass().getTypeName().equals("boolen"))
  292. {
  293. /// castBooleanToInt
  294. }
  295. else
  296. {
  297. /// rejected type - error
  298. }
  299.  
  300. }
  301.  
  302. if (!op1.getClass().getTypeName().equals("int") || !op2.getClass().getTypeName().equals("int"))
  303. {
  304. ErrorHandler.INSTANCE.addBinaryTypeCoercionWarning(operator.getSymbol().getLine(), operator.getSymbol().getCharPositionInLine(),
  305. operator.getSymbol().getText(), op1.getClass().getName(), op2.getClass().getName(), "int", "int");
  306. }
  307.  
  308. }
  309.  
  310.  
  311. return null;
  312. }
  313.  
  314. public RightValue castOperandRightValue(JovaParser.OperandContext operand_ctx, PartBlock block)
  315. {
  316. RightValue retType = null;
  317.  
  318. /// check operand type
  319. TerminalNode integer_val = operand_ctx.INT();
  320. TerminalNode string_val = operand_ctx.STRING_LIT();
  321. TerminalNode bool_val = operand_ctx.STRING_LIT();
  322.  
  323. /// handle primitive type
  324. if (integer_val != null)
  325. {
  326. System.out.println("1");
  327. retType = new RightValueInteger(Integer.parseInt(integer_val.getText()));
  328. return retType;
  329. }
  330. else if (string_val != null)
  331. {
  332. System.out.println("2");
  333. retType = new RightValueString(integer_val.getText());
  334. return retType;
  335. }
  336. else if (bool_val != null)
  337. {
  338. System.out.println("3");
  339. retType = new RightValueBool(Boolean.parseBoolean(bool_val.getText()));
  340. return retType;
  341. }
  342.  
  343.  
  344. TerminalNode nix = operand_ctx.KEY_NIX();
  345. if (nix != null)
  346. {
  347. retType = new SpecifierNixRightValue(null);
  348. return retType;
  349. }
  350.  
  351. JovaParser.Negate_operandContext not = operand_ctx.negate_operand();
  352. JovaParser.Sign_operandContext sign = operand_ctx.sign_operand();
  353. JovaParser.Object_allocContext alloc = operand_ctx.object_alloc();
  354.  
  355. JovaParser.Id_operandContext id = operand_ctx.id_operand();
  356. JovaParser.ExprContext expr = operand_ctx.expr();
  357.  
  358. // RightValueNode e = toNodeValue();
  359. if (not != null)
  360. {
  361. System.out.println("negation ");
  362. // System.out.println("operand = " + operand_ctx.NOT());
  363. RightValueNode right_value = toNodeValue(block, castOperandRightValue(operand_ctx.negate_operand().operand(), block));
  364.  
  365. boolean isTypeValid = checkTypeValid(right_value);
  366.  
  367. if (!isTypeValid)
  368. {
  369. ErrorHandler.INSTANCE.addUnaryTypeError(operand_ctx.getStart().getLine(), operand_ctx.getStart().getCharPositionInLine(),
  370. (String) right_value.part_to_single_part(), operand_ctx.negate_operand().NOT().getText());
  371.  
  372. /// INVALID STMT EXCEPTION
  373. }
  374.  
  375. if (right_value.part_to_single_part().equals("int"))
  376. {
  377. ErrorHandler.INSTANCE.addUnaryTypeCoercionWarning(operand_ctx.negate_operand().NOT().getSymbol().getLine(),
  378. operand_ctx.negate_operand().NOT().getSymbol().getCharPositionInLine(), operand_ctx.negate_operand().NOT().getText(),
  379. (String) right_value.part_to_single_part(),"boolean");
  380.  
  381. right_value = castIntegerToBoolean(right_value, block);
  382. }
  383. return new RightValueUnaryOperator(right_value, OperatorLogicUnaryRightValue.OPERATOR_NOT);
  384. }
  385. else if (sign != null)
  386. {
  387. RightValueNode right_value = toNodeValue(block, castOperandRightValue(sign.operand(), block));
  388.  
  389. if (checkTypeValid(right_value))
  390. {
  391. ErrorHandler.INSTANCE.addUnaryTypeError(operand_ctx.getStart().getLine(), operand_ctx.getStart().getCharPositionInLine(),
  392. (String) right_value.part_to_single_part(), sign.SIGN().getText());
  393. // throw new InvalidStatementException();
  394. }
  395.  
  396. if (right_value.part_to_single_part().equals("boolean"))
  397. {
  398. ErrorHandler.INSTANCE.addUnaryTypeCoercionWarning(sign.SIGN().getSymbol().getLine(), sign.SIGN().getSymbol().getCharPositionInLine(),
  399. sign.SIGN().getText(), (String) right_value.part_to_single_part(), "int");
  400.  
  401. right_value = castBooleanToInt(right_value, block);
  402. }
  403.  
  404. if (sign.SIGN().getText().equals("-"))
  405. {
  406. return new RightValueUnaryOperator(right_value, OperatorArithmeticUnaryRightValue.OPERATOR_INVERS);
  407. }
  408. else
  409. {
  410. return right_value;
  411. }
  412. }
  413. else if (alloc != null)
  414. {
  415. String class_name = alloc.CLASS_TYPE().getText();
  416. if (!bodyInfoChecker.checker_.collection_of_classes.containsKey(class_name))
  417. {
  418. ErrorHandler.INSTANCE.addUnknownTypeError(operand_ctx.getStart().getLine(), operand_ctx.getStart().getCharPositionInLine(), class_name);
  419. // throw new InvalidStatementException();
  420. }
  421. if (class_name.equals("Main"))
  422. {
  423. ErrorHandler.INSTANCE.addMainInstatiationError(
  424. operand_ctx.getStart().getLine(),
  425. operand_ctx.getStart().getCharPositionInLine()
  426. );
  427. // throw new InvalidStatementException();
  428. }
  429. return new RightValueAllocation(bodyInfoChecker.checker_.collection_of_classes.get(class_name));
  430. }
  431.  
  432. else if (id != null)
  433. {
  434. return castIdOperandToRightValue(block, operand_ctx.id_operand());
  435. }
  436.  
  437. else if (expr != null)
  438. {
  439. return castExprToRightValue(operand_ctx.expr());
  440. }
  441.  
  442. return null;
  443. }
  444.  
  445. public void addNodesToList(JovaParser.ExprContext context_of_arguments, PartBlock block, List<RightValueNode> list_of_nodes, List<String> types_of_arguments)
  446. {
  447. RightValueNode node;
  448. node = toNodeValue(block, exprToRightValue(context_of_arguments, block));
  449. list_of_nodes.add(node);
  450. types_of_arguments.add((String)node.part_to_single_part());
  451. }
  452.  
  453. public RightValue castIdOperandToRightValue(PartBlock block, JovaParser.Id_operandContext idoperand_ctx)
  454. {
  455. RightValue rvalue;
  456. List<String> types_of_arguments = new LinkedList<>();
  457. List<RightValueNode> list_of_nodes = new LinkedList<>();
  458. if (idoperand_ctx.arg_list() == null)
  459. {
  460. LeftRightValueNode ret = handleMemberAccess(idoperand_ctx.member_access(), block);
  461. return ret;
  462. }
  463.  
  464. if (idoperand_ctx.member_access().member_access() == null) {
  465. rvalue = null;
  466. }
  467. else {
  468. rvalue = handleMemberAccess(idoperand_ctx.member_access().member_access(), block);
  469. }
  470.  
  471. for (JovaParser.ExprContext context_of_arguments : idoperand_ctx.arg_list().args().expr())
  472. {
  473. addNodesToList(context_of_arguments, block, list_of_nodes, types_of_arguments);
  474. }
  475. GetType typechecker = new GetType();
  476. boolean check = typechecker.isPrimitiveType((JovaParser.TypeContext) rvalue);
  477. System.out.println("ispis moj je " + rvalue.toString());
  478.  
  479. if (check)
  480. {
  481. errorHandlerDoYourThing(idoperand_ctx, rvalue, types_of_arguments, 1);
  482. }
  483.  
  484. MethodContainer method = ((ClassContainer) rvalue.part_to_single_part()).getMethod(idoperand_ctx.member_access().member_access().ID().getText(), types_of_arguments);
  485. if (method == null)
  486. {
  487. if (idoperand_ctx.member_access().member_access() != null )
  488. {
  489. errorHandlerDoYourThing(idoperand_ctx, rvalue, types_of_arguments, 2);
  490. }
  491.  
  492. else{
  493. errorHandlerDoYourThing(idoperand_ctx, rvalue, types_of_arguments, 3);
  494. }
  495.  
  496. throw new InvalidStatementException();
  497. }
  498. if (((ClassContainer)rvalue.part_to_single_part() != this.methodContainer.container_))
  499. {
  500. if(method.method_privacy_flag_)
  501. {
  502. ErrorHandler.INSTANCE.addMethodAccessError(
  503. idoperand_ctx.getStart().getLine(),
  504. idoperand_ctx.getStart().getCharPositionInLine(),
  505. idoperand_ctx.member_access().ID().getText(),
  506. (String)((ClassContainer) rvalue.part_to_single_part()).getClassName(),
  507. method.convertParameterNames()
  508. );
  509. throw new InvalidStatementException();
  510. }
  511. }
  512.  
  513. return new CallerOfMethodRightValue(method,toNodeValue(block, rvalue), list_of_nodes);
  514. }
  515.  
  516. public void errorHandlerDoYourThing(JovaParser.Id_operandContext idoperand_ctx, RightValue rvalue, List<String> types_of_arguments, int flag)
  517. {
  518. System.out.println("ispis moj je " + rvalue.toString());
  519. if(flag == 1)
  520. {
  521. ErrorHandler.INSTANCE.addCannotInvokeError(idoperand_ctx.getStart().getLine(), idoperand_ctx.getStart().getCharPositionInLine(),
  522. ((JovaParser.TypeContext) rvalue).PRIMITIVE_TYPE().getText(), idoperand_ctx.member_access().ID().getText(),
  523. MethodContainer.convertNames(types_of_arguments)
  524. );throw new InvalidStatementException();
  525. }
  526. if(flag == 2)
  527. {
  528. ErrorHandler.INSTANCE.addCannotInvokeError(
  529. idoperand_ctx.getStart().getLine(),
  530. idoperand_ctx.getStart().getCharPositionInLine(),
  531. (String)((ClassContainer) rvalue.part_to_single_part()).getClassName(),
  532. idoperand_ctx.member_access().ID().getText(),
  533. MethodContainer.convertNames(types_of_arguments)
  534. );
  535. }
  536. if(flag == 3)
  537. {
  538. ErrorHandler.INSTANCE.addUndefMethodError(idoperand_ctx.getStart().getLine(), idoperand_ctx.getStart().getCharPositionInLine(), idoperand_ctx.member_access().ID().getText(),
  539. MethodContainer.convertNames(types_of_arguments)
  540. );
  541. }
  542. }
  543.  
  544. private void invokeErrorHandlerErrors(JovaParser.Member_accessContext context, RightValue rvalue, int flag)
  545. {
  546. if(flag == 1)
  547. ErrorHandler.INSTANCE.addDoesNotHaveFieldError(context.getStart().getLine(), context.getStart().getCharPositionInLine(), rvalue.toString(), context.ID().getText());
  548. if(flag == 2)
  549. ErrorHandler.INSTANCE.addDoesNotHaveFieldError(context.getStart().getLine(), context.getStart().getCharPositionInLine(), ((ClassContainer) rvalue.part_to_single_part()).getClassName(),
  550. context.ID().getText());
  551. }
  552.  
  553. public LeftRightValueNode sortingOutAccessOfMembers(JovaParser.Member_accessContext context, PartBlock body)
  554. {
  555. int flag = 0;
  556. RightValue rvalue;
  557. if (context.member_access() != null) {
  558. rvalue = sortingOutAccessOfMembers(context.member_access(), body);
  559. }
  560. else
  561. {
  562. rvalue = null;
  563. flag = 1;
  564. }
  565. GetType typechecker = new GetType();
  566. boolean check = typechecker.isPrimitiveType((JovaParser.TypeContext) rvalue);
  567. if (check)
  568. {
  569. invokeErrorHandlerErrors(context, rvalue, 1);
  570. throw new InvalidStatementException();
  571. }
  572. if (((ClassContainer) rvalue.part_to_single_part()).name_of_variable.get(context.ID().getText()) == null)
  573. {
  574. if (flag!=1)
  575. {
  576. invokeErrorHandlerErrors(context, rvalue, 2);
  577. }
  578.  
  579. else
  580. {
  581. ErrorHandler.INSTANCE.addUndefIdError(context.getStart().getLine(), context.getStart().getCharPositionInLine(), context.ID().getText()
  582. );
  583. }
  584.  
  585. throw new InvalidStatementException(); // TODO: change invalidstmt..
  586. }
  587.  
  588. if (this.methodContainer.container_ !=((ClassContainer) rvalue.part_to_single_part() ))
  589. {
  590. if(((ClassContainer) rvalue.part_to_single_part()).private_variables.contains(((ClassContainer) rvalue.part_to_single_part()).name_of_variable.get(context.ID().getText())))
  591. {
  592. ErrorHandler.INSTANCE.addMemberAccessError(context.getStart().getLine(), context.getStart().getCharPositionInLine(), context.ID().getText(),
  593. ((ClassContainer) rvalue.part_to_single_part()).getClassName()
  594. );
  595. throw new InvalidStatementException();
  596. }
  597. }
  598.  
  599. return new AccessTheMembers(((ClassContainer) rvalue.part_to_single_part()).name_of_variable.get(context.ID().getText()), toNodeValue(body,rvalue));
  600. }
  601. }
RAW Paste Data