(SemanticsVisitor visitor, Node[] args, FormulaSemantics semantics)
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | public FormatManager<?> allowArgs(SemanticsVisitor visitor, Node[] args, FormulaSemantics semantics) |
| 63 | { |
| 64 | int argCount = args.length; |
| 65 | if (argCount != 2) |
| 66 | { |
| 67 | throw new SemanticsFailureException("Function " + getFunctionName() |
| 68 | + " received incorrect # of arguments, expected: 2 got " + args.length + ' ' + Arrays.asList(args)); |
| 69 | } |
| 70 | if (!(args[0] instanceof ASTQuotString)) |
| 71 | { |
| 72 | //Error |
| 73 | throw new SemanticsFailureException("Parse Error: Invalid first argument: Must be a String"); |
| 74 | } |
| 75 | if (!(args[1] instanceof ASTQuotString)) |
| 76 | { |
| 77 | //Error |
| 78 | throw new SemanticsFailureException("Parse Error: Invalid first argument: Must be a String"); |
| 79 | } |
| 80 | |
| 81 | //This will be a format |
| 82 | return semantics.get(ManagerKey.CONTEXT).getReferenceContext() |
| 83 | .getFormatManager(((ASTQuotString) args[0]).getText()); |
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public Object evaluate(EvaluateVisitor visitor, Node[] args, EvaluationManager manager) |
nothing calls this directly
no test coverage detected