private static Variable getAfterEqualSignSum(Logic[] cloneLogicOrder, int lineNuber, Scope currentScope) { Logic[] afterEqualSign = InternalParseFunctions.getSubArray(cloneLogicOrder, 3, cloneLogicOrder.Length - 1, lineNuber); //Debugger.printLogicOrder (afterEqualSign, "Checking how dis turns out"); return(new Variable()); }
internal static bool validStatement(Logic[] logicOrder, int lineNumber) { List <Logic[]> statementParts = new List <Logic[]> (); int lastOperatorPos = -1; for (int i = 0; i < logicOrder.Length; i++) { if (logicOrder [i].currentType == WordTypes.andOperator || logicOrder [i].currentType == WordTypes.orOperator) { statementParts.Add(InternalParseFunctions.getSubArray(logicOrder, lastOperatorPos + 1, i - 1, lineNumber)); lastOperatorPos = i; } } statementParts.Add(InternalParseFunctions.getSubArray(logicOrder, lastOperatorPos + 1, logicOrder.Length - 1, lineNumber)); List <bool> partStatementValues = new List <bool> (); foreach (Logic[] l in statementParts) { if (validPartStatement(l, lineNumber) != true) { return(false); } } return(true); }
private static bool returnCheck(Logic[] logicOrder, int lineNumber) { if (logicOrder.Length < 2) { ErrorMessage.sendErrorMessage(lineNumber, "Du måste returnera något"); } ValidSumCheck.checkIfValidSum((InternalParseFunctions.getSubArray(logicOrder, 1, logicOrder.Length - 1, lineNumber)), lineNumber); return(true); }