Skip to content

Commit 8cc679b

Browse files
author
Bogdan Damian
committed
Fixed the javadoc in the main interpreter
1 parent 691a95c commit 8cc679b

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

rosetta-lang/src/main/java/com/regnosys/rosetta/interpreternew/RosettaInterpreterNew.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,28 @@ public class RosettaInterpreterNew {
2222
* of the development workflow.
2323
*
2424
* @param expression the expression to be interpreted
25-
* @return value of RosettaIntLiteral otherwise exception
25+
* @return value of RosettaExpression otherwise exception
2626
*/
2727
public RosettaInterpreterValue interp(RosettaExpression expression) {
2828
return expression.accept(visitor, environment);
2929
}
3030

31+
/**
32+
* Main interpret function to redirect the interpreter to the correct interpreter.
33+
*
34+
* @param expression the expression to be interpreted
35+
* @return value of RosettaExpression otherwise exception
36+
*/
3137
public RosettaInterpreterValue interp(RosettaExpression expression,
3238
RosettaInterpreterBaseEnvironment env) {
3339
return expression.accept(visitor, env);
3440
}
3541

3642
/**
37-
* Simple example interpret function to allow for better understanding
38-
* of the development workflow.
43+
* Main interpret function for handling enum declaration.
3944
*
4045
* @param expression the expression to be interpreted
41-
* @return value of RosettaIntLiteral otherwise exception
46+
* @return value of RosettaExpression otherwise exception
4247
*/
4348
public RosettaInterpreterEnvironment interp(RosettaEnumeration expression,
4449
RosettaInterpreterBaseEnvironment env) {
@@ -50,7 +55,7 @@ public RosettaInterpreterEnvironment interp(RosettaEnumeration expression,
5055

5156
/**
5257
* Simple example interpret function to allow for better understanding
53-
* of the development workflow.
58+
* of the development workflow. It is used in testing for simplification.
5459
*
5560
* @param expression the expression to be interpreted
5661
* @return value of RosettaIntLiteral otherwise exception

rosetta-lang/src/main/java/com/regnosys/rosetta/interpreternew/visitors/RosettaInterpreterEnumerationInterpreter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ public RosettaInterpreterEnumerationInterpreter() {
1818
}
1919

2020
/**
21-
* Interprets a list literal, evaluating it to a list value.
21+
* Interprets the definition of an enumeration expression,
22+
* then adds the enum value to the environment.
2223
*
2324
* @param exp the expression to be interpreted
24-
* @return the list value it represents
25+
* @return the new environment after adding the enum to it
2526
*/
2627
public RosettaInterpreterEnvironment interp(RosettaEnumeration exp,
2728
RosettaInterpreterEnvironment env) {

0 commit comments

Comments
 (0)